DESCRIPTION
This action allows you to create a new event category.
NOTE: There are default categories that we provide that cannot be removed or modified;
they are deployments, alerts, holidays and others.
DEFINITION
POST https://api.anodot.com/api/v1/user-events/categories?token=<api token>
HEADERS
Content-type=application/json
BODY
{
"category": {
"name": "<category name>",
"imageUrl": "<image url>"
}
}
ARGUMENT\ DEFINITION
name |
The category name and they way it will be displayed. Name must be unique [required] |
ImageUrl |
A url to the image that will be displayed as an icon for the category [optional] The ImageUrl must be located under a secure server - for example https://myServer/myImage.png |
EXAMPLE REQUEST
curl \
-X POST
-d '{"category":{"imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-anodot.png","name":"myCategory"}}' \
-H "Content-Type: application/json" \
'https://api.anodot.com/api/v1/user-events/categories?token=<API TOKEN>'
EXAMPLE RESPONSE
{
"id":"430f648e-f5e3-40ca-a7e5-50b773ede81b",
"imageUrl":"https://s3.amazonaws.com/anodot-images-common/logo-anodot.png",
"name":"myCategory",
"owner":"user"
}
Note: For more details about example responses, see HTTP Responses.