Document toolboxDocument toolbox

Vidispine

Metadata dataset reference [VC 21.3 GEN]

Metadata datasets can be linked to metadata fields to restrict the allowed values for that field.

Managing datasets

List all datasets

GET /metadata/dataset

Retrieves the list of metadata datasets.

Produces:
Role:

_metadata_dataset_read

Example

GET /metadata/dataset
<?xml version="1.0"?>
<MetadataDatasetListDocument>
  <dataset>
    <name>testmodel1</name>
    <uri>http://localhost:8080/API/metadata/dataset/testmodel1</uri>
  </dataset>
  <dataset>
    <name>testmodel2</name>
    <uri>http://localhost:8080/API/metadata/dataset/testmodel2</uri>
  </dataset>
</MetadataModelListDocument>

Retrieve a dataset

GET /metadata/dataset/(name)

Retrieves the metadata dataset with the specified name. The returned serialization format of the RDF model is RDF/XML or TURTLE depending on the request header.

Produces:
  • application/rdf+xml, text/turtle, application/ld+json – The RDF model.

Role:

_metadata_dataset_read

Example

GET /metadata/dataset/testmodel1

Accept: text/turtle
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix skos:  <http://www.w3.org/2004/02/skos/core#> .
@prefix vidi:  <http://rdf.vidispine.com/id/#> .

vidi:gid2  skos:definition  "country" ;
        skos:member      vidi:gid3 ;
        skos:prefLabel   "United Kingdom" .

vidi:gid1  skos:definition  "city" ;
        skos:prefLabel   "London" .

vidi:gid0  skos:definition  "city" ;
        skos:prefLabel   "Manchester" .

vidi:gid3  a    rdf:Bag ;
        rdf:_1  vidi:gid1 ;
        rdf:_2  vidi:gid0 .
GET /metadata/dataset/testmodel1

Accept: application/rdf+xml
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:vidi="http://rdf.vidispine.com/id/#">
  <rdf:Description rdf:about="http://rdf.vidispine.com/id/#gid2">
    <skos:prefLabel>United Kingdom</skos:prefLabel>
    <skos:member>
      <rdf:Bag rdf:about="http://rdf.vidispine.com/id/#gid3">
        <rdf:li>
          <rdf:Description rdf:about="http://rdf.vidispine.com/id/#gid1">
            <skos:prefLabel>London</skos:prefLabel>
            <skos:definition>city</skos:definition>
          </rdf:Description>
        </rdf:li>
        <rdf:li>
          <rdf:Description rdf:about="http://rdf.vidispine.com/id/#gid0">
            <skos:prefLabel>Manchester</skos:prefLabel>
            <skos:definition>city</skos:definition>
          </rdf:Description>
        </rdf:li>
      </rdf:Bag>
    </skos:member>
    <skos:definition>country</skos:definition>
  </rdf:Description>
</rdf:RDF>

Update or create a dataset

PUT /metadata/dataset/(name)

Updates or creates the existing dataset with the specified name.

Query Parameters:
  • id-seed (string) –

    A property name in the RDF model.

    If the id of a subject is not provided in the model, the value of this property will be used to generate an id for this subject.

    If not set or the subject doesn’t have this property, a random id will be generated.

Accepts:
  • application/rdf+xml, text/turtle, application/ld+json – The RDF model.

Produces:
  • application/rdf+xml, text/turtle, application/ld+json – The RDF model.

Role:

_metadata_dataset_write

Example

PUT /metadata/dataset/testmodel1?id-seed=skos:prefLabel
<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:skos="http://www.w3.org/2004/02/skos/core#">
   <rdf:Description>
     <skos:definition>country</skos:definition>
     <skos:member>
       <rdf:Bag>
         <rdf:li>
           <rdf:Description>
             <skos:definition>city</skos:definition>
             <skos:prefLabel>London</skos:prefLabel>
           </rdf:Description>
         </rdf:li>
         <rdf:li>
           <rdf:Description>
             <skos:definition>city</skos:definition>
             <skos:prefLabel>Manchester</skos:prefLabel>
           </rdf:Description>
         </rdf:li>
       </rdf:Bag>
     </skos:member>
     <skos:prefLabel>United Kingdom</skos:prefLabel>
   </rdf:Description>
 </rdf:RDF>

Response:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:vidi="http://rdf.vidispine.com/id/#">
  <rdf:Description rdf:about="http://rdf.vidispine.com/id/#unitedkingdom">
    <skos:prefLabel>United Kingdom</skos:prefLabel>
    <skos:member>
      <rdf:Bag rdf:about="http://rdf.vidispine.com/id/#gid0">
        <rdf:li>
          <rdf:Description rdf:about="http://rdf.vidispine.com/id/#london">
            <skos:prefLabel>London</skos:prefLabel>
            <skos:definition>city</skos:definition>
          </rdf:Description>
        </rdf:li>
        <rdf:li>
          <rdf:Description rdf:about="http://rdf.vidispine.com/id/#manchester">
            <skos:prefLabel>Manchester</skos:prefLabel>
            <skos:definition>city</skos:definition>
          </rdf:Description>
        </rdf:li>
      </rdf:Bag>
    </skos:member>
    <skos:definition>country</skos:definition>
  </rdf:Description>
</rdf:RDF>

Delete a dataset

DELETE /metadata/dataset/(name)

Removes the metadata dataset with the specified name.

Role:

_metadata_dataset_write