Exago Logo
Search
Generic filters
Exact matches only

REST – Parameters

Parameters are used throughout the application to store values. The userId and companyId parameters are used for identifying the current user. Non-hidden parameters can be accessed in reports.

Important

All requests require a Session ID URL parameter and basic request headers. In the following document, headers are omitted for clarity.

Parameter JSON

Parameters are represented as JSON objects with the following properties:

NameTypeWritableDescription
Idstringrequired-createThe unique Id of this parameter
DataTypeenumyes (“String”)Parameter Type
ValuestringyesThe value of this parameter
PromptTextstringyesIf set, text to prompt the user for a value
IsHiddenbooleanyes (true)Whether the parameter is accessible in reports

Example

{
  "Id":         "MyParameter",
  "DataType":   "String",
  "Value":      "",
  "PromptText": "Input a value",
  "IsHidden":   true
}

List Parameters

GET /rest/Parameters

List all the parameters in the current configuration. Output is an array of objects, each representing an individual parameter.

NameTypeDescription
IdstringThe unique Id of this parameter

Using curl

curl http://{webservice}/rest/Parameters?sid={sid} -X GET

Example response

Status: 200 OK

  {
    "Id": "MyParameter"
  },
  {
    "Id": "HelloWorld"
  }

Show Parameter

GET /rest/Parameters/{Id}

Show the properties of the parameter specified by its Id.

Using curl

curl http://{webservice}/rest/Parameters/{Id}?sid={sid} -X GET

Example response

Status: 200 OK

{
  "Id":         "MyParameter",
  "DataType":   "String",
  "Value":      "",
  "PromptText": "Input a value",
  "IsHidden":   true
}

Create Parameter

POST /rest/Parameters

Parameters are designed to be set in the API. If they do not already exist in config, create them programmatically.

Using curl

curl http://{webservice}/rest/Parameters?sid={sid} -X POST ^
	-d "{'Id':'Hello','DataType':'String','Value':'World','IsHidden':false}"

Example response

Status: 201 Created
Location: /{webservice}/rest/Parameters/Hello

{
  "Id":         "Hello",
  "DataType":   "String",
  "Value":      "World",
  "PromptText": "",
  "IsHidden":   false
}

Edit Parameter

PATCH /rest/Parameters/{Id}

Only supply the properties to be edited.

Using curl

curl http://{webservice}/rest/Parameters/{Id}?sid={sid} -X PATCH ^
	-d "{'IsHidden':true}"

Example response

Status: 204 No Content

Delete Parameter

DELETE /rest/Parameters/{Id}

Using curl

curl http://{webservice}/rest/Parameters/{Id}?sid={sid} -X DELETE

Example response

Status: 204 No Content

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents