Metadata

/metadatadefinition

GET Retrieve a list of metadata definitions

{{base_url}}/v1/metadatadefinitions?page[limit]&page[offset]&sort&filter[name]=&include=

curl --location --request GET "{{base_url}}/v1/metadatadefinitions?page%5Blimit%5D&page%5Boffset%5D&sort&filter%5Bname%5D=&include=" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

page[limit]

Limit the amount of results returned

page[offset]

Return this page of the results

sort

Sort results by this attribute

filter[name]

Filter results by this attribute

include

Include additional related resources. Possible values: metadata.

POST Add a new metadata definition

{{base_url}}/v1/metadatadefinitions

Example Request:

curl --location --request POST "{{base_url}}/v1/metadatadefinitions" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"metadatadefinition\",
\"attributes\": {
\"name\": \"Test definition\",
\"fields\": [
{
\"name\": \"country\",
\"type\": \"string\"
}
]
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)

{
"data": {
"type": "metadatadefinition",
"attributes": {
"name": "Test definition",
"fields": [
{
"name": "country",
"type": "string"
}
]
}
}
}

GET Retrieve a metadata definition

{{base_url}}/v1/metadatadefinitions/{{metadatadefinition_id}}/?include

Example Request:

curl --location --request GET "{{base_url}}/v1/metadatadefinitions/{{metadatadefinition_id}}/?include" \
--header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

include

Include additional related resources.

PATCH Update a metadata definition

{{base_url}}/v1/metadatadefinitions/:metadata_definition_id

Example Request:

curl --location --request PATCH "{{base_url}}/v1/metadatadefinitions/:metadata_definition_id" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"metadatadefinition\",
\"id\": \"{{metadatadefinition_id}}\",
\"attributes\": {
\"name\": \"Modified test definition - 97c5808f-12df-4a91-9ff4-72ae526c7242\",
\"fields\": [
{
\"name\": \"country\",
\"type\": \"string\"
},
{
\"name\": \"city\",
\"type\": \"string\"
}
]
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

PATH VARIABLES

metadata_definition_id

{{metadatadefinition_id}}

BODY (raw)
{
"data": {
"type": "metadatadefinition",
"id": "{{metadatadefinition_id}}",
"attributes": {
"name": "Modified test definition - d4d62528-bba9-4275-9dea-d47405f50c5c",
"fields": [
{
"name": "country",
"type": "string"
},
{
"name": "city",
"type": "string"
}
]
}
}
}

DEL a metadata definition

{{base_url}}/v1/metadatadefinitions/{{metadatadefinition_id}}

Example Request:

curl --location --request DELETE "{{base_url}}/v1/metadatadefinitions/{{metadatadefinition_id}}" \
            --header "Accept: application/json"

HEADERS

Accept

application/json

BODY (formdata)


/metadata

POST Add new metadata

{{base_url}}/v1/metadata

Example Request:

curl --location --request POST "{{base_url}}/v1/metadata" \
--header "Content-Type: application/json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"metadata\",
\"attributes\": {
\"values\": {
\"country\": \"The Netherlands\"
}
},
\"relationships\": {
\"definition\": {
\"data\": {
\"type\": \"metadatadefinition\",
\"id\": \"{{metadatadefinition_id}}\"
}
}
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)

{
"data": {
"type": "metadata",
"attributes": {
"values": {
"country": "The Netherlands"
}
},
"relationships": {
"definition": {
"data": {
"type": "metadatadefinition",
"id": "{{metadatadefinition_id}}"
}
}
}
}
}

GET Retrieve a list of metadata

{{base_url}}/v1/metadata?page[limit]&page[offset]&sort&filter[name]=&include=

curl --location --request GET "{{base_url}}/v1/metadata?page%5Blimit%5D&page%5Boffset%5D&sort&filter%5Bname%5D=&include=" \
            --header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

page[limit]

Limit the amount of results returned

page[offset]

Return this page of the results

sort

Sort results by this attribute

filter[name]

Filter results by this attribute

include

Include additional related resources. Possible values: definition, accounts.

GET Retrieve metadata

{{base_url}}/v1/metadata/{{metadata_id}}/?include=
          

curl --location --request GET "{{base_url}}/v1/metadata/{{metadata_id}}/?include=" \
            --header "Accept: application/vnd.api+json"

HEADERS

Accept

application/vnd.api+json

PARAMS

include

Include additional related resources.

BODY (formdata)

PATCH Update metadata

{{base_url}}/v1/metadata/{{metadata_id}}

Example Request:

curl --location --request PATCH "{{base_url}}/v1/metadata/{{metadata_id}}" \
--header "Content-Type: application/vnd.api+json" \
--header "Accept: application/vnd.api+json" \
--data "{
\"data\": {
\"type\": \"metadata\",
\"id\": \"{{metadata_id}}\",
\"attributes\": {
\"values\": {
\"country\": \"The Netherlands\",
\"city\": \"Zeist\"
}
}
}
}"

HEADERS

Content-Type

application/json

Accept

application/vnd.api+json

BODY (raw)
{
"data": {
"type": "metadata",
"id": "{{metadata_id}}",
"attributes": {
"values": {
"country": "The Netherlands",
"city": "Zeist"
}
}
}
}

DEL metadata

{{base_url}}/v1/metadata/{{metadata_id}}

Example Request:

curl --location --request DELETE "{{base_url}}/v1/metadata/{{metadata_id}}" \
--header "Accept: application/json"

HEADERS

Accept

application/json

BODY (formdata)


How did we do?