CATEGORIES

Categories are a type of metadata available in the system, and are set on a per-Event basis.

Categories also support Custom Properties, allowing for multi-lingual values or any additional information.

A single Event can have many Categories.


Category Object

{
  "id": "98d02f28-55e4-4c5d-abe8-0b3a82f93d60",
  "name": "Example Category",
  "label": "EXCAT",
  "description": "Description of Example Category",
  "customProperties": [
    {
      "id": "025bc43c-1f83-41d4-baf3-d11f3089e532",
      "category": "category-value-here",
      "key": "key-value-here",
      "value": "value-here"
    }
  ]
}

Supported Actions

POST /category/

Add a Category.

Request Body:

{
  "name": "New Category",
  "label": "NC",
  "description": null
}

Note: Labels must be unique and a 400 Bad Request will be returned if there is a conflict.

Response: 200 OK


PUT /category/{id}

Update a Category by Id.

Request Body:

{
  "name": "New Category",
  "label": "NC",
  "description": "Added description of Category."
}

Note: Labels must be unique and a 400 Bad Request will be returned if there is a conflict.

Response: 200 OK


GET /category/

Get all Categories.

Response: 200 OK and a JSON array containing multiple Category objects.


GET /category/{id}

Get a Category by Id.

Response: 200 OK and JSON containing a Category object.


GET /category/{id}/events/

Gets the Events with the given Category Id.

Query Parameters:

PageSize:   {int} - Number of results to consider in a page.

PageNumber: {int} - Number of the page you are requesting.

Order: {QueryOrder} - Optional. ASC or DESC.

Response: 200 OK and JSON containing an Event collection.


DEL /category/{id}

Delete a Category by Id.

Response: 200 OK