Global metadata¶
Global metadata is metadata that is not associated with any item or collection. It can primarily be used as a reference, for example holding a field that is referenced from many items.
Retrieve the global metadata¶
-
GET
/metadata
¶ Retrieves the global metadata.
Query Parameters: - interval (string) –
Comma-separated list
- time-span - Filter out metadata, return only metadata for specified time span.
generic
- Return all non-timed metadata.all
(default) - Return all metadata, same asinterval=generic,-INF-+INF
result
- Can be used when retrieving metadata from a search result. Will return time spans that overlap with the search result. (New in 5.5.)
- field (string) –
Comma-separated list.
- field-name - Return specified field.
- field-name ”:” new-name - Return specified field, renamed to a new name in return value.
- “-” field-name - Exclude specified field.
- (default) - Return all fields.
- group (string) –
Comma-separated list.
- group-name - Return specified group.
- group-name
+
- Return specified group and subgroups. - group-name
:
new-name - Return specified group, renamed to a new name in return value. -
group-name - Exclude specified group.- (default) - Return all groups.
- track (string) –
Comma-separated list.
- track-type track-number -
Return metadata for specified track. Example of track is
A2
. - track-type t1
-
t2 - Return metadata for specified track interval, e.g.A2-4
. - track-type
*
- Return metadata for all tracks of specified type, e.g.A*
. generic
- Return all non-tracked metadata.all
(default) - All metadata, with or without track specification, are returned.
- track-type track-number -
Return metadata for specified track. Example of track is
- language (string) –
Comma-separated list.
- language-tag -
Return metadata for specific language, e.g.
en_US
. Wildcards may be used, e.g.*_CA
for both Canadian French and Canadian English. none
- Return all metadata without language specification.all
(default) - Return all metadata, with or without language specification.
- language-tag -
Return metadata for specific language, e.g.
- samplerate (string) – Convert all outgoing time instants to specified rate. NB! Time codes which cannot be expressed in an integer number of samples will be returned as a decimal number, with risk of losing precision.
- conflict (string) –
yes
(default) - Include all metadata conflicts, unresolved.no
- Return conflicts resolved according to field rules.
- include (string) – A list of keys. Includes additional field specific data.
Additionally, if set to
type
the type definition of the field will be retrieved. - defaultValue (boolean) –
true
- For unset fields, return default values.false
(default) - Do not return default values.
- includeConstraintValue (string) –
Comma-separated list of fields whose “display value” should be retrieved from the metadata dataset.
all
(default) - Return the “display value” of all fields.none
- No “display value” will be returned.- comma-separated field names - Return the “display value” of the specified fields.
- includeExtraData (string) –
New in version 22.3.
Comma-separated list of fields whose extraData should be retrieved from the metadata dataset.
all
(default) - Return extraData of all fields.none
- No extraData will be returned.- comma-separated field names - Return the extraData of the specified fields.
Produces: - application/xml, application/json – MetadataDocument
Role: _metadata_global_read
- interval (string) –
Update the global metadata¶
-
PUT
/metadata
¶ Modifies the global metadata. This resource shares the same query parameters as the item metadata resource.
Query Parameters: - revision (string) – The known revision. If not specified, the change set will attempt to override existing change sets.
- skipForbidden (boolean) – Skip fields or groups that the user doesn’t have write access to. Default is
false
- onlyReturnChanges (boolean) –
New in version 4.16.6.
true
- Only return the changed entries.false
(default) - Return the whole global metadata after the update.
Accepts: - application/xml, application/json – MetadataDocument
Produces: - application/xml, application/json – MetadataDocument
Retrieve metadata by UUID¶
-
GET
/metadata/
(uuid)¶ Retrieves the metadata entry that matches the UUID.
Produces: - application/xml, application/json – MetadataEntryDocument
Role: _metadata_global_read
This call can also be used on item or collection metadata. Though it requires different rights to be successful. You will need to have at least have access to the item or collection, which contains the specific metadata entry.
Example¶
GET /metadata/c3dc7918-9316-4fef-b4fc-ff2b0149e854
<MetadataEntryDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<field uuid="c3dc7918-9316-4fef-b4fc-ff2b0149e854" user="system" timestamp="2011-01-10T10:00:54.845+01:00" change="VX-7">
<name>originalVideoCodec</name>
<value uuid="199255d8-59ec-421e-9c7b-757c46c92b14" user="system" timestamp="2011-01-10T10:00:54.845+01:00" change="VX-7">h264</value>
</field>
</MetadataEntryDocument>
GET /metadata/199255d8-59ec-421e-9c7b-757c46c92b14
<MetadataEntryDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<value uuid="199255d8-59ec-421e-9c7b-757c46c92b14" user="system" timestamp="2011-01-10T10:00:54.845+01:00" change="VX-7">h264</value>
</MetadataEntryDocument>
Remove metadata by UUID¶
-
DELETE
/metadata/
(uuid)¶ Removes the metadata with the specified UUID.
Role: _metadata_global_write (global metadata) Role: _metadata_write (item or collection metadata)
This call can also be used on item or collection metadata. Though it requires a different set of roles and rights to be successful. For items you need to be allowed to write metadata on the specific item. For collections you need to be allowed to have write access to the collection
Additionally, there is a different role in place, when you want to target metadata on item or collection metadata.