OK
OK
Created
OK
OK
const response = await fetch('https://ushahididocs.api.ushahidi.io/api/v5/categories', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"results": [
{
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": [
"text"
],
"priority": 0,
"children": [
{
"id": 0,
"parent_id": 0,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"children": [
"text"
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
},
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
]
}
const response = await fetch('https://ushahididocs.api.ushahidi.io/api/v5/categories/6', {
method: 'DELETE',
headers: {},
});
const data = await response.json();
{
"result": {
"deleted": 0
}
}
const response = await fetch('https://ushahididocs.api.ushahidi.io/api/v5/categories', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_language": "22",
"type": "category",
"icon": "tag",
"color": "",
"parent_id": 5,
"translations": {},
"tag": "test243",
"slug": "test243"
}),
});
const data = await response.json();
{
"results": [
{
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": [
"text"
],
"priority": 0,
"children": [
{
"id": 0,
"parent_id": 0,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"children": [
"text"
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
},
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
]
}
const response = await fetch('https://ushahididocs.api.ushahidi.io/api/v5/categories/70', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_language": "22",
"type": "category",
"icon": "tag",
"color": "",
"parent_id": 5,
"translations": {},
"tag": "test2458",
"slug": "test2436"
}),
});
const data = await response.json();
{
"results": [
{
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": [
"text"
],
"priority": 0,
"children": [
{
"id": 0,
"parent_id": 0,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"children": [
"text"
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
},
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
]
}
const response = await fetch('https://ushahididocs.api.ushahidi.io/api/v5/categories/100', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"results": [
{
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": [
"text"
],
"priority": 0,
"children": [
{
"id": 0,
"parent_id": 0,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"children": [
"text"
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 0,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 0,
"parent": "text",
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
},
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
]
}