CustomMetaData
Get All Custom Metadata GET /custommetadata/
Description
Request all custom metadata fields.
Properties
Title
Get all custom metadata fields
URL
/custommetadata/
Method
GET
Headers
Name | Value | Required | Description |
---|---|---|---|
Authorization | Token xxxxx | yes | Authorization token required to communicate with the API. |
URL Params
Name | Type | Required | Description |
---|---|---|---|
limit | integer | no | Limit the number of objects to return. |
offset | integer | no | Do not return the first x objects, where x is the amount specified by offset. |
content_type_name | string | no | Filter parameter to only list custom metadata fields of a certain content type with the given |
content_type_id | number | no | Filter parameter to only list custom metadata fields of a certain content type with the given content_type_id . This parameter SHOULD NOT be used with content_type_name parameter. |
Success Response
200 - OK
[ { "id": 1, "key": "company.cvams.director", "value": "Video Director", "order": 1, "custom_metadata_set": 1, "validation_rule": null }, ... ]
Sample Call
curl -X GET http://medialoopster-url/api/custommetadata/
Get Single Custom Metadata GET /custommetadata/{id}/
Description
Request a single custom metadata field.
Properties
Title
Get single custom metadata field
URL
/custommetadata/{id}/
Method
GET
Headers
Name | Value | Required | Description |
---|---|---|---|
Authorization | Token xxxxx | yes | Authorization token required to communicate with the API. |
Success Response
200 - OK
{ "id": 1, "key": "company.cvams.director", "value": "Video Director", "order": 1, "custom_metadata_set": 1, "validation_rule": null }
Error Response
404 - Not Found
{ "errors": [ { "status": "404", "code": "not_found", "detail": "CustomMetadata object with pk=u'{id}' does not exist.", "title": "Not Found" } ] }
Sample Call
curl -X GET http://medialoopster-url/api/custommetadata/1/
Create Custom MetadataPOST /custommetadata/
Work in progress!
Description
Create a new custom metadata field.
Properties
Title
Create custom metadata field
URL
/custommetadata/
Method
POST
Headers
Name | Value | Required | Description |
---|---|---|---|
Authorization | Token xxxxx | yes | Authorization token required to communicate with the API. |
Content-Type | application/json | no | If the request body is sent as raw data instead of form-data this header needs to be set as well. |
Data Params
Name | Type | Required | Description |
---|---|---|---|
key | string | yes | A unique key representing the custom metadata field. |
value | string | yes | A human readable name for the custom metadata field. |
custom_metadata_set | yes | Collection of custom metadata fields. |
Success Response
200 - OK
Error Response
400 - Bad Request
{ "errors": [ { "status": "400", "source": { "pointer": "/key" }, "code": "required", "detail": "This field is required.", "title": "Validation Error" }, { "status": "400", "source": { "pointer": "/custom_metadata_set" }, "code": "required", "detail": "This field is required.", "title": "Validation Error" }, { "status": "400", "source": { "pointer": "/value" }, "code": "required", "detail": "This field is required.", "title": "Validation Error" } ] }
Sample Call
curl -X POST http://medialoopster-url/api/custommetadata/ \ -d '{ "key": "company.custom.key", "value": "My custom metadata field", "custom_metadata_set": 1 }'