---
title: Retrieve analytics information
slug: docs/demo/retrieve-analytics-information
description: Learn how to use cURL to send a GET request to an API endpoint with this easy-to-follow code example. Enhance your understanding by exploring how to include headers for accepting and sending JSON data effectively.
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "Ma0FnXOWFcvTc60bGJaHK",
  "data": {
    "url": "https://api.fictive.com/REST/api/analytics/{method}",
    "name": "Retrieve analytics information",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "method",
          "type": "string",
          "description": "Name of stored proc to call"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "startdate",
          "type": "string",
          "description": "DateTime (optional) for start of query"
        },
        {
          "kind": "optional",
          "name": "enddate",
          "type": "string",
          "description": "DateTime (optional) for end of query"
        },
        {
          "kind": "optional",
          "name": "referencecurrency",
          "type": "string",
          "description": "e.g. GBP or EUR"
        },
        {
          "kind": "optional",
          "name": "timezoneoffset",
          "type": "integer",
          "description": "e.g. 1"
        }
      ],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "isExpanded": true,
            "description": "OK"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to retrieve analytic profiles for a specific instance of eSuite",
    "examples": {
      "languages": [
        {
          "id": "tZo4CBLooLz5ZXAWTpcwf",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/analytics/{method} \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "_dswzNgX_Ycd0AfHF2e8D",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/analytics/{method}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5cfvmmt7sIZvi_4OIovC3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/analytics/{method}\")\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\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "yIe-SR6iunX3lRspadHhW",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/analytics/{method}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "tZo4CBLooLz5ZXAWTpcwf"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n\"\""
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}