Read pod logs through the connected Kubernetes agent
curl --request GET \
--url https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId}/pods/{namespace}/{podName}/logs \
--cookie acornops_cp_session=const options = {method: 'GET', headers: {cookie: 'acornops_cp_session='}};
fetch('https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId}/pods/{namespace}/{podName}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"namespace": "<string>",
"logs": "<string>",
"fetchedAt": "2023-11-07T05:31:56Z",
"container": "<string>",
"tailLines": 123,
"previous": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Targets and inventory
Read pod logs through the connected Kubernetes agent
Read pod logs through the connected Kubernetes agent
curl --request GET \
--url https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId}/pods/{namespace}/{podName}/logs \
--cookie acornops_cp_session=const options = {method: 'GET', headers: {cookie: 'acornops_cp_session='}};
fetch('https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId}/pods/{namespace}/{podName}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"namespace": "<string>",
"logs": "<string>",
"fetchedAt": "2023-11-07T05:31:56Z",
"container": "<string>",
"tailLines": 123,
"previous": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Authorizations
Path Parameters
Example:
"4b930d98-add9-4924-ab26-3c16d96ec373"
Example:
"5b006e4c-509c-458a-9f02-5aafbdc01ade"
Example:
"default"
Example:
"web-7d9f6db7d5-z2mwr"
Query Parameters
Example:
"web"
Required range:
1 <= x <= 5000Required range:
x >= 1Required range:
1 <= x <= 10485760