Create parameter#

Description#

Creates a parameter. If there is a parameter with the same ID, a 409 is returned.

POST /api/v1/parameter

Required OAuth Scopes

No OAuth scopes are required to use this endpoint.

Parameters#

Parameter

In

Type

Required

Description

body

body

GlobalParameterDto

true

The representation of the parameter to create

Body parameter example#

{
  "description": "string",
  "label": "string",
  "listType": "string",
  "mode": "scalar",
  "name": "string",
  "overridable": true,
  "scope": "global",
  "selectListId": "string",
  "type": "string",
  "value": null
}

Code Samples#

curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/parameter \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/prep/api/v1/parameter \
    Content-Type:application/json \
    Accept:application/json \
    Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/parameter" \
    --output-document -  \ 
    --header 'Content-Type: application/json' \ 
    --header 'Accept: application/json' \ 
    --header 'Authorization: Bearer {access-token}'
import requests

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/parameter', headers = headers)

print(r.json())

Returns#

201 - Created#

undefined

Example Responses#

{
  "body": {
    "choices": [
      "undefined"
    ],
    "created": "string",
    "databaseId": "string",
    "description": "string",
    "id": "string",
    "label": "string",
    "listType": "string",
    "mode": "string",
    "name": "string",
    "overridable": "boolean",
    "scope": "string",
    "selectListId": "string",
    "type": "string",
    "updated": "string",
    "userId": "string",
    "value": "undefined",
    "version": "integer"
  },
  "code": "integer"
}