---
title: /operations/trackers/rest_api_latency
slug: amberflo-api/operationstrackersrestapilatency
docTags: 
createdAt: 2024-11-07T15:10:16.971Z
---

{
  "id": "TzxJIAe9uk_IlXEMhRzGa",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/operations/trackers/rest_api_latency",
    "servers": [
      {
        "url": "https://app.amberflo.io/operations/trackers/rest_api_latency"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "operations.query_tool.rest_api_latency_verification.RestApiLatencyVerificationParams.in",
          "schema": [
            {
              "name": "type",
              "kind": "required",
              "type": "string",
              "description": "The type of query to run",
              "example": "",
              "default": "rest_api_latency"
            },
            {
              "name": "timeRange",
              "kind": "required",
              "type": "object",
              "description": "Time period for which to compute the usage.",
              "modelRef": "#/components/schemas/common.TimeRange.in",
              "customType": "common.TimeRange.in",
              "schema": [
                {
                  "name": "startTimeInSeconds",
                  "kind": "required",
                  "type": "integer<int64>",
                  "description": "Start time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                  "example": 0
                },
                {
                  "name": "endTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "description": "End time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds). Defaults to \"now\".",
                  "example": 0
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/operations.query_tool.rest_api_latency_verification.RestApiLatencyVerificationParams.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "operations.tracker.TrackerInfo.out",
            "schema": [
              {
                "name": "trackerId",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "accountId",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "queryToolPayload",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "lastUpdated",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "timeWindow",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "timeLag",
                "kind": "optional",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "",
                "modelRef": "#/components/schemas/operations.tracker.TrackerStatus.out",
                "customType": "operations.tracker.TrackerStatus.out",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/operations.tracker.TrackerInfo.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "gUlXWgBLp-4mZzCcCQxgi",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/operations/trackers/rest_api_latency \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"type\": \"rest_api_latency\",\n     \"timeRange\": {\n     \"startTimeInSeconds\": 0\n     }\n     }'"
        },
        {
          "id": "BHu1kQPYtbSLsayD6iulH",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"type\": \"rest_api_latency\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/operations/trackers/rest_api_latency\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "GJvCdQcaeiH8Up9PS5QYJ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/operations/trackers/rest_api_latency\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"type\": \"rest_api_latency\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "vb1UAxiEahitkCI3vXAC4",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/operations/trackers/rest_api_latency\"\n\npayload = json.dumps({\n   \"type\": \"rest_api_latency\",\n   \"timeRange\": {\n      \"startTimeInSeconds\": 0\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "gUlXWgBLp-4mZzCcCQxgi"
    },
    "results": {
      "languages": [
        {
          "id": "6mVatqKc3N3hNJwiDPw1u",
          "language": "200",
          "code": "// Successful request\n{\n  \"trackerId\": \"\",\n  \"accountId\": \"\",\n  \"queryToolPayload\": \"\",\n  \"lastUpdated\": \"\",\n  \"type\": \"\",\n  \"timeWindow\": \"\",\n  \"timeLag\": \"\",\n  \"status\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "6mVatqKc3N3hNJwiDPw1u"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}