Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...


Excerpt

Fetch terms


Endpoint ID:

2100

Method:

Status
colourGreen
titleGET

URL:

/permissions/terms/{termsID}


termsID

OPTIONAL: A GUID string identifier for the terms

Request body:None Spanstylewhite-space: nowrap


?versionStates

OPTIONAL: A comma-separated list of version states to include. When this query-string parameter is present at contains at least one state, only terms versions matching a requested state will be returned.

States: Active, Inactive, Obsolete, Draft
e.g.: ?versionStates=active,draft


?versionFields

OPTIONAL: A comma-separated list of version fields to include. When this query-string parameter is present, terms version output will only include the named fields.
Fields: version, state, consents

Request body:

None

Response body:


JSON data with information about terms.

Code Blocktitle

/permissions/terms – Two terms exists
Code Block
languagejson
{
    "terms": [
        {
            "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
            "name": "Some terms",
            "description": "This explains everything",
            "versions": [
                {
                    "version": "1.0",
                    "state": "Draft",
                    "consents": [
                        {
                            "id": "584254a8-a401-4f84-8068-92f173dce72e",
                            "name": "E-mail"
                        },
                        {
                            "id": "7a0e1921-ce0e-4c97-86b9-650a93fad2dd",
                            "name": "
draft
SMS"
                        }
                    ]
                }
            ]
        },
        {
            "id": "1f788c79-7dde-407f-a976-6b08ffb4c75a",
            "name": "Some other terms",
            "description": "This explains these terms",
            "versions": [
                {
                    "version": "2.0",
                    "state": "Active",
               
"active"
     "consents": [
                        {
                            "id": "584254a8-a401-4f84-8068-92f173dce72e",
                            "name": "E-mail"
                        },
                        {
                            "id": "7a0e1921-ce0e-4c97-86b9-650a93fad2dd",
                            "name": "SMS"
                        }
                    ]
                },
                {
                    "version": "1.0",
                    "state": "
obsolete"
Obsolete",
                    "consents": [
                        {
                            "id": "584254a8-a401-4f84-8068-92f173dce72e",
                            "name": "E-mail"
                        }
                    ]
                }
            ]
        }
    ]
}
Code Blocktitle
/terms/permission – No terms exists
Code Block
languagejson
{
    "terms": []
}
/terms/permission?versionStates=active&versionFields=version,state - Two terms exist, limit version output
Code Block
languagejson
{
    "terms": [
        {
            "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
            "name": "Some terms",
            "description": "This explains everything",
            "versions": []
        },
        {
            "id": "1f788c79-7dde-407f-a976-6b08ffb4c75a",
            "name": "Some other terms",
            "description": "This explains these terms",
            "versions": [
                {
                    "version": "2.0",
                    "state": "Active"
                }
            ]
        }
    ]
}
Note

When a termsID parameter is included in the request, an empty terms array will never be returned - either the requested terms object will be returned, or a 404 response.

Code Blocktitle
/permissions/terms/7a6776a3-9411-4d34-9866-99aa9ac7cc27 – Specific terms found
Code Block
languagejson
{
    "terms": [
        {
            "id": "7a6776a3-9411-4d34-9866-99aa9ac7cc27",
            "name": "Some terms",
            "description": "This explains everything",
            "versions": [
                {
                    "version": "1.0",
                    "state": "
draft
Draft"
                }
            ]
        }
    ]
}

Status codes:

200

OK


404

Terms not found - only returned when a termsID parameter is included in the request