Introduction to sparse spatial map management APIs
API list
- Get spatial map list
- Delete spatial map
- Update spatial map information
- Download meta data
- Search spatial map
- Health check
REST API interface protocol and authentication mechanism
Spatial Map API follows standard HTTP REST transmission standards.
Http Header
Authorization:
Http request parameters are divided into two types:
Common parameters (including these in total, different authentication methods use different combinations):
- appId
- timestamp (Long integer: milliseconds elapsed since January 1, 1970 00:00:00 UTC)
- apiKey
- signature (request signature, token authentication is mutually exclusive)
Spatial Map API parameters: API's own parameters
API documentation no longer describes common authentication parameters
API Key authentication
Authentication is divided into two methods.
Token-based authentication
Http header Authorization contains Token, common parameters include:
- appId
Signature authentication
No Http header Authorization.
Request parameters contain signature information. All parameters are included in signature calculation (except images).
- appId
- timestamp
- apiKey
- signature
For detailed algorithm of signature calculation, please refer to the document API Key signature method.
Usage examples and attribute parsing
API usage example
Here is an example - calling API interface to query Spatial Map data, helping developers understand Spatial Map API interfaces and spatial map structure.
Request example
GET /maps HTTP/1.1
Host:
Date: Mon, 1 Jan 2018 00:00:00 GMT
Content-Type: application/json
{
"timestamp": 1769406019000,
"apiKey": "8b485c648c3056e79c2a85ee9b...",
"appId": "C:NA1:6fc8fe27af4a4d6cb02f4b494d2a9..",
"signature": "89985e2420899196db5bdf16b3c2ed0922c0c221"
}
Response example
{
"result": {
"armaps": [
{
"mapId": "62d4f765-cc54-4dff-9c48-b7c8b4adbde9",
"gps": "[0.0, 0.0]",
"name": "Map_2020-09-28_1302",
"size": 124140,
"status": "active",
"auxiliaryId": "62d4f765-cc54-4dff-9c48-b7c8b4adbde9",
"created": 1601245841687,
"modified": 1601245841687,
"mapVersion": "esm1",
"mapUrl": "https://prod-armap-1348728941.cos.na-siliconvalley...",
"previewUrl": "https://prod-armap-1348728941.cos.na-siliconvalley...",
"appKey": "C:NA1:6fc8fe27af4a4d6cb02f4b494d2a9f.."
},
{
"mapId": "5ccdf1fb-0cd3-4580-80aa-42bd2289...",
"gps": "[0.0, 0.0]",
"name": "test",
"size": 2419184,
"status": "active",
"auxiliaryId": "5ccdf1fb-0cd3-4580-80aa-42bd22897b...",
"floor": "1",
"tag": "cat",
"created": 1601244090670,
"modified": 1601244090670,
"mapVersion": "esm1",
"mapUrl": "https://prod-armap-1348728941.cos.na-siliconvalley....",
"previewUrl": "https://prod-armap-1348728941.cos.na-siliconvalley...."
}
],
"page": {
"total": 2,
"pageNum": 1,
"pageSize": 10,
"pages": 1
}
},
"statusCode": 0,
"msg": "Success",
"timestamp": 1769406021019
}
Sparse map attributes
As shown in the example above, this is a normal returned Spatial Map structure
| Attribute | Description |
|---|---|
| mapId | Unique ID of the map |
| name | Map name |
| size | Map file size |
| meta | User-associated data, which can be files, text or urls, requires base64 encoding |
| status | Whether disabled, two values [active inactive] |
| tag | Custom tags for easy retrieval |
| floor | Floor level for easy retrieval |
| gps | Geographical location of the space, wgs84 coordinate system, or custom coordinate system can be used |
| previewUrl | Preview image download |