/policyengine/v1/tags/: POST
Updates tags definitions.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Collection user | Admin | Service user |
---|---|---|---|---|---|
✓1 | ✓2 | ✓ | X | Χ | Χ |
1 Has read/write access to
'Open' , 'Restricted' , and 'Characteristics' types
of tags.2 Has read-only access to 'Open' and
'Restricted' types of tags, and read/write access to
'Characteristics' tags. |
To create an
'Open'
tag, run this command:
$ curl -k -H "Authorization: Bearer <token>" https://<spectrum_discover_host>:443/policyengine/v1/tags -d '{"tag": "project", "type": "Open"}' -X POST -H "Content-Type: application/json"
Synopsis of the request URL
$ curl -k -H "Authorization: Bearer <token>"
https://<spectrum_discover_host>:443/policyengine/v1/tags -d '{"tag": "department",
"type": "Restricted", "value": ["Finance", "HR", "IT"]' -X POST -H "Content-Type:
application/json"
$ curl -k -H "Authorization: Bearer <token>"
https://<spectrum_discover_host>:443/policyengine/v1/tags -d '{"tag": "annotations",
"type": "Characteristics"}' -X POST -H "Content-Type: application/json"
Supported request types and response formats
Supported request types:
- POST
- Specify one of the following tag
"type"
options:"Open" | "Restricted" | "Characteristics"
Note:
"Open"
allows the unrestricted setting of tag values with a maximum string length of 256 characters."Restricted"
allows the definition of specified tag values with a maximum string length of 256 characters."Characteristics"
allows the definition of unspecified tag values with a maximum string length of 4096 characters.
Supported response formats:
- JSON