Get parameters
Code samples
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/parameters/{scope}/{id} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
GET /parameters/{scope}/{id}
Parameters
Name In Type Required Description scopepath string true Scope idpath string(uuid) true ID
Enumerated Values
Parameter Value scopetemplatescopeworkspacescopeimport_job
Example responses
200 Response
[
{
"created_at": "2019-08-24T14:15:22Z",
"destination_scheme": "none",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"scope": "template",
"scope_id": "5d3fe357-12dd-4f62-b004-6d1fb3b8454f",
"source_scheme": "none",
"updated_at": "2019-08-24T14:15:22Z"
}
]
Responses
Response Schema
Status Code 200
Enumerated Values
Property Value destination_schemenonedestination_schemeenvironment_variabledestination_schemeprovisioner_variablescopetemplatescopeworkspacescopeimport_jobsource_schemenonesource_schemedata
To perform this operation, you must be authenticated. Learn more .
Create parameter
Code samples
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/parameters/{scope}/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
POST /parameters/{scope}/{id}
Body parameter
{
"copy_from_parameter": "000e07d6-021d-446c-be14-48a9c20bca0b",
"destination_scheme": "none",
"name": "string",
"source_scheme": "none",
"source_value": "string"
}
Parameters
Enumerated Values
Parameter Value scopetemplatescopeworkspacescopeimport_job
Example responses
201 Response
{
"created_at": "2019-08-24T14:15:22Z",
"destination_scheme": "none",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"scope": "template",
"scope_id": "5d3fe357-12dd-4f62-b004-6d1fb3b8454f",
"source_scheme": "none",
"updated_at": "2019-08-24T14:15:22Z"
}
Responses
To perform this operation, you must be authenticated. Learn more .
Delete parameter
Code samples
# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/parameters/{scope}/{id}/{name} \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
DELETE /parameters/{scope}/{id}/{name}
Parameters
Name In Type Required Description scopepath string true Scope idpath string(uuid) true ID namepath string true Name
Enumerated Values
Parameter Value scopetemplatescopeworkspacescopeimport_job
Example responses
200 Response
{
"detail": "string",
"message": "string",
"validations": [
{
"detail": "string",
"field": "string"
}
]
}
Responses
To perform this operation, you must be authenticated. Learn more .