Retrieve a specific log.

GET /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}

A record of an event that occurred related to a function invocation.

Retrieve a specific log.

Path parameters

  • ServiceSid string Required

    The SID of the Service to fetch the Log resource from.

  • EnvironmentSid string Required

    The SID of the environment with the Log resource to fetch.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ZE[0-9a-fA-F]{32}$.

  • Sid string Required

    The SID of the Log resource to fetch.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^NO[0-9a-fA-F]{32}$.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

      The unique string that we created to identify the Log resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^NO[0-9a-fA-F]{32}$.

    • account_sid string | null

      The SID of the Account that created the Log resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • service_sid string | null

      The SID of the Service that the Log resource is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ZS[0-9a-fA-F]{32}$.

    • environment_sid string | null

      The SID of the environment in which the log occurred.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ZE[0-9a-fA-F]{32}$.

    • build_sid string | null

      The SID of the build that corresponds to the log.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ZB[0-9a-fA-F]{32}$.

    • deployment_sid string | null

      The SID of the deployment that corresponds to the log.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ZD[0-9a-fA-F]{32}$.

    • function_sid string | null

      The SID of the function whose invocation produced the log.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^ZH[0-9a-fA-F]{32}$.

    • request_sid string | null

      The SID of the request associated with the log.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^RQ[0-9a-fA-F]{32}$.

    • level string | null

      The log level.

    • message string | null

      The log message.

    • date_created string(date-time) | null

      The date and time in GMT when the Log resource was created specified in ISO 8601 format.

    • url string(uri) | null

      The absolute URL of the Log resource.

GET /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}
curl \
 --request GET 'https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}' \
 --user "username:password"
Response examples (200)
{
  "sid": "NO00000000000000000000000000000000",
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Logs/NO00000000000000000000000000000000",
  "level": "warning",
  "message": "This is a warning",
  "build_sid": "ZB00000000000000000000000000000000",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "request_sid": "RQ00000000000000000000000000000000",
  "service_sid": "ZS00000000000000000000000000000000",
  "date_created": "2018-11-10T20:00:00Z",
  "function_sid": "ZH00000000000000000000000000000000",
  "deployment_sid": "ZD00000000000000000000000000000000",
  "environment_sid": "ZE00000000000000000000000000000000"
}