---
title: Survey
slug: survey
docTags: 
createdAt: 2023-08-12T20:55:09.524Z
---

:::ApiMethodV2
```json
{
  "name": "Get a Survey",
  "method": "GET",
  "url": "https://api.tsrtech.com.br",
  "description": "Retorna os dados de uma pesquisa, como título, data de criação, visualizações, etc.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "26W3Tf4q-ZSZxvYhYsau9",
        "language": "curl",
        "code": "curl --location --request GET 'https://api.tsrtech.com.br' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"type\": \"survey\",\n    \"token\": \"XXXXXX\"\n    \"survey_id\": XX\n}'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "26W3Tf4q-ZSZxvYhYsau9"
  },
  "results": {
    "languages": [
      {
        "id": "2J9b9o-H9043J-bMpomi2",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"type\": \"survey\",\n    \"survey_id\": \"XX\",\n    \"survey_title\": \"Modelo\",\n    \"survey_date\": \"1690602827\",\n    \"survey_views\": \"2\"\n}"
      },
      {
        "id": "Bd-3WjMM_HCdvtaE-p7Nj",
        "language": "404",
        "customLabel": "",
        "code": "{\n      \"message\": \"survey not found.\"\n    }"
      }
    ],
    "selectedLanguageId": "2J9b9o-H9043J-bMpomi2"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "type",
        "kind": "required",
        "type": "string",
        "description": "survey"
      },
      {
        "name": "token",
        "kind": "required",
        "type": "string",
        "description": "token de acesso",
        "children": []
      },
      {
        "name": "survey_id",
        "kind": "required",
        "type": "Integer",
        "description": "id da pesquisa",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "get-a-survey",
  "legacyHash": "TNU3cJ7JwGYL8npTBsEPt"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Get All Survies",
  "method": "GET",
  "url": "https://api.tsrtech.com.br",
  "description": "Retorna uma lista com todas pesquisas da instância",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "zKCIbxiMnLmgxOYSnunBo",
        "language": "curl",
        "code": "curl --location --request GET 'https://api.tsrtech.com.br' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"type\": \"allsurvies\"\n}\n'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "zKCIbxiMnLmgxOYSnunBo"
  },
  "results": {
    "languages": [
      {
        "id": "w5V5eyLrLsUR7BbXUpLh8",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"type\": \"allsurvies\",\n    \"allsurvies_id\": \"XX\",\n    \"allsurvies_title\": \"Modelo\"\n}"
      },
      {
        "id": "iAtAyutRSbBjJGKqjo6nV",
        "language": "404",
        "customLabel": "",
        "code": "{\n      \"message\": \"no survies found.\"\n    }"
      }
    ],
    "selectedLanguageId": "w5V5eyLrLsUR7BbXUpLh8"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "type",
        "kind": "required",
        "type": "string",
        "description": "allsurvies"
      },
      {
        "name": "token",
        "kind": "required",
        "type": "string",
        "description": "token id",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "get-all-survies",
  "legacyHash": "kIl8jbotspoDyxnhmePlt"
}
```
:::

