Skip to content

Diagnostic Endpoints

The v3 API provides some diagnostic endpoints to verify your integration is working.

/ping

GET https://api.litmus.com/v3/ping

This is an unauthenticated endpoint that can be queried to verify if the API is currently available.

Examples

cURL

bash
curl https://api.litmus.com/v3/ping

Ruby

ruby
require 'net/http'
Net::HTTP.get(URI("https://api.litmus.com/v3/ping"))

Result Format

200 OK

json
{
  "meta": {
    "ping": "pong"
  }
}

/ping/authenticated

GET https://api.litmus.com/v3/ping/authenticated

This is an authenticated endpoint, requiring an AOuth 2.0 access token to be provided to successfully respond.

Examples

cURL

bash
curl https://api.litmus.com/v3/ping/authenticated
   -H "Authorization: Bearer <example-access-token>"

Ruby

ruby
require 'net/http'
uri     = URI("https://api.litmus.com/v3/ping/authenticated")
token   = "example-access-token"
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer #{token}"

Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do | http|
  http.request(request)
end

Result Format

200 OK

json
{
  "meta": {
    "ping": "pong",
    "accessToken": {
      "token": <example-access-token>,
      "expiresInSeconds": 1234,
      "scopes": ["full"]
    },
    "application": {
      "name": <application-name>,
      "uid": <application-uid>
    }
  }
}