DePINScan Documentation
  • Developer
    • Overview
    • Project Integration
    • Map Integration
      • Quickstart
      • Using the API
      • Endpoints Overview
      • Example Call
    • Map Embedding
    • Reporting Issues
  • User
    • DePINscan Learn-to-Earn: User Guide
Powered by GitBook
On this page
  1. Developer
  2. Map Integration

Endpoints Overview

PreviousUsing the APINextExample Call

Last updated 11 months ago

DePINscan currently provides the following API endpoints:

Please use the DELETE method with caution, as it currently deletes ALL devices from your project. This action is not reversible!

post

This endpoint is used for uploading device identifiers and their associated longitude and latitude.

Authorizations
Header parameters
versionstringRequired

version

Body
uidstringRequired

user id

Responses
200
Upload successfully.
application/json
400
Bad Request
application/json
post
POST /api/upload-device-metrics HTTP/1.1
Host: 
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
Path parameters
uidstringRequired

Project Id

Responses
200
Get project publishers successfully.
application/json
Responsestring[]

publishers

400
Bad Request
application/json
get
GET /api/project/{uid}/publishers HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  "text"
]
  • POST/api/upload-device-metrics
  • GET/api/project/{uid}/publishers
  • DELETE/api/delete-all-devices
delete

Delete all devices by project id.

Authorizations
Body
uidstringRequired

uid

Responses
200
Delete all devices successfully.
application/json
400
Bad Request
application/json
delete
DELETE /api/delete-all-devices HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "uid": "text"
}
{
  "message": "text"
}