POST
https://ushahididocs.api.ushahidi.io/api/v3/apikeys
{
"id": 5,
"url": "http://localhost:8000/api/v3/apikey/5",
"api_key": "fff2756f-ebec-4b56-8c3c-e1051f97da39",
"created": "1970-01-01T00:00:00+00:00",
"updated": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/apikeys/2
{
"id": 5,
"url": "http://localhost:8000/api/v3/apikey/5",
"api_key": "fff2756f-ebec-4b56-8c3c-e1051f97da39",
"created": "1970-01-01T00:00:00+00:00",
"updated": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
Sorting parameter Available values : entity fields Default value : id
id
Sorting parameter Available values : [ASC,DESC] Default value : ASC
asc
Paging parameter Default value : null
2
Paging parameter Default value : 0
3
GET /api/v3/apikeys HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 5,
"results": [
{
"id": 3,
"url": "http://localhost:8000/api/v3/apikey/3",
"api_key": "98ac07ce-e872-4e50-864a-89b45acab18d",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": 4,
"url": "http://localhost:8000/api/v3/apikey/4",
"api_key": "b874d2e6-2bf0-4bb9-aecf-903edc7a4202",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": 6,
"url": "http://localhost:8000/api/v3/apikey/6",
"api_key": "30c777f7-538d-4ca1-b91a-354a600c1f08",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": 7,
"url": "http://localhost:8000/api/v3/apikey/7",
"api_key": "02b8471a-13d0-43bc-9934-913a610330ce",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": 8,
"url": "http://localhost:8000/api/v3/apikey/8",
"api_key": "15dfe069-99e7-4033-8722-117664aaf3dc",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
],
"offset": 0,
"order": "asc",
"orderby": "id",
"curr": "http://localhost:8000/api/v3/apikeys?orderby=id&order=asc&offset=0",
"next": "http://localhost:8000/api/v3/apikeys?orderby=id&order=asc&offset=0",
"prev": "http://localhost:8000/api/v3/apikeys?orderby=id&order=asc&offset=0",
"total_count": 5
}
GET /api/v3/apikeys/2 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 2,
"url": "http://localhost:8000/api/v3/apikey/2",
"api_key": "thisisatestapikeystring",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
DELETE /api/v3/apikeys/5 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 5,
"url": "http://localhost:8000/api/v3/apikey/5",
"api_key": "fff2756f-ebec-4b56-8c3c-e1051f97da39",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}