---
title: Get request logs
slug: graph/api/get-request-logs
docTags: 
createdAt: 2026-08-28T18:28:55.472Z
---

{
  "id": "vFg4iDM9NtIS6oueRpds6",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://cg.optimizely.com/api/logs/request",
    "servers": [
      {
        "url": "https://cg.optimizely.com/api/logs/request"
      }
    ],
    "name": "Get request logs",
    "description": "<p>Get <em>incoming/outgoing</em> request logs</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "page",
          "type": "number<double>",
          "description": "",
          "format": "double"
        },
        {
          "kind": "optional",
          "name": "requestId",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "host",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "path",
          "type": "string",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "success",
          "type": "boolean",
          "description": ""
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "epi-hmac",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>HMAC authentication (<code>epi-hmac xxx</code>)</p>",
          "in": "header"
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "description": "JWT token",
          "scheme": "bearer"
        },
        {
          "id": "Basic",
          "name": "Basic",
          "kind": "optional",
          "type": "http",
          "description": "HMAC credentials",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Ok",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "RequestLog[]",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "createdAt",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "instanceId",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "method",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "host",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "path",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "operationType",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "operationName",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "duration",
                "kind": "optional",
                "type": "number<double>",
                "description": "",
                "format": "double"
              },
              {
                "name": "user",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "success",
                "kind": "optional",
                "type": "boolean",
                "description": "",
                "default": true
              }
            ],
            "modelRef": "#/components/schemas/RequestLog",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "-sPjprTMcKQ4RnlVIFWkv",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://cg.optimizely.com/api/logs/request \\\n     --header 'accept: application/json'"
        },
        {
          "id": "lXrSBrJfp0D4CLFjjO_OT",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://cg.optimizely.com/api/logs/request\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lOglQRWdGcG37OF1wS2tc",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://cg.optimizely.com/api/logs/request\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "H2hDE6Pt-CYMQ9Jwe8ZO8",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://cg.optimizely.com/api/logs/request\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "-sPjprTMcKQ4RnlVIFWkv"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Ok\n[\n  {\n    \"id\": \"\",\n    \"createdAt\": \"\",\n    \"instanceId\": \"\",\n    \"status\": \"\",\n    \"method\": \"\",\n    \"host\": \"\",\n    \"path\": \"\",\n    \"operationType\": \"\",\n    \"operationName\": \"\",\n    \"message\": \"\",\n    \"duration\": \"\",\n    \"user\": \"\",\n    \"success\": false\n  }\n]"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}