CSV
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
orderbystringOptionalExample:
Sorting parameter Available values : entity fields Default value : id
idorderstringOptionalExample:
Sorting parameter Available values : [ASC,DESC] Default value : ASC
Desclimitinteger · int32OptionalExample:
Paging parameter Default value : null
2offsetinteger · int32OptionalExample:
Paging parameter Default value : 0
3columnsstringOptionalExample:
Filter parameter check the columns value
col1,col2maps_tointeger · int32OptionalExample:
Filter parameter check the maps_to value
2fixedinteger · int32OptionalExample:
Filter parameter check the fixed value
1filenamestringOptionalExample:
Filter parameter check the filename value
file.csvResponses
200
OK
application/json
countinteger · int32Required
limitstring · nullableRequired
offsetinteger · int32Required
orderstringRequired
orderbystringRequired
currstringRequired
nextstringRequired
prevstringRequired
total_countinteger · int32Required
401
Unauthorized
application/json
get/api/v3/csv
GET /api/v3/csv HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1,
"results": [
{
"id": 1,
"url": "http://localhost:8000/api/v3/csv/1",
"columns": [
"col1,col2"
],
"filename": "file.csv",
"mime": "csv",
"size": 200,
"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/csv?orderby=id&order=asc&offset=0",
"next": "http://localhost:8000/api/v3/csv?orderby=id&order=asc&offset=0",
"prev": "http://localhost:8000/api/v3/csv?orderby=id&order=asc&offset=0",
"total_count": 1
}add csv
POST https://ushahididocs.api.ushahidi.io/api/v3/csv
Request Body
Name
Type
Description
file
String
CSV file
size
String
CSV file size
add csv
PUT https://ushahididocs.api.ushahidi.io/api/v3/csv/1
Request Body
Name
Type
Description
file
String
CSV file
size
String
CSV file size
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
OK
application/json
idinteger · int32Required
urlstringRequired
columnsstring[]Required
maps_tostring · nullableRequired
fixedstring · nullableRequired
filenamestringRequired
mimestringRequired
sizeinteger · int32Required
createdstringRequired
updatedstring · nullableRequired
completedstring · nullableRequired
statusstring · nullableRequired
errorsstring · nullableRequired
processedstring · nullableRequired
collection_idstring · nullableRequired
allowed_privilegesstring[]Required
401
Unauthorized
application/json
404
Not Found
application/json
get/api/v3/csv/20
GET /api/v3/csv/20 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 2,
"url": "http://localhost:8000/api/v3/csv/2",
"columns": [
"col3,col4"
],
"filename": "file.csv",
"mime": "csv",
"size": 100,
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
OK
application/json
idinteger · int32Required
urlstringRequired
columnsstring[]Required
maps_tostring · nullableRequired
fixedstring · nullableRequired
filenamestringRequired
mimestringRequired
sizeinteger · int32Required
createdstringRequired
updatedstring · nullableRequired
completedstring · nullableRequired
statusstring · nullableRequired
errorsstring · nullableRequired
processedstring · nullableRequired
collection_idstring · nullableRequired
allowed_privilegesstring[]Required
401
Unauthorized
application/json
404
Not Found
application/json
delete/api/v3/csv/1
DELETE /api/v3/csv/1 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 2,
"url": "http://localhost:8000/api/v3/csv/2",
"columns": [
"col3,col4"
],
"filename": "file.csv",
"mime": "csv",
"size": 100,
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200Success
No content
post/api/v3/csv/2/import
POST /api/v3/csv/2/import HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
No content