CentralCSP
APIWebsite Tags

Update a website tag

Changes a tag's name, description or colour. Only the fields you send are changed. Every website carrying the tag shows the change.

Requires the admin role on the workspace.

PATCH
/v1/workspaces/{workspaceId}/website-tags/{tagId}

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

tagId*string

The tag's id.

Request Body

application/json
  1. body

Only the fields you send are changed. Send description: null to clear it.

name?string

Tag name, unique within the workspace.

Match\S
Length1 <= length <= 100
description?|

What the tag is for, or null.

color?TagColor

Colour the tag is shown in.

Value in"slate""blue""cyan""teal""green""lime""yellow""orange""red""pink""purple"

Response Body

A label for websites, shared by every website in the workspace.

application/json
  1. response
id*string

Unique identifier of the tag.

name*string

Tag name.

color*TagColor

Colour the tag is shown in.

Value in"slate""blue""cyan""teal""green""lime""yellow""orange""red""pink""purple"
description*|

What the tag is for, or null.

workspaceId*string

The workspace the tag belongs to.

websiteCount*|

How many of the websites you can access carry the tag.

Range0 <= value
createdAt*string

When the tag was created.

Formatdate-time
updatedAt*string

When the tag was last changed.

Formatdate-time
Example Request
curl -X PATCH 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/website-tags/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "production",  "color": "slate",  "description": "Sites customers reach today.",  "workspaceId": "string",  "websiteCount": 3,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}