Instances
Read an instance's logs
Returns recent console output from one of your instances, newest
line first (the same order as kubectl logs --tail). The window
reaches back at most 10 hours; older output is not retrievable through
this endpoint.
GET
/
instances
/
{id}
/
logs
Read an instance's logs
curl --request GET \
--url https://api.hivecompute.ai/v1/instances/{id}/logs \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hivecompute.ai/v1/instances/{id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hivecompute.ai/v1/instances/{id}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"entries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"line": "<string>"
}
],
"line_count": 100
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API token",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You do not have access to this resource.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too Many Requests",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}Authorizations
An API key issued by Hive Compute support. See Authentication above for how to request one.
Path Parameters
The instance's unique identifier.
Query Parameters
Maximum number of lines to return. Defaults to 100.
Required range:
1 <= x <= 1000Was this page helpful?
⌘I
Read an instance's logs
curl --request GET \
--url https://api.hivecompute.ai/v1/instances/{id}/logs \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hivecompute.ai/v1/instances/{id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hivecompute.ai/v1/instances/{id}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"entries": [
{
"timestamp": "2023-11-07T05:31:56Z",
"line": "<string>"
}
],
"line_count": 100
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API token",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You do not have access to this resource.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too Many Requests",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}