Metadata

Custom metadata name-value pairs associated with Item objects

Get Metadata by ID

GET https://account.sf-api.com/sf/v3/Metadata(name=name,itemid=itemid) 

Retrieves a single Metadata entry that has a given Name for a given Item. Note:

'GET https://account.sf-api.com/sf/v3/Items(parentid)/Metadata(id)

' is unsupported. Current routing doesn't support the URI to retrieve a single Metadata enntry since it is aliased with the GetByItem feed. So for now we support only the same syntax as for AccessControls, i.e. .../Metadata(name=name,itemid=itemid)

nameString Metadata Identifier - the Name of the metadata entry
itemidString Item Identifier

Returns: A single Metadata object matching the query

Get Metadata List By Item

GET https://account.sf-api.com/sf/v3/Items(id)/Metadata 

Retrieves the Metadata List for a given Item.

idString Item identifier

Returns: The Metadata list of the given object ID.

Create Metadata

POST https://account.sf-api.com/sf/v3/Items(id)/Metadata 
            { 
            "Name":"metadata name", 
            "Value":"metadata value" 
            } 

Creates a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name already exists for this Item.

idString Item Identifier
metadataMetadata Metadata object

Returns: The created Metadata object

Update Metadata

PATCH https://account.sf-api.com/sf/v3/Items(id)/Metadata(metadataId) 
            { 
            "Value":"metadata value" 
            } 

Updates a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name doesn't exist for this Item.

idString Item Identifier
metadataIdString Metadata Identifier - the Name of the metadata entry
metadataMetadata Metadata object

Returns: The updated Metadata object

Update Metadata

PATCH https://account.sf-api.com/sf/v3/Metadata(name=name,itemid=itemid) 
            { 
            "Value":"metadata value" 
            } 

Updates a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name doesn't exist for this Item.

nameString Metadata Identifier - the Name of the metadata entry
itemidString Item Identifier
metadataMetadata Metadata object

Returns: The updated Metadata object

Update Item Metadata

PATCH https://account.sf-api.com/sf/v3/Items(id)/Metadata 
            [{ 
                "Value":"metadata value" 
            },{ 
                "Value":"metadata value" 
            }] 

Update the item corresponding to the supplied id with the provided key-value Metadata models. If a metadata key is not already associated with the item, the item is updated with the new key-value pair.

idString Item Identifier
metadataMetadata[] List of metadata objects

Returns: The updated Metadata list for the given object ID.

Delete Metadata

DELETE https://account.sf-api.com/sf/v3/Items(id)/Metadata(metadataId) 

Deletes a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name doesn't exist for this Item.

idString Item Identifier
metadataIdString Metadata Identifier - the Name of the metadata entry

Returns: (no data)

Delete Metadata

DELETE https://account.sf-api.com/sf/v3/Metadata(name=name,itemid=itemid) 

Deletes a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name doesn't exist for this Item.

nameString Metadata Identifier - the Name of the metadata entry
itemidString Item Identifier

Returns: (no data)