GET /api/v5/categories/100 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"result": {
"id": 6,
"tag": "Done",
"slug": "done",
"type": "status",
"icon": "tag",
"priority": 0,
"children": [],
"translations": {
"es": {
"tag": "Done - ES"
}
},
"enabled_languages": {
"default": "",
"available": [
"es"
]
}
}
}
id,name
GET /api/v5/categories HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"results": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": [
"text"
],
"priority": 1,
"children": [
{
"id": 1,
"parent_id": 1,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
"text"
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
},
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
]
}
{"base_language":"22","type":"category","icon":"tag","color":"","parent_id":5,"translations":{},"tag":"test243","slug":"test243"}
POST /api/v5/categories HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 129
{
"base_language": "22",
"type": "category",
"icon": "tag",
"color": "",
"parent_id": 5,
"translations": {},
"tag": "test243",
"slug": "test243"
}
{
"result": {
"id": 21,
"tag": "test2",
"slug": "test2",
"type": "category",
"color": "",
"icon": "tag",
"children": [],
"translations": [],
"enabled_languages": {
"default": "en-US",
"available": []
}
}
}
{"base_language":"22","type":"category","icon":"tag","color":"","parent_id":5,"translations":{},"tag":"test2458","slug":"test2436"}
PUT /api/v5/categories/70 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 131
{
"base_language": "22",
"type": "category",
"icon": "tag",
"color": "",
"parent_id": 5,
"translations": {},
"tag": "test2458",
"slug": "test2436"
}
{
"result": {
"id": 7,
"parent_id": 5,
"tag": "test2458",
"slug": "role-control",
"type": "category",
"color": "",
"icon": "tag",
"role": [
"admin"
],
"priority": 0,
"children": [],
"parent": {
"id": 5,
"tag": "Todo",
"slug": "todo",
"type": "status",
"icon": "tag",
"priority": 0,
"translations": {
"es": {
"tag": "Todo - ES"
}
},
"enabled_languages": {
"default": "",
"available": [
"es"
]
}
},
"translations": {
"es": {
"tag": "Role Control - ES"
}
},
"enabled_languages": {
"default": "22",
"available": [
"es"
]
}
}
}