Skip to main content
POST
/
tag
cURL
curl --request POST \
  --url https://api.opal.dev/v1/tag \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "tag_key": "api-scope",
  "tag_value": "production"
}'
{
  "tag_id": "f290a738-5f9f-43c2-ad67-fa31ff0eb946",
  "created_at": "2022-01-23T04:56:07.000Z",
  "updated_at": "2022-02-23T01:34:07.000Z",
  "user_creator_id": "d4a7d928-783e-4599-8ec6-088d635a5bcc",
  "key": "database-name",
  "value": "redis_db"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

tag_key
string
deprecated

The key of the tag to create.

tag_value
string
deprecated

The value of the tag to create.

admin_owner_id
string<uuid>
deprecated

The ID of the owner that manages the tag.

Body

application/json

CreateTagInfo Object

Description

The CreateTagInfo object is used to represent configuration for a new tag.

Usage Example

Use in the POST Tag endpoint.

tag_key
string
required

The key of the tag to create.

Example:

"api-scope"

tag_value
string

The value of the tag to create.

Example:

"production"

Response

200 - application/json

The tag that was created.

Tag Object

Description

The Tag object is used to represent a tag.

Usage Example

Get tags from the GET Tag endpoint.

tag_id
string<uuid>
required

The ID of the tag.

Example:

"f290a738-5f9f-43c2-ad67-fa31ff0eb946"

created_at
string<date-time>

The date the tag was created.

Example:

"2022-01-23T04:56:07.000Z"

updated_at
string<date-time>

The date the tag was last updated.

Example:

"2022-02-23T01:34:07.000Z"

user_creator_id
string<uuid>

The ID of the user that created the tag.

Example:

"d4a7d928-783e-4599-8ec6-088d635a5bcc"

key
string

The key of the tag.

Example:

"database-name"

value
string

The value of the tag.

Example:

"redis_db"