---
title: /startCollectorForSwagger
slug: startcollectorforswagger
createdAt: 2024-01-09T12:30:00.567Z
---

{
  "id": "_YLdbz3MzDWhRKiHpbala",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/startCollectorForSwagger",
    "servers": [
      {
        "url": "http://1.1.1.1/startCollectorForSwagger"
      }
    ],
    "name": "",
    "description": "<p>Calling this request can be used for retrieve information about collector's runs</p>\n<ul>\n<li>return - json with results and status code</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "account_id_to_collector_address_and_network_limits_and_currency_limits",
          "type": "object",
          "example": "",
          "description": "the config that has been built for the collector",
          "default": "{\n  \"please_insert_your_object_data_inside_the_requestBody\": \"your_object_here\"\n}  \n",
          "schema": []
        },
        {
          "kind": "required",
          "name": "type",
          "type": "array",
          "description": "enum presenting types of alerts",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "required",
          "name": "creator_user_id",
          "type": "string",
          "example": "chris@gk8.io",
          "description": "the id of the user used to create the collector",
          "default": "chris@gk8.io"
        },
        {
          "kind": "required",
          "name": "collector_id",
          "type": "string",
          "example": "1234",
          "description": "the id of the collector to be created",
          "default": "1234"
        },
        {
          "kind": "required",
          "name": "collector_name",
          "type": "string",
          "example": "myCollector",
          "description": "the name of the collector to be created",
          "default": "myCollector"
        },
        {
          "kind": "required",
          "name": "creation_time_in_seconds",
          "type": "string",
          "example": "1690976021",
          "description": "creation time of the collector",
          "default": "1690976021"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "customType": "startCollectorForSwaggerRequest",
          "schema": [
            {
              "name": "account_id_to_collector_address",
              "kind": "optional",
              "type": "object",
              "example": "{\"1\":\"0xF1722F2c8Bab975C321321E2942E0dCb951B9C4F\"}",
              "schema": []
            },
            {
              "name": "network_symbol_to_network_limits",
              "kind": "optional",
              "type": "object",
              "example": "{\"ETH\":{\"symbol\":\"ETH\",\"limits\":[{\"max_total_fee\":10000000000000000000,\"max_priority_fee\":1000000000000}]}}",
              "schema": []
            },
            {
              "name": "currency_symbol_to_currency_limits",
              "kind": "optional",
              "type": "object",
              "example": "{\"ETH\":{\"symbol\":\"ETH\",\"limits\":[{\"fee_ratio\":1,\"fee_cap\":132000000854001}]}}",
              "schema": []
            }
          ],
          "modelRef": "#/components/schemas/startCollectorForSwaggerRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "startCollectorForSwaggerResponse",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "RunId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for the current run",
                    "example": "01225c40-de1a-45ef-a69b-8747c6d87197",
                    "default": "01225c40-de1a-45ef-a69b-8747c6d87197"
                  },
                  {
                    "name": "StatusCode",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Status code for the current run",
                    "example": 0,
                    "default": 0
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/startCollectorForSwaggerResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/startCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=%22{%5Cn%20%20%5C%22please_insert_your_object_data_inside_the_requestBody%5C%22%3A%20%5C%22your_object_here%5C%22%5Cn}%20%20%5Cn%22&type=array&creator_user_id=chris%40gk8.io&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/startCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=\\\"{\\\\n  \\\\\\\"please_insert_your_object_data_inside_the_requestBody\\\\\\\": \\\\\\\"your_object_here\\\\\\\"\\\\n}  \\\\n\\\"&type=array&creator_user_id=chris@gk8.io&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/startCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=\\\"{\\n  \\\\\"please_insert_your_object_data_inside_the_requestBody\\\\\": \\\\\"your_object_here\\\\\"\\n}  \\n\\\"&type=array&creator_user_id=chris@gk8.io&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/startCollectorForSwagger?account_id_to_collector_address_and_network_limits_and_currency_limits=\\\"{\\\\n  \\\\\\\"please_insert_your_object_data_inside_the_requestBody\\\\\\\": \\\\\\\"your_object_here\\\\\\\"\\\\n}  \\\\n\\\"&type=array&creator_user_id=chris@gk8.io&collector_id=1234&collector_name=myCollector&creation_time_in_seconds=1690976021\"\n\npayload = {}\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": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"RunId\": \"01225c40-de1a-45ef-a69b-8747c6d87197\",\n    \"StatusCode\": 0\n  },\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "tVUHLdiGDB6rY6tXSBTbn",
      "type": "paragraph",
      "children": [
        {
          "text": "Calling this request can be used for retrieve information about collector's runs",
          "id": "9AU2DMGzxQIKNPXkDudQR"
        }
      ]
    },
    {
      "id": "eoIw4H0naT6i-9RIsBkP-",
      "type": "bulleted-list",
      "children": [
        {
          "id": "JPFNlKZdi0RVqwmzVq13C",
          "type": "list-item",
          "children": [
            {
              "id": "7hyrmiRYTlVZc-XQAq2_z",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - json with results and status code",
                  "id": "6z5277Mm5hq9qtFiRdo7t"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}