API Reference

Create a new tag

Description

Creates a tag. If another tag already has the same key, returns a 409.

POST /api/v1/tag

🚧

Required OAuth Scopes:

No OAuth scopes are required to use this endpoint.

Parameters

ParameterInTypeRequiredDescription
bodybodyTagDtofalseThe representation of the tag to create

Body parameter example

{
  "key": "string",
  "values": [
    "string"
  ]
}

Code Samples

curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/tag  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/prep/api/v1/tag  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/tag" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/tag', headers = headers)

print(r.json())

Returns

201 - Created

Returns a JSON object with a body property, which contains a TagDto object for the created tag.

Example Responses


{
  "body": {
    "created": "string",
    "id": "string",
    "key": "string",
    "updated": "string",
    "userId": "string",
    "values": [
      "string"
    ],
    "version": "integer"
  },
  "code": "integer"
}