API Key
info
This is a service manage keys for using Lumyri map service as the third party
Every tickets api must have ACCESS_TOKEN
what you got when login and APPLICATION_ID
that manager by application service
All APIs endpoints
Generate a new key
curl --location --request POST 'https://api-v1-stg.lumyri.com/keymanagement/generate' \
--header 'x-app-id: $APPLICATION_ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
Response
{
"error": null,
"data": {
"key": "api-key-292273649616290910673422120900486198491",
"secret": "1dff7380-e7c6-4918-be0c-393d3b0913e6"
}
}
Key object
id: uuid;
app_id: uuid;
description: string;
key: string;
secret: string;
created_at: Date;
updated_at: Date;
expire: Date;
deleted_at: Date;
Get a list of keys
Parameter
- order_by: optional
- description: sort keys by name
- option: DESC or ASC
Example request
curl --location --request GET 'https://api-v1-stg.lumyri.com/keymanagement?order_by=DESC' \
--header 'x-app-id: $APPLICATION_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
Response
{
"error": null,
"data": {
"total": 1,
"per_page": 10,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": "9cba95de-465d-4c1b-80aa-0b768223ecd9",
"app_id": "694a8345-5f10-4924-b438-5a038a3884a5",
"description": "api-key-42201844840267",
"key": "api-key-338511895339585642840717941729606993119",
"secret": "e4c10bf3-b26a-4287-a2e8-8bccfdd36985",
"created_at": "2023-02-23T02:49:46.525046Z",
"updated_at": "2023-02-23T02:49:46.525046Z",
"expire": null,
"deleted_at": null
}
]
}
}
Get key detail
Example request
curl --location --request GET 'https://api-v1-stg.lumyri.com/keymanagement/$KEY_ID' \
--header 'x-app-id: $APPLICATION_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
Response
{
"error": null,
"data": {
"id": "9cba95de-465d-4c1b-80aa-0b768223ecd9",
"app_id": "694a8345-5f10-4924-b438-5a038a3884a5",
"description": "api-key-42201844840267",
"key": "api-key-338511895339585642840717941729606993119",
"secret": "e4c10bf3-b26a-4287-a2e8-8bccfdd36985",
"created_at": "2023-02-23T02:49:46.525046Z",
"updated_at": "2023-02-23T02:49:46.525046Z",
"expire": null,
"deleted_at": null
}
}
Update key
Parameters
id: required
- Type: string
- Description: Key identify
description: required
- Type: string
- Description: Key description
expire: optional
- Type: string
- Description: Key expired time Example request
curl --location --request PUT 'https://api-v1-stg.lumyri.com/keymanagement' \
--header 'x-app-id: $APPLICATION_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "9cba95de-465d-4c1b-80aa-0b768223ecd9",
"description": "api key 1 update expire",
"expire": "2023-01-19T06:46:00.000Z"
}'
Response
{
"error": null,
"data": {
"id": "9cba95de-465d-4c1b-80aa-0b768223ecd9",
"app_id": "694a8345-5f10-4924-b438-5a038a3884a5",
"description": "api key 1 update expire",
"expire": "2023-01-19T06:46:00Z",
"key": "api-key-338511895339585642840717941729606993119",
"secret": "e4c10bf3-b26a-4287-a2e8-8bccfdd36985",
"created_at": "2023-02-23T02:49:46.525046Z",
"updated_at": "2023-02-23T03:26:24.653063083Z",
"deleted_at": null
}
}
Delete key
Example request
curl --location --request DELETE 'https://api-v1-stg.lumyri.com/keymanagement/$KEY_ID' \
--header 'x-app-id: $APPLICATION_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
Response
{
"error": null,
"data": {
"message": "OK"
}
}