APITags

Create tag

Create a new tag.

POST
/tags

Create a new tag.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_tags

Request Body

application/json
  1. body

Fields for creating a tag.

namespace*TagNamespace

Which kind of entity a tag can be applied to. A tag belongs to exactly one namespace.

Value in"agent""resource"
name*string

Label text, unique within the namespace.

Length1 <= length <= 50
color*TagColor

Color a tag is displayed with.

Value in"red""orange""amber""yellow""lime""green""emerald""teal""cyan""sky""blue""violet"

Response Body

The request has succeeded and a new resource has been created as a result.

application/json
  1. response

A named, colored label attached to agents or resources, used to write policy rules that match a class of entities instead of naming each one. A tag's name must be unique within its namespace, and its namespace is fixed once created.

id*string
Formatuuid
namespace*TagNamespace

Which kind of entity a tag can be applied to. A tag belongs to exactly one namespace.

Value in"agent""resource"
name*string

Label text, unique within the namespace.

Length1 <= length <= 50
color*TagColor

Color a tag is displayed with.

Value in"red""orange""amber""yellow""lime""green""emerald""teal""cyan""sky""blue""violet"
system*boolean

Built-in tags are maintained by the product and cannot be changed. SecureAuth applies them to catalog tools, and you can assign them to any tool.

description?string

What a built-in tag means. Only set on built-in tags.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X POST "https://example.com/tags" \  -H "Content-Type: application/json" \  -d '{    "namespace": "agent",    "name": "string",    "color": "red"  }'
{  "id": null,  "namespace": "agent",  "name": "string",  "color": "red",  "system": true,  "description": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}