Fetch machine logs stream data
POSThttps://cloud-api.sandbox-v1.mecha.build/api/v1/machines/:machineIdOrAlias/logs/streams
This API endpoint retrieve streams data of logs data for the machine identified by the provided machineId or machine alias.
Request
Path Parameters
machineIdOrAlias stringrequired
The machineId - unique id of the machine, alias - machine alias
- application/json
Body
required
The request body containing the required details to get machine logs streams
start int64
Timestamp in epoch nanoseconds
end int64
Timestamp in epoch nanoseconds
Responses
- 200
Success response
- application/json
- Schema
- Example (from schema)
- Fetch machine logs stream example
Schema
success boolean
message string
status string
statusCode int32
errorCode string
subErrors object[]
payload
object
{
"success": true,
"message": "string",
"status": "string",
"statusCode": 0,
"errorCode": "string",
"subErrors": [
{}
],
"payload": {
"status": "string",
"data": [
"string"
]
}
}
Fetch machine logs stream response example
{
"success": true,
"message": "Streams fetched successfully",
"status": "OK",
"statusCode": 200,
"errorCode": "",
"subErrors": [
{}
],
"payload": {
"status": "success",
"data": [
"log_stream"
]
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://cloud-api.sandbox-v1.mecha.build/api/v1/machines/:machineIdOrAlias/logs/streams' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key-Id: <API_KEY_VALUE>' \
-H 'X-Api-Key-Secret: <API_KEY_VALUE>' \
-d '{
"start": 0,
"end": 0
}'
ResponseClear