Create a workspace variable
Create a new workspace variable in this workspace.
Request schema
Path parameters
workspace_id
integerrequired
ID of the workspace
Header parameters
Authorization
stringrequired
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
key
stringrequired
Keys cannot contain whitespaces
value
string | integer | booleanrequired
secret
booleanrequired
Whether this variable contains secret or sensitive information, like a password. Secret variables can only be used in secret connection credentials.
Http + 1.1
POST
https://app.getcensus.com/api/v1/workspaces/{workspace_id}/application_variables
POST /api/v1/workspaces/{workspace_id}/application_variables HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Content-Type: application/json Host: app.getcensus.com Content-Length: 60 { "key": "string", "value": "string", "secret": true }
Responses
201
Successfully created workspace variable.
400
Bad Request
401
Invalid credentials for the requested resource.
403
The feature you're trying to use is not available for your organization.
404
Resource not found.
409
The request has a conflict.
201
status
stringrequired
The outcome of the creation request
enum:
data
objectrequired
The key, value, and secret status of a workspace variable
key
stringrequired
Keys cannot contain whitespaces
value
string | integer | booleanrequired
secret
booleanrequired
Whether this variable contains secret or sensitive information, like a password. Secret variables can only be used in secret connection credentials.
400
status
string
The outcome of the request
enum:
message
string
The reason the request failed
example:
401
status
integer
HTTP status code.
enum:
403
status
integer
HTTP status code.
enum:
message
string
Error message.
example:
404
status
integer
HTTP status code.
enum:
409
status
integer
HTTP status code.
enum:
{ "status": "success", "data": { "key": "string", "value": "string", "secret": true } }