Library Attributes

Get all Attributes

This endpoint retrieves a list of Attributes.

GET /api/v2/library/attributes/

Query Parameters

The following parameters may be used to filter the Attributes in the response.

Parameter Description
search Filter attributes by performing a textual search on its ID, name or description.
depth The depth of the attributes tree to return.
parent Filter attributes by their parent attribute. Returns all children of the parent.
name Filter attributes by their name.
description Filter attributes by their description.

GET /api/v2/library/attributes/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [
        {
            "id": "AT1",
            "name": "An Attribute",
            "description": "A description for the attribute",
            "created": "2023-08-03T17:02:37.087247-04:00",
            "updated": "2023-08-11T10:43:46.174984-04:00",
            "active": true,
            "parent": "CAT1",
            "path": [
                "CAT1",
                "AT1"
            ],
            "depth": 1,
            "db_id": 1
        },
        {
            "id": "CAT1",
            "name": "Custom Attribute",
            "description": "A description for the custom attribute",
            "created": "2023-08-08T11:07:07.134521-04:00",
            "updated": "2023-08-08T11:07:07.134407-04:00",
            "active": true,
            "parent": null,
            "path": [
                "CAT1"
            ],
            "depth": 0,
            "db_id": -1
        }
    ]
}

Expand parameters

See the Expand Parameters section for more details.

Parameter Description
path Expand the path list of each Attribute
GET /api/v2/library/attributes/?expand=path HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [
        {
            "id": "AT1",
            "name": "An Attribute",
            "description": "A description for the attribute",
            "created": "2023-08-03T17:02:37.087247-04:00",
            "updated": "2023-08-11T10:43:46.174984-04:00",
            "active": true,
            "parent": "CAT1",
            "path": [
                {"id": "CAT1", "name": "Custom Attribute"},
                {"id": "AT1", "name": "An Attribute"}
            ],
            "depth": 1,
            "db_id": 1
        },
        {
            "id": "CAT1",
            "name": "Custom Attribute",
            "description": "A description for the custom attribute",
            "created": "2023-08-08T11:07:07.134521-04:00",
            "updated": "2023-08-08T11:07:07.134407-04:00",
            "active": true,
            "parent": null,
            "path": [
                {"id": "CAT1", "name": "Custom Attribute"}
            ],
            "depth": 0,
            "db_id": -1
        }
    ]
}

Get a specific Attribute

This endpoint retrieves a specific Attribute.

GET /api/v2/library/attributes/{attribute_id}/

URL Parameters

Parameter Description
attribute_id The id of the Attribute to retrieve.
GET /api/v2/library/attributes/AT1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": "AT1",
    "name": "An Attribute",
    "description": "A description for the attribute",
    "created": "2023-08-03T17:02:37.087247-04:00",
    "updated": "2023-08-11T10:43:46.174984-04:00",
    "active": true,
    "parent": "CAT1",
    "path": [
        "CAT1",
        "AT1"
    ],
    "depth": 1,
    "db_id": 1
}

results matching ""

    No results matching ""