Query attribute definitions ids
| /pim/attribute-definitions/query Gets attribute definition ids by allowed criteria. |
Allows to get attribute definitions ids by:
-
By type
Resource path |
/api/core/v1/pim/attribute-definitions/query |
HTTP method |
POST |
Request content type |
application/json; |
Response content type |
application/json; |
Body parameters
Accepts AttributeDefinitionsQueryRequest
Return Type
Filled with attribute definitions ids AttributeDefinitionsRequest
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Found attribute definitions ids |
|
400 |
Invalid input error ResponseType |
|
401 |
Not authorized |
|
500 |
Error in ResponseType |
Samples
To get a list of attribute definitions ids by types
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/query' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"types": ["text", "date", "number", "boolean", "ref", "table"]
} '
Request body
{
"types": ["text", "date", "number", "boolean", "ref", "table"]
}
Response body
{
"ids": [
15210,
15211,
15212,
15213,
15214,
15215,
15216,
15217,
15218,
15219,
15310,
15311,
15313,
15314,
15315,
15316,
15317,
15318,
30160,
30161
],
"all": false
}
List of types is empty
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/attribute-definitions/query' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"types": []
} '
Request body
{
"types": []
}
Response body
{
"all": false
}