fbpx
GEThttps://api.spotinst.io/ocean/gcp/k8s/cluster/{OCEAN_ID}/log?fromDate={FROM_DATE}&toDate={TO_DATE}&limit={LIMIT}&severity={SEVERITY}&accountId={ACCOUNT_ID}

Fetch group’s Elastilog by

URL Parameters

Parameter Type Description
OCEAN_ID * String

The Ocean cluster ID you want to query

Example: oseg-1234
FROM_DATE * String

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

TO_DATE * String

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

LIMIT Integer

Maximum number of lines to extract in a response. Max value allowed - 1000.

Example: 200
Default: 500
SEVERITY String

Severity of log entries to extract. Valid Values: ALL, INFO, DEBUG, WARN

Example: INFO
Default: ALL
ACCOUNT_ID * String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "3213f42e-455e-4801-a185-cd3eb65fac5f",
        "url": "/gcp/gce/group/sig-123456/log?fromDate=2019-01-01&toDate=2019-01-02",
        "method": "GET",
        "time": "2019-01-19T13:49:11.911Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:ocean:gcp:k8s:cluster:log",
        "items": [
           	{
                "message": "Ocean o-e0a2bd7c successfully created.",
                "severity": "INFO",
                "createdAt": "2019-05-19T14:34:15.000Z"
			}
        ],
        "count": 1
    }
}