Endpoints Overview
DePINscan currently provides the following API endpoints:
post
This endpoint is used for uploading device identifiers and their associated longitude and latitude.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
versionstringRequired
version
Body
uidstringRequired
user id
Responses
200
Upload successfully.
application/json
messagestringRequired
message
400
Bad Request
application/json
post/api/upload-device-metrics
POST /api/upload-device-metrics HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
version: text
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"uid": "text",
"events": [
{
"publisher": "text",
"timestamp": "text",
"custom": {
"longitude": 1,
"latitude": 1
}
}
]
}{
"message": "text"
}get
This endpoint is used for getting project publishers by project id.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
uidstringRequired
Project Id
Responses
200
Get project publishers successfully.
application/json
string[]Optional
publishers
400
Bad Request
application/json
get/api/project/{uid}/publishers
GET /api/project/{uid}/publishers HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
"text"
]delete
Delete all devices by project id.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
uidstringRequired
uid
Responses
200
Delete all devices successfully.
application/json
messagestringRequired
message
400
Bad Request
application/json
delete/api/delete-all-devices
DELETE /api/delete-all-devices HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"uid": "text"
}{
"message": "text"
}Last updated