Get list of Survey Constants
  • 28 Aug 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Get list of Survey Constants

  • Dark
    Light
  • PDF

Article summary

Get
/survey-constants/

Operation is used to get a list of Survey Constants. Available from product version 2024.3 and for admin users only.

Survey Constants can be filtered by giving filtering parameters at HTTP querystring (see parameters).

Security
API Key
Header parameter nameAuthorization

Token issued for API consumer.

Query parameters
offset
integer

Offset to start returning results.

Minimum0
limit
integer

Limit number of results returned. Set to -1 to use maximum limit set in the environment. Default limit will be used if parameter is not specified. Special value -1 is available from product version 3.2.18.

Minimum1
__any of the object fields__
string

Filters list by selected object field value. Supports structured queries via +__+ delimiter. Supports ending keywords via +__+ delimiter:

  • For string fields: istartswith, startswith, iendswith, endswith, contains, icontains, isnull
  • For numerics: gt, lt, gte, lte, isnull
  • For spatial fields: contains, isnull, within, intersects, disjoint, touches, overlaps, covers, coveredby Examples: +++usage_state__txt__istartswith=in+++ , +++plan__state__txt__startswith=In+++ , +++creation_date__gte=2019-01-02T15:32:01+++, +++location__within=POLYGON ((641503.89 6944059.81, 641406.52 6943933.87, 641369.48 6943772.48, 641474.25 6943704.74, 641873.78 6943735.96, 641848.38 6943975.15, 641607.08 6944167.76, 641653.11 6944102.15, 641503.89 6944059.81))+++ Supports exclusive queries by field value using a not-operator preceeding the field lookup: Examples: +++not__type__txt__istartswith=Tie+++ , +++not__id=1390+++
orderby
string

Selects the object field to order the returned objects by. Can be used to sort in reverse order with '-' prefix. Can have several ordering rules separated by comma. Can be used only for object own fields and does not supports structured queries. Example: orderby=creator,-creation_date

Responses
200

A result response object.

{
  "Next": "https://example.com/api/v2/survey-constants/?limit=10&offset=10",
  "Previous": null,
  "Results": [
    {
      "groupname": "TEST_GROUPNAME",
      "id": 61701,
      "numValue": 0,
      "orderno": 0,
      "txt": "Ei Test",
      "txtValue": ""
    },
    {
      "groupname": "API_TEST",
      "id": 475001,
      "numValue": 1,
      "orderno": 0,
      "txt": "API Test Update",
      "txtValue": "API Test"
    },
    {
      "groupname": "API_TEST",
      "id": 482741,
      "numValue": 1,
      "orderno": 0,
      "txt": "API Test",
      "txtValue": "API Test"
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 1,
      "numValue": 1,
      "orderno": 1,
      "txt": "Test",
      "txtValue": ""
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 41,
      "numValue": 1,
      "orderno": 1,
      "txt": "Test",
      "txtValue": ""
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 81,
      "numValue": 1,
      "orderno": 1,
      "txt": "Create Test",
      "txtValue": ""
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 141,
      "numValue": 1,
      "orderno": 1,
      "txt": "Test",
      "txtValue": ""
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 201,
      "numValue": 1,
      "orderno": 1,
      "txt": "Ei Test",
      "txtValue": ""
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 401,
      "numValue": 1,
      "orderno": 1,
      "txt": "Test",
      "txtValue": ""
    },
    {
      "groupname": "TEST_GROUPNAME",
      "id": 501,
      "numValue": 1,
      "orderno": 1,
      "txt": "Test",
      "txtValue": ""
    }
  ],
  "Total": 106
}
Expand All
object
Next
string (url)

Url to next page of Survey Constants list. Null if No next page exist

Prev
string (url)

Url to previous page of Survey Constants list. Null if No previous page exist

Results
Array of object (SurveyConstant)

List of fetched Survey Constants

object

SurveyConstant

groupname
string

Group name of constant

id
integer

Unique id of constant

listUrl
string (url)

Url to fetch all contants from this group

numValue
integer

Numeric value

orderno
integer

Order number

txt
string

Human readable textual representation

txtValue
string

Text value

Total
integer

Total number of Survey Constant in the list

401

Authentication credentials are missing or invalid

{
  "details": "Authentication credentials were not provided"
}
object
details
string

Detailed description of error


Was this article helpful?