Update a Tag

PATCH /tags/{tag_name}

Update an existing tag resource.

You may archive a tag by setting the value of is_active to false. Archived tags remain linked to existing records but cannot be associated with new ones. If needed, archived tags can be reactivated by setting the value of is_active to true.

Headers

  • Authorization string Required

    Authorize your API calls with an Arta API token

Path parameters

  • tag_name string Required

    The name field for a tag resource

application/json

Body

  • tag object Required
    Hide tag attributes Show tag attributes object
    • color string

      The hexadecimal color code for the tag, without the leading #.

      Minimum length is 6, maximum length is 6. Format should match the following pattern: ^[0-9A-F]{6}$.

    • description string | null

      An optional, brief description for this tag.

      Maximum length is 255.

    • is_active boolean | null

      Indicates whether or not the tag is active. Inactive tags may not be associated to new resources.

    • name string

      The name for the tag. It may contain lower case letters, dashes, and alphanumeric characters only. The maximum character count is 50.

      Maximum length is 50. Format should match the following pattern: ^[a-z0-9-]{1,50}$.

Responses

  • 200 application/json

    A succesfully updated tag

    Hide response attributes Show response attributes object
    • color string

      The hexadecimal color code for the tag, without the leading #.

    • A NaiveDatetime-formatted timestamp describing when the tag was created with microsecond precision.

    • created_by integer | null

      The user ID associated with the user who created the tag when applicable.

    • description string | null

      An optional, brief description for this tag.

    • id string

      A UUID identifier for the tag.

    • is_active boolean

      Indicates whether or not the tag is active. Inactive tags may not be associated to new resources.

    • name string

      The name for the tag. It may contain lower case letters, dashes, and alphanumeric characters only. The maximum character count is 50.

    • A NaiveDatetime-formatted timestamp describing when the tag was created with microsecond precision.

    • updated_by integer | null

      The user ID associated with the last user to edit the tag when applicable.

PATCH /tags/{tag_name}
curl \
 -X PATCH https://api.arta.io/tags/{tag_name} \
 -H "Content-Type: application/json" \
 -H "Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y" \
 -d '{"tag":{"is_active":false}}'
Request example
{
  "tag": {
    "is_active": false
  }
}
Response examples (200)
{
  "id": "39fdd1c1-4bae-4235-9ea8-412c63d2be90",
  "name": "ny-warehouse",
  "color": "008000",
  "is_active": true,
  "created_at": "2024-09-05T15:00:46.905529",
  "created_by": 1,
  "updated_at": "2024-09-25T17:58:47.918049",
  "updated_by": null,
  "description": null
}