DePIN Devices
Add a new DePIN device to the system
Body
userIdstringRequiredExample:
The ID of the user who owns the device
user123
networkstringRequiredExample:
The DePIN network the device belongs to
helium
deviceIdentifierstringRequiredExample:
Unique identifier for the device on the network
hotspot-abc123
Responses
201
DePIN device created successfully
application/json
400
Bad request - validation error
application/json
409
Conflict - device already exists
application/json
500
Internal server error
application/json
post
POST /v1/depin-device HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: */*
Content-Length: 75
{
"userId": "user123",
"network": "helium",
"deviceIdentifier": "hotspot-abc123"
}
{
"message": "DePIN device created successfully",
"depinDeviceId": "1",
"userId": "user123",
"network": "helium",
"deviceIdentifier": "hotspot-abc123"
}
Retrieve a DePIN device by its ID
Path parameters
deviceIdstringRequiredExample:
The ID of the DePIN device to retrieve
1
Responses
200
DePIN device retrieved successfully
application/json
400
Bad request - invalid device ID
application/json
404
DePIN device not found
application/json
500
Internal server error
application/json
get
GET /v1/depin-device/{deviceId} HTTP/1.1
Host: api.example.com
Accept: */*
{
"depinDeviceId": "1",
"userId": "user123",
"network": "helium",
"deviceIdentifier": "hotspot-abc123",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
Remove a DePIN device from the system
Path parameters
deviceIdstringRequiredExample:
The ID of the DePIN device to delete
1
Responses
200
DePIN device deleted successfully
application/json
400
Bad request - invalid device ID
application/json
404
DePIN device not found
application/json
500
Internal server error
application/json
delete
DELETE /v1/depin-device/{deviceId} HTTP/1.1
Host: api.example.com
Accept: */*
{
"message": "DePIN device deleted successfully"
}
Retrieve all DePIN devices associated with a specific user
Path parameters
userIdstringRequiredExample:
The ID of the user whose devices to retrieve
user123
Responses
200
DePIN devices retrieved successfully
application/json
400
Bad request - invalid user ID
application/json
404
No DePIN devices found for user
application/json
500
Internal server error
application/json
get
GET /v1/depin-devices/user/{userId} HTTP/1.1
Host: api.example.com
Accept: */*
[
{
"depinDeviceId": "1",
"userId": "user123",
"network": "helium",
"deviceIdentifier": "hotspot-abc123",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
]
Retrieve all DePIN devices from a specific network
Path parameters
networkstringRequiredExample:
The network name to filter devices by
helium
Responses
200
DePIN devices retrieved successfully
application/json
400
Bad request - invalid network name
application/json
404
No DePIN devices found for network
application/json
500
Internal server error
application/json
get
GET /v1/depin-devices/network/{network} HTTP/1.1
Host: api.example.com
Accept: */*
[
{
"depinDeviceId": "1",
"userId": "user123",
"network": "helium",
"deviceIdentifier": "hotspot-abc123",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
]