fbpx
GEThttps://api.spotinst.io/gcp/gce/group/{GROUP_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
GROUP_ID * String

The group ID you want to query

Example: sig-1234567
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:gcp:gce:group:log",
        "items": [
           {
                "message": "Group sig-e0a2bd7c successfully created.",
                "severity": "INFO",
                "createdAt": "2019-05-19T14:34:15.000Z"
            }
        ],
        "count": 1
    }
}