Tag

Summary

Resource

Operation

Description

Tag

POST /api/tags

Creates a new tag.

GET /api/tags/(int:tag_id)

Gets a single tag given its ID.

GET /api/tags

Gets a list of all the tags.

PUT /api/tags/(int:tag_id)

Updates an existing tag.

DELETE /api/tags/(int:tag_id)

Deletes a tag.

Create

JSON Schema

Required parameters are in bold.

type

object

properties

  • value

type

string

maxLength

255

minLength

1

additionalProperties

False


POST /api/tags

Creates a new tag.

Example request:

POST /tags HTTP/1.1
Host: 127.0.0.1
Content-Type: application/json

{
  "value": "phish"
}

Example response:

HTTP/1.1 201 Created
Content-Type: application/json

{
  "id": 1,
  "value": "phish"
}
Request Headers
Response Headers
Status Codes

Read Single

GET /api/tags/(int: tag_id)

Gets a single tag given its ID.

Example request:

GET /tags/1 HTTP/1.1
Host: 127.0.0.1
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 1,
  "value": "phish"
}
Request Headers
Response Headers
Status Codes

Read Multiple

GET /api/tags

Gets a list of all the tags.

Example request:

GET /tags HTTP/1.1
Host: 127.0.0.1
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "id": 1,
    "value": "phish"
  },
  {
    "id": 2,
    "value": "from_address"
  }
]
Request Headers
Response Headers
Status Codes

Update

JSON Schema

Required parameters are in bold.

type

object

properties

  • value

type

string

maxLength

255

minLength

1

additionalProperties

False


PUT /api/tags/(int: tag_id)

Updates an existing tag.

Example request:

PUT /tags/1 HTTP/1.1
Host: 127.0.0.1
Content-Type: application/json

{
  "value": "from_address",
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 1,
  "value": "from_address"
}
Request Headers
Response Headers
Status Codes

Delete

DELETE /api/tags/(int: tag_id)

Deletes a tag.

Example request:

DELETE /tags/1 HTTP/1.1
Host: 127.0.0.1

Example response:

HTTP/1.1 204 No Content
Request Headers
Status Codes