Base URL: api.gsmcloud.com
This documentation aims to provide all the information you need to work with our API.
To authenticate requests, include an Authorization header in the form “Basic {credentials}”. The value of {credentials} should be your username/id and your password, joined with a colon (:), and then base64-encoded.
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Requires Authentication
GET
/devices
Headers
Authorization:
Example: Basic {YOUR_AUTH_KEY}
Content-Type:
Example: application/json
Accept:
Example: application/json
Authorization:
Example: Basic {YOUR_AUTH_KEY}
Content-Type:
Example: application/json
Accept:
Example: application/json
id: (integer)
Device ID.
name: (string)
Given name for the device.
imei: (string)
IMEI number of the device.
last_package_at: (string)
Last time the device was registered as online.
ports: (object)
List of ports for the device.
Requires Authentication
PATCH
/devices/{device_id}
Headers
Authorization
Example: Basic {YOUR_AUTH_KEY}
Content-Type
Example: application/json
Accept
Example: application/json
Url Parameters
Device_id (Interger):
Example: 7
Body Parameters:
Name (Name):
Example: libero
curl --request GET \
--get "api.gsmcloud.dk/devices" \
--header "Authorization: Basic {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
[
{
"id": 1,
"name": "Log test",
"imei": "868333033900099",
"last_package_at": "2023-07-10T22:44:04.000000Z",
"ports": {
"Power": {
"name": "Power",
"label": null,
"direction": "input",
"value": true,
"type": "boolean"
},
"IN 1": {
"name": "IN 1",
"label": null,
"direction": "input",
"value": 300,
"type": "temperature"
},
"IN 2": {
"name": "IN 2",
"label": null,
"direction": "input",
"value": 160,
"type": "analog"
},
"IN 3": {
"name": "IN 3",
"label": null,
"direction": "input",
"value": true,
"type": "boolean"
},
"Signal": {
"name": "Signal",
"label": null,
"direction": "input",
"value": 15,
"type": "integer"
},
"Relay": {
"name": "Relay",
"label": null,
"direction": "output",
"value": null,
"type": "boolean"
},
"Interval": {
"name": "Interval",
"label": null,
"direction": "output",
"value": null,
"type": "integer"
},
"status": {
"name": "status",
"label": null,
"direction": "input",
"value": true,
"type": "boolean"
}
}
}
]
url --request PATCH \
"api.gsmcloud.dk/devices/7" \
--header "Authorization: Basic {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"libero\"
}"
(200, Device updated successfully):
(401, Not authorized):
(422, Validation error):
Base URL: api.gsmcloud.com
This documentation aims to provide all the information you need to work with our API.
To authenticate requests, include an Authorization header in the form “Basic {credentials}”. The value of {credentials} should be your username/id and your password, joined with a colon (:), and then base64-encoded.
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Requires Authentication
GET
/devices
curl --request GET \
--get "api.gsmcloud.dk/devices" \
--header "Authorization: Basic {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
[
{
"id": 1,
"name": "Log test",
"imei": "868333033900099",
"last_package_at": "2023-07-10T22:44:04.000000Z",
"ports": {
"Power": {
"name": "Power",
"label": null,
"direction": "input",
"value": true,
"type": "boolean"
},
"IN 1": {
"name": "IN 1",
"label": null,
"direction": "input",
"value": 300,
"type": "temperature"
},
"IN 2": {
"name": "IN 2",
"label": null,
"direction": "input",
"value": 160,
"type": "analog"
},
"IN 3": {
"name": "IN 3",
"label": null,
"direction": "input",
"value": true,
"type": "boolean"
},
"Signal": {
"name": "Signal",
"label": null,
"direction": "input",
"value": 15,
"type": "integer"
},
"Relay": {
"name": "Relay",
"label": null,
"direction": "output",
"value": null,
"type": "boolean"
},
"Interval": {
"name": "Interval",
"label": null,
"direction": "output",
"value": null,
"type": "integer"
},
"status": {
"name": "status",
"label": null,
"direction": "input",
"value": true,
"type": "boolean"
}
}
}
]
Headers
Authorization:
Example: Basic {YOUR_AUTH_KEY}
Content-Type:
Example: application/json
Accept:
Example: application/json
Authorization:
Example: Basic {YOUR_AUTH_KEY}
Content-Type:
Example: application/json
Accept:
Example: application/json
id: (integer)
Device ID.
name: (string)
Given name for the device.
imei: (string)
IMEI number of the device.
last_package_at: (string)
Last time the device was registered as online.
ports: (object)
List of ports for the device.
Requires Authentication
PATCH
/devices/{device_id}
url --request PATCH \
"api.gsmcloud.dk/devices/7" \
--header "Authorization: Basic {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"libero\"
}"
(200, Device updated successfully):
(401, Not authorized):
(422, Validation error):
Headers
Authorization
Example: Basic {YOUR_AUTH_KEY}
Content-Type
Example: application/json
Accept
Example: application/json
Url Parameters
Device_id (Interger):
Example: 7
Body Parameters:
Name (Name):
Example: libero