Skip to content

Conversation

drazzilb91
Copy link

@drazzilb91 drazzilb91 commented Dec 22, 2023

This pull request clarifies the key to use when releasing attributes in the Exist API. The documentation previously mentioned using the https://exist.io/api/2/attributes/release/ endpoint, but it didn't specify that the name key should be used instead of template. This update ensures that developers have the correct information when releasing attributes.

Earlier in the documentation, when acquiring attributes, both name and template are mentioned as valid keys to use. The documentation states:

For most API endpoints, we'll be sending and receiving JSON. To acquire attributes, we send a JSON body with an array of objects, each one with a key of either name or template and the value being the attribute name.

[{"template": "pages_read", "manual": false}]

The documentation also indicates that releasing attributes uses the same format as acquiring attributes. This is incorrect, as using template will result in the following failed response from the API:

{
 "success": [],
 "failed": [
  {
   "template": "pages_read",
   "manual": "false",
   "error": "Object at index 0 is missing field 'name'",
   "error_code": "missing_field"
  }
 ]
}

A wording change in the documentation clarifies that regardless of how the attribute was acquired, the name key is required when releasing attributes.

@drazzilb91 drazzilb91 marked this pull request as ready for review December 22, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants