---
title: Pull Notification
slug: analysis/pull-notification
docTags: 
createdAt: 2025-02-25T06:52:22.836Z
---

:::ApiMethodV2
```json
{
  "name": "events",
  "method": "GET",
  "url": "https://api-sandbox.klavi.ai/data/analysis/v1/events",
  "description": "If the partner wants to query events through polling, use this endpoint.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "de6WGlx4kzHyFAKaFT9OO",
        "language": "curl",
        "code": "curl --location 'https://api-sandbox.klavi.ai/data/analysis/v1/events' \\\n--header 'secretKey: string'",
        "customLabel": ""
      },
      {
        "id": "ze1NE566AOAtWQPd53icY",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://api-sandbox.klavi.ai/data/analysis/v1/events',\n   'headers': {\n      'secretKey': 'string'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "2eOPcH75kpQzNk8dHNC3y",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"secretKey\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api-sandbox.klavi.ai/data/analysis/v1/events\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "z2gm3RT41aaCmcJ5fbtbv",
        "language": "python",
        "code": "import requests\n\nurl = \"https://api-sandbox.klavi.ai/data/analysis/v1/events\"\n\npayload = {}\nheaders = {\n   'secretKey': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "rYLYZ6FaOFATHcJkkAkiZ",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-sandbox.klavi.ai/data/analysis/v1/events\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"secretKey\"] = \"string\"\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "de6WGlx4kzHyFAKaFT9OO"
  },
  "results": {
    "languages": [
      {
        "id": "co9TPfYWzBh2xjrY4zG8j",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"partnerAppId\":\"12345678\",\n    \"eventId\":\"1495468585434-0e73d1719173766fe4dfe1a8\",\n    \"eventType\":\"analysis\",\n    \"eventName\":\"analysis_finished\",\n    \"eventTime\":\"2025-02-26T20:08:17.848Z\",\n    \"payload\":{\n        \"batchId\":\"25872252137\",\n        \"presignedUrl\":\"https://amzn-s3-demo-bucket.s3.us-west-2.amazonaws.com/key?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE123456789%2F20210621%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210621T041609Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=EXAMBLE1234494d5fba3fed607f98018e1dfc62e2529ae96d844123456\"\n    }\n}"
      },
      {
        "id": "Uw_G3unclJaRgSiD_OxMg",
        "language": "201",
        "code": "{\n    \"statusCode\": 201,\n    \"message\": \"No new event\"\n}",
        "customLabel": ""
      },
      {
        "id": "UCsxYn_j9i9FNZfXC5OdO",
        "language": "401",
        "code": "{\n    \"statusCode\": 401,\n    \"error\": \"Unauthorized\",\n    \"message\": \"Invalid accessKey or secretKey\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "co9TPfYWzBh2xjrY4zG8j"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "secretKey",
        "kind": "required",
        "type": "string",
        "description": "secret key",
        "": "secret key"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "partnerAppId",
      "kind": "optional",
      "type": "string",
      "description": "Unique identifier for partner"
    },
    {
      "name": "eventId",
      "kind": "optional",
      "type": "string",
      "description": "Unique identifier for the event",
      "children": []
    },
    {
      "name": "eventType",
      "kind": "optional",
      "type": "string",
      "description": "This case is a fixed string: analysis",
      "children": []
    },
    {
      "name": "eventName",
      "kind": "optional",
      "type": "string",
      "description": "The name of each event",
      "children": []
    },
    {
      "name": "eventTime",
      "kind": "optional",
      "type": "string",
      "description": "The time when this event was triggered(UTC timezone)",
      "children": []
    },
    {
      "name": "payload",
      "kind": "optional",
      "type": "object",
      "description": "Payload object",
      "children": [
        {
          "name": "batchId",
          "kind": "optional",
          "type": "string",
          "description": "Unique batch identifier"
        },
        {
          "name": "presignedUrl",
          "kind": "optional",
          "type": "string",
          "description": "presigned URL"
        }
      ]
    }
  ],
  "autoGeneratedAnchorSlug": "events",
  "legacyHash": "dAtXYnoqqOKpoRYIG3vgY"
}
```
:::







