HomeAPIEnterprise

Enterprise

Get appearance

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/appearance \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /appearance

Example responses

200 Response

{ "logo_url": "string", "service_banner": { "background_color": "string", "enabled": true, "message": "string" } }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.AppearanceConfig

To perform this operation, you must be authenticated. Learn more.

Update appearance

Code samples

# Example request using curl curl -X PUT http://coder-server:8080/api/v2/appearance \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

PUT /appearance

Body parameter

{ "logo_url": "string", "service_banner": { "background_color": "string", "enabled": true, "message": "string" } }

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.AppearanceConfigtrueUpdate appearance request

Example responses

200 Response

{ "logo_url": "string", "service_banner": { "background_color": "string", "enabled": true, "message": "string" } }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.AppearanceConfig

To perform this operation, you must be authenticated. Learn more.

Get entitlements

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/entitlements \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /entitlements

Example responses

200 Response

{ "errors": ["string"], "experimental": true, "features": { "property1": { "actual": 0, "enabled": true, "entitlement": "entitled", "limit": 0 }, "property2": { "actual": 0, "enabled": true, "entitlement": "entitled", "limit": 0 } }, "has_license": true, "trial": true, "warnings": ["string"] }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Entitlements

To perform this operation, you must be authenticated. Learn more.

Get groups

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/groups \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /groups

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

[ { "avatar_url": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "members": [ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ], "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "quota_allowance": 0 } ]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.Group

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» avatar_urlstringfalse
» idstring(uuid)false
» membersarrayfalse
»» avatar_urlstring(uri)false
»» created_atstring(date-time)true
»» emailstring(email)true
»» idstring(uuid)true
»» last_seen_atstring(date-time)false
»» organization_idsarrayfalse
»» rolesarrayfalse
»»» display_namestringfalse
»»» namestringfalse
»» statuscodersdk.UserStatusfalse
»» usernamestringtrue
» namestringfalse
» organization_idstring(uuid)false
» quota_allowanceintegerfalse

Enumerated Values

PropertyValue
statusactive
statussuspended

To perform this operation, you must be authenticated. Learn more.

Get group by name

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/groups/{group} \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /groups/{group}

Parameters

NameInTypeRequiredDescription
grouppathstringtrueGroup name

Example responses

200 Response

{ "avatar_url": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "members": [ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ], "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "quota_allowance": 0 }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Group

To perform this operation, you must be authenticated. Learn more.

Delete group by name

Code samples

# Example request using curl curl -X DELETE http://coder-server:8080/api/v2/groups/{group} \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

DELETE /groups/{group}

Parameters

NameInTypeRequiredDescription
grouppathstringtrueGroup name

Example responses

200 Response

{ "avatar_url": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "members": [ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ], "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "quota_allowance": 0 }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Group

To perform this operation, you must be authenticated. Learn more.

Update group by name

Code samples

# Example request using curl curl -X PATCH http://coder-server:8080/api/v2/groups/{group} \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

PATCH /groups/{group}

Parameters

NameInTypeRequiredDescription
grouppathstringtrueGroup name

Example responses

200 Response

{ "avatar_url": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "members": [ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ], "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "quota_allowance": 0 }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Group

To perform this operation, you must be authenticated. Learn more.

Get licenses

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/licenses \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /licenses

Example responses

200 Response

[ { "claims": {}, "id": 0, "uploaded_at": "2019-08-24T14:15:22Z", "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f" } ]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.License

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» claimsobjectfalseClaims are the JWT claims asserted by the license. Here we use a generic string map to ensure that all data from the server is parsed verbatim, not just the fields this version of Coder understands.
» idintegerfalse
» uploaded_atstring(date-time)false
» uuidstring(uuid)false

To perform this operation, you must be authenticated. Learn more.

Delete license

Code samples

# Example request using curl curl -X DELETE http://coder-server:8080/api/v2/licenses/{id} \ -H 'Coder-Session-Token: API_KEY'

DELETE /licenses/{id}

Parameters

NameInTypeRequiredDescription
idpathstring(number)trueLicense ID

Responses

StatusMeaningDescriptionSchema
200OKOK

To perform this operation, you must be authenticated. Learn more.

Get groups by organization

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/groups \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /organizations/{organization}/groups

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

[ { "avatar_url": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "members": [ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ], "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "quota_allowance": 0 } ]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.Group

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» avatar_urlstringfalse
» idstring(uuid)false
» membersarrayfalse
»» avatar_urlstring(uri)false
»» created_atstring(date-time)true
»» emailstring(email)true
»» idstring(uuid)true
»» last_seen_atstring(date-time)false
»» organization_idsarrayfalse
»» rolesarrayfalse
»»» display_namestringfalse
»»» namestringfalse
»» statuscodersdk.UserStatusfalse
»» usernamestringtrue
» namestringfalse
» organization_idstring(uuid)false
» quota_allowanceintegerfalse

Enumerated Values

PropertyValue
statusactive
statussuspended

To perform this operation, you must be authenticated. Learn more.

Get group by organization and group name

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/groups/{groupName} \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /organizations/{organization}/groups/{groupName}

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID
groupNamepathstringtrueGroup name

Example responses

200 Response

{ "avatar_url": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "members": [ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ], "name": "string", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "quota_allowance": 0 }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Group

To perform this operation, you must be authenticated. Learn more.

Get provisioner daemons

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerdaemons \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /organizations/{organization}/provisionerdaemons

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

[ { "created_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "provisioners": ["string"], "tags": { "property1": "string", "property2": "string" }, "updated_at": { "time": "string", "valid": true } } ]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.ProvisionerDaemon

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» created_atstring(date-time)false
» idstring(uuid)false
» namestringfalse
» provisionersarrayfalse
» tagsobjectfalse
»» [any property]stringfalse
» updated_atsql.NullTimefalse
»» timestringfalse
»» validbooleanfalseValid is true if Time is not NULL

To perform this operation, you must be authenticated. Learn more.

Serve provisioner daemon

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/provisionerdaemons/serve \ -H 'Coder-Session-Token: API_KEY'

GET /organizations/{organization}/provisionerdaemons/serve

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Responses

StatusMeaningDescriptionSchema
101Switching ProtocolsSwitching Protocols

To perform this operation, you must be authenticated. Learn more.

Get active replicas

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/replicas \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /replicas

Example responses

200 Response

[ { "created_at": "2019-08-24T14:15:22Z", "database_latency": 0, "error": "string", "hostname": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "region_id": 0, "relay_address": "string" } ]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.Replica

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» created_atstring(date-time)falseCreated at is the timestamp when the replica was first seen.
» database_latencyintegerfalseDatabase latency is the latency in microseconds to the database.
» errorstringfalseError is the replica error.
» hostnamestringfalseHostname is the hostname of the replica.
» idstring(uuid)falseID is the unique identifier for the replica.
» region_idintegerfalseRegion ID is the region of the replica.
» relay_addressstringfalseRelay address is the accessible address to relay DERP connections.

To perform this operation, you must be authenticated. Learn more.

SCIM 2.0: Get users

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/scim/v2/Users \ -H 'Coder-Session-Token: API_KEY'

GET /scim/v2/Users

Responses

StatusMeaningDescriptionSchema
200OKOK

To perform this operation, you must be authenticated. Learn more.

SCIM 2.0: Create new user

Code samples

# Example request using curl curl -X POST http://coder-server:8080/api/v2/scim/v2/Users \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

POST /scim/v2/Users

Body parameter

{ "active": true, "emails": [ { "display": "string", "primary": true, "type": "string", "value": "[email protected]" } ], "groups": [null], "id": "string", "meta": { "resourceType": "string" }, "name": { "familyName": "string", "givenName": "string" }, "schemas": ["string"], "userName": "string" }

Parameters

NameInTypeRequiredDescription
bodybodycoderd.SCIMUsertrueNew user

Example responses

200 Response

{ "active": true, "emails": [ { "display": "string", "primary": true, "type": "string", "value": "[email protected]" } ], "groups": [null], "id": "string", "meta": { "resourceType": "string" }, "name": { "familyName": "string", "givenName": "string" }, "schemas": ["string"], "userName": "string" }

Responses

StatusMeaningDescriptionSchema
200OKOKcoderd.SCIMUser

To perform this operation, you must be authenticated. Learn more.

SCIM 2.0: Get user by ID

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/scim/v2/Users/{id} \ -H 'Coder-Session-Token: API_KEY'

GET /scim/v2/Users/{id}

Parameters

NameInTypeRequiredDescription
idpathstring(uuid)trueUser ID

Responses

StatusMeaningDescriptionSchema
404Not FoundNot Found

To perform this operation, you must be authenticated. Learn more.

SCIM 2.0: Update user account

Code samples

# Example request using curl curl -X PATCH http://coder-server:8080/api/v2/scim/v2/Users/{id} \ -H 'Content-Type: application/json' \ -H 'Accept: application/scim+json' \ -H 'Coder-Session-Token: API_KEY'

PATCH /scim/v2/Users/{id}

Body parameter

{ "active": true, "emails": [ { "display": "string", "primary": true, "type": "string", "value": "[email protected]" } ], "groups": [null], "id": "string", "meta": { "resourceType": "string" }, "name": { "familyName": "string", "givenName": "string" }, "schemas": ["string"], "userName": "string" }

Parameters

NameInTypeRequiredDescription
idpathstring(uuid)trueUser ID
bodybodycoderd.SCIMUsertrueUpdate user request

Example responses

200 Response

{ "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.User

To perform this operation, you must be authenticated. Learn more.

Get template ACLs

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/templates/{template}/acl \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /templates/{template}/acl

Parameters

NameInTypeRequiredDescription
templatepathstring(uuid)trueTemplate ID

Example responses

200 Response

[ { "avatar_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "email": "[email protected]", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_seen_at": "2019-08-24T14:15:22Z", "organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"], "role": "admin", "roles": [ { "display_name": "string", "name": "string" } ], "status": "active", "username": "string" } ]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.TemplateUser

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» avatar_urlstring(uri)false
» created_atstring(date-time)true
» emailstring(email)true
» idstring(uuid)true
» last_seen_atstring(date-time)false
» organization_idsarrayfalse
» rolecodersdk.TemplateRolefalse
» rolesarrayfalse
»» display_namestringfalse
»» namestringfalse
» statuscodersdk.UserStatusfalse
» usernamestringtrue

Enumerated Values

PropertyValue
roleadmin
roleuse
statusactive
statussuspended

To perform this operation, you must be authenticated. Learn more.

Update template ACL

Code samples

# Example request using curl curl -X PATCH http://coder-server:8080/api/v2/templates/{template}/acl \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

PATCH /templates/{template}/acl

Body parameter

{ "group_perms": { "property1": "admin", "property2": "admin" }, "user_perms": { "property1": "admin", "property2": "admin" } }

Parameters

NameInTypeRequiredDescription
templatepathstring(uuid)trueTemplate ID
bodybodycodersdk.UpdateTemplateACLtrueUpdate template request

Example responses

200 Response

{ "detail": "string", "message": "string", "validations": [ { "detail": "string", "field": "string" } ] }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Response

To perform this operation, you must be authenticated. Learn more.

Get workspace quota by user

Code samples

# Example request using curl curl -X GET http://coder-server:8080/api/v2/workspace-quota/{user} \ -H 'Accept: application/json' \ -H 'Coder-Session-Token: API_KEY'

GET /workspace-quota/{user}

Parameters

NameInTypeRequiredDescription
userpathstringtrueUser ID, name, or me

Example responses

200 Response

{ "budget": 0, "credits_consumed": 0 }

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.WorkspaceQuota

To perform this operation, you must be authenticated. Learn more.