POST
https://ushahididocs.api.ushahidi.io/api/v3/csv
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"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/csv/1
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"
]
}
Sorting parameter Available values : entity fields Default value : id
id
Sorting parameter Available values : [ASC,DESC] Default value : ASC
Desc
Paging parameter Default value : null
2
Paging parameter Default value : 0
3
Filter parameter check the columns value
col1,col2
Filter parameter check the maps_to value
2
Filter parameter check the fixed value
1
Filter parameter check the filename value
file.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
}
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"
]
}
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"
]
}