CSV
Authorizations
Query parameters
orderbystringOptionalExample:
Sorting parameter Available values : entity fields Default value : id
id
orderstringOptionalExample:
Sorting parameter Available values : [ASC,DESC] Default value : ASC
Desc
limitinteger · int32OptionalExample:
Paging parameter Default value : null
2
offsetinteger · int32OptionalExample:
Paging parameter Default value : 0
3
columnsstringOptionalExample:
Filter parameter check the columns value
col1,col2
maps_tointeger · int32OptionalExample:
Filter parameter check the maps_to value
2
fixedinteger · int32OptionalExample:
Filter parameter check the fixed value
1
filenamestringOptionalExample:
Filter parameter check the filename value
file.csv
Responses
200
OK
application/json
401
Unauthorized
application/json
get
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
{
"id": 1,
"url": "http://localhost:8000/api/v3/csv/1",
"columns": [
"col1,col2"
],
"maps_to": null,
"fixed": null,
"filename": "file.csv",
"mime": "csv",
"size": 22,
"created": "1970-01-01T00:00:00+00:00",
"updated": "2022-11-03T23:14:31+00:00",
"completed": null,
"status": null,
"errors": null,
"processed": null,
"collection_id": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
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
{
"id": 1,
"url": "http://localhost:8000/api/v3/csv/1",
"columns": [
"col1,col2"
],
"maps_to": null,
"fixed": null,
"filename": "file.csv",
"mime": "csv",
"size": 22,
"created": "1970-01-01T00:00:00+00:00",
"updated": "2022-11-03T23:14:31+00:00",
"completed": null,
"status": null,
"errors": null,
"processed": null,
"collection_id": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
Authorizations
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
get
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
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
delete
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"
]
}