Metadata mechanism metadata-mechanism
You can retrieve the resources metadata using resourceType in a GET request:
GET /profileAndServices/resourceType/<resourceName>
The response returns the main metadata from the resource (all other fields are descriptive or internal):
-
The Content node returns the resource鈥檚 fields. For each field in the content node, we can find the following fields:
-
鈥渁piName鈥�: name of the attribute used in the APIs.
-
鈥渢ype鈥�: this is the high-level type definition (string, number, link, collection, enumeration鈥�).
-
鈥渄ataPolicy鈥�: the value of the field must follow the given policy rules. For example, if dataPolicy rule is set to 鈥渆mail鈥�, the value must be a valid email. During a PATCH or a POST, the dataPolicy can check the value or modify the value to transform (smartCase for example).
-
鈥渃ategory鈥�: gives the category of the field in the query editor.
-
鈥渞esType鈥�: this the technical type.
If 鈥渢ype鈥� is completed with the value 鈥渓ink鈥� or 鈥渃ollection鈥�, the resTarget value is the name of the resource targeted by the link.
If 鈥渢ype鈥� is completed with the value 鈥渆numeration鈥�, a 鈥渧alues鈥� field is added and each enumeration value are detailed in the values node.
-
-
The Filters node returns the URL to retrieve the associated filters. For more on filters, refer to this section section.
Sample request
Perform a GET request on the resource.
-X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/profile \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Cache-Control: no-cache' \
-H 'X-Api-Key: <API_KEY>'
It returns the complete description of the profile resource.
{
...
"content": {
"email": {...},
...
},
"data": "/profileAndServices/profile/",
"filters": {
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/resourceType/<PKEY>"
},
"help": "Identified profiles",
"href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/metadata",
"label": "Profiles",
"mandatory": false,
"name": "profile",
"pkgStatus": "never",
"readOnly": false,
"schema": "nms:recipient",
"type": "item"
}