Get latest command/job status
POSThttps://api.gardin.ag/v1/devices/:deviceId/command/info
Retrieve status of most recent command/job executed by the device.
Required scope(s): [devices:command
]
Request
Path Parameters
deviceId stringrequired
The target sensor.
Example: G111045
Responses
- 200
- 404
- 500
Your request was successful.
- application/json
- Schema
- Example (from schema)
Schema
clientId stringrequired
Unique identifier for the client making the request.
res objectrequired
sessionId stringrequired
Session ID (ULID) associated with the client's request, providing context and traceability.
{
"clientId": "jdppdzf4l0",
"res": {
"ack": 1,
"code": "200",
"message": "Request executed successfully",
"messageId": "01H7B0YXPAMMSKX401J1CXCQBP",
"job": {
"id": "2207-TEST-20230803_GOOD",
"type": "MeasurementJob"
},
"severity": "info"
},
"sessionId": "01H7B0YVB9PQJ3086GNX5XVA94"
}
You are operating on a resource that does not exist. A message is returned explaining the issue.
- application/json
- Schema
- Example (from schema)
Schema
object
{}
An internal server error. Please contact Gardin Support for further assistance.
- application/json
- Schema
- Example (from schema)
Schema
object
{}
Authorization: oauth2
name: ClientCredentialstype: oauth2description: To access the Gardin API, users are required to authenticate using the [OAuth2 Client Credentials flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow). This authentication method is designed for applications that need to access resources on behalf of themselves, not on behalf of a user. It involves the application presenting its own credentials to obtain an access token, which then grants it permission to call the desired API endpoints.
The Client Credentials flow is particularly suitable for server-to-server interactions where the application needs to access resources without user intervention. Upon successful authentication, the application is issued an access token.
Access tokens are represented as [JSON Web Tokens (JWTs)](https://jwt.io/introduction), which are compact, URL-safe means of representing claims to be transferred between two parties. These tokens contain a set of claims that grant specific rights and are securely signed, allowing the recipient to verify their authenticity and integrity.
See [POST /oauth2/token endpoint documentation](/docs/gardin-api/acquire-access-token-client-credentials-flow) for more information.flows: {
"clientCredentials": {
"tokenUrl": "https://login.gardin.ag/oauth2/token/",
"scopes": {}
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://api.gardin.ag/v1/devices/:deviceId/command/info' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear