Metadata Fields

Order the datasource values of a metadata field

POST
/v1_1/{cloud_name}/metadata_fields/{external_id}/datasource/order

Reorders the allowed values (the datasource) of a metadata field according to the given field and direction. This is the backward-compatible variant of the order endpoint.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

external_id*string

The external ID of the metadata field whose datasource is reordered.

Request Body

application/json

The ordering criteria for the datasource values.

The ordering criteria for a metadata field's datasource values.

order_by*string

The datasource value attribute to sort by (for example, "value" or "external_id").

direction?string

The sort direction for the datasource values. Default is "asc".

Value in

  • "asc"
  • "desc"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1_1/my_cloud/metadata_fields/string/datasource/order" \  -H "Content-Type: application/json" \  -d '{    "order_by": "string"  }'
{  "values": [    {      "external_id": "string",      "value": "string"    }  ]}