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

{
	"announcement_banners": [
		{
			"background_color": "string",
			"enabled": true,
			"message": "string"
		}
	],
	"application_name": "string",
	"docs_url": "string",
	"logo_url": "string",
	"service_banner": {
		"background_color": "string",
		"enabled": true,
		"message": "string"
	},
	"support_links": [
		{
			"icon": "bug",
			"name": "string",
			"target": "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

{
	"announcement_banners": [
		{
			"background_color": "string",
			"enabled": true,
			"message": "string"
		}
	],
	"application_name": "string",
	"logo_url": "string",
	"service_banner": {
		"background_color": "string",
		"enabled": true,
		"message": "string"
	}
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.UpdateAppearanceConfigtrueUpdate appearance request

Example responses

200 Response

{
	"announcement_banners": [
		{
			"background_color": "string",
			"enabled": true,
			"message": "string"
		}
	],
	"application_name": "string",
	"logo_url": "string",
	"service_banner": {
		"background_color": "string",
		"enabled": true,
		"message": "string"
	}
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.UpdateAppearanceConfig

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"],
	"features": {
		"property1": {
			"actual": 0,
			"enabled": true,
			"entitlement": "entitled",
			"limit": 0
		},
		"property2": {
			"actual": 0,
			"enabled": true,
			"entitlement": "entitled",
			"limit": 0
		}
	},
	"has_license": true,
	"refreshed_at": "2019-08-24T14:15:22Z",
	"require_telemetry": 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?organization=string&has_member=string&group_ids=string \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /groups

Parameters

NameInTypeRequiredDescription
organizationquerystringtrueOrganization ID or name
has_memberquerystringtrueUser ID or name
group_idsquerystringtrueComma separated list of group IDs

Example responses

200 Response

[
	{
		"avatar_url": "string",
		"display_name": "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",
				"login_type": "",
				"name": "string",
				"status": "active",
				"theme_preference": "string",
				"updated_at": "2019-08-24T14:15:22Z",
				"username": "string"
			}
		],
		"name": "string",
		"organization_display_name": "string",
		"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
		"organization_name": "string",
		"quota_allowance": 0,
		"source": "user",
		"total_member_count": 0
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.Group

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» avatar_urlstringfalse
» display_namestringfalse
» 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
»» login_typecodersdk.LoginTypefalse
»» namestringfalse
»» statuscodersdk.UserStatusfalse
»» theme_preferencestringfalse
»» updated_atstring(date-time)false
»» usernamestringtrue
» namestringfalse
» organization_display_namestringfalse
» organization_idstring(uuid)false
» organization_namestringfalse
» quota_allowanceintegerfalse
» sourcecodersdk.GroupSourcefalse
» total_member_countintegerfalseHow many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).

Enumerated Values

PropertyValue
login_type``
login_typepassword
login_typegithub
login_typeoidc
login_typetoken
login_typenone
statusactive
statussuspended
sourceuser
sourceoidc

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

Get group by ID

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 id

Example responses

200 Response

{
	"avatar_url": "string",
	"display_name": "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",
			"login_type": "",
			"name": "string",
			"status": "active",
			"theme_preference": "string",
			"updated_at": "2019-08-24T14:15:22Z",
			"username": "string"
		}
	],
	"name": "string",
	"organization_display_name": "string",
	"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
	"organization_name": "string",
	"quota_allowance": 0,
	"source": "user",
	"total_member_count": 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",
	"display_name": "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",
			"login_type": "",
			"name": "string",
			"status": "active",
			"theme_preference": "string",
			"updated_at": "2019-08-24T14:15:22Z",
			"username": "string"
		}
	],
	"name": "string",
	"organization_display_name": "string",
	"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
	"organization_name": "string",
	"quota_allowance": 0,
	"source": "user",
	"total_member_count": 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 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

PATCH /groups/{group}

Body parameter

{
	"add_users": ["string"],
	"avatar_url": "string",
	"display_name": "string",
	"name": "string",
	"quota_allowance": 0,
	"remove_users": ["string"]
}

Parameters

NameInTypeRequiredDescription
grouppathstringtrueGroup name
bodybodycodersdk.PatchGroupRequesttruePatch group request

Example responses

200 Response

{
	"avatar_url": "string",
	"display_name": "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",
			"login_type": "",
			"name": "string",
			"status": "active",
			"theme_preference": "string",
			"updated_at": "2019-08-24T14:15:22Z",
			"username": "string"
		}
	],
	"name": "string",
	"organization_display_name": "string",
	"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
	"organization_name": "string",
	"quota_allowance": 0,
	"source": "user",
	"total_member_count": 0
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Group

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

Get JFrog XRay scan by workspace agent ID.

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/integrations/jfrog/xray-scan?workspace_id=string&agent_id=string \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /integrations/jfrog/xray-scan

Parameters

NameInTypeRequiredDescription
workspace_idquerystringtrueWorkspace ID
agent_idquerystringtrueAgent ID

Example responses

200 Response

{
	"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
	"critical": 0,
	"high": 0,
	"medium": 0,
	"results_url": "string",
	"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.JFrogXrayScan

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

Post JFrog XRay scan by workspace agent ID.

Code samples

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

POST /integrations/jfrog/xray-scan

Body parameter

{
	"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
	"critical": 0,
	"high": 0,
	"medium": 0,
	"results_url": "string",
	"workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.JFrogXrayScantruePost JFrog XRay scan 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 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.

Update notification template dispatch method

Code samples

# Example request using curl
curl -X PUT http://coder-server:8080/api/v2/notifications/templates/{notification_template}/method \
  -H 'Coder-Session-Token: API_KEY'

PUT /notifications/templates/{notification_template}/method

Parameters

NameInTypeRequiredDescription
notification_templatepathstringtrueNotification template UUID

Responses

StatusMeaningDescriptionSchema
200OKSuccess
304Not ModifiedNot modified

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

Get OAuth2 applications.

Code samples

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

GET /oauth2-provider/apps

Parameters

NameInTypeRequiredDescription
user_idquerystringfalseFilter by applications authorized for a user

Example responses

200 Response

[
	{
		"callback_url": "string",
		"endpoints": {
			"authorization": "string",
			"device_authorization": "string",
			"token": "string"
		},
		"icon": "string",
		"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
		"name": "string"
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.OAuth2ProviderApp

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» callback_urlstringfalse
» endpointscodersdk.OAuth2AppEndpointsfalseEndpoints are included in the app response for easier discovery. The OAuth2 spec does not have a defined place to find these (for comparison, OIDC has a '/.well-known/openid-configuration' endpoint).
»» authorizationstringfalse
»» device_authorizationstringfalseDevice authorization is optional.
»» tokenstringfalse
» iconstringfalse
» idstring(uuid)false
» namestringfalse

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

Create OAuth2 application.

Code samples

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

POST /oauth2-provider/apps

Body parameter

{
	"callback_url": "string",
	"icon": "string",
	"name": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.PostOAuth2ProviderAppRequesttrueThe OAuth2 application to create.

Example responses

200 Response

{
	"callback_url": "string",
	"endpoints": {
		"authorization": "string",
		"device_authorization": "string",
		"token": "string"
	},
	"icon": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.OAuth2ProviderApp

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

Get OAuth2 application.

Code samples

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

GET /oauth2-provider/apps/{app}

Parameters

NameInTypeRequiredDescription
apppathstringtrueApp ID

Example responses

200 Response

{
	"callback_url": "string",
	"endpoints": {
		"authorization": "string",
		"device_authorization": "string",
		"token": "string"
	},
	"icon": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.OAuth2ProviderApp

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

Update OAuth2 application.

Code samples

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

PUT /oauth2-provider/apps/{app}

Body parameter

{
	"callback_url": "string",
	"icon": "string",
	"name": "string"
}

Parameters

NameInTypeRequiredDescription
apppathstringtrueApp ID
bodybodycodersdk.PutOAuth2ProviderAppRequesttrueUpdate an OAuth2 application.

Example responses

200 Response

{
	"callback_url": "string",
	"endpoints": {
		"authorization": "string",
		"device_authorization": "string",
		"token": "string"
	},
	"icon": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.OAuth2ProviderApp

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

Delete OAuth2 application.

Code samples

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

DELETE /oauth2-provider/apps/{app}

Parameters

NameInTypeRequiredDescription
apppathstringtrueApp ID

Responses

StatusMeaningDescriptionSchema
204No ContentNo Content

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

Get OAuth2 application secrets.

Code samples

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

GET /oauth2-provider/apps/{app}/secrets

Parameters

NameInTypeRequiredDescription
apppathstringtrueApp ID

Example responses

200 Response

[
	{
		"client_secret_truncated": "string",
		"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
		"last_used_at": "string"
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.OAuth2ProviderAppSecret

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» client_secret_truncatedstringfalse
» idstring(uuid)false
» last_used_atstringfalse

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

Create OAuth2 application secret.

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/oauth2-provider/apps/{app}/secrets \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

POST /oauth2-provider/apps/{app}/secrets

Parameters

NameInTypeRequiredDescription
apppathstringtrueApp ID

Example responses

200 Response

[
	{
		"client_secret_full": "string",
		"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.OAuth2ProviderAppSecretFull

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» client_secret_fullstringfalse
» idstring(uuid)false

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

Delete OAuth2 application secret.

Code samples

# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/oauth2-provider/apps/{app}/secrets/{secretID} \
  -H 'Coder-Session-Token: API_KEY'

DELETE /oauth2-provider/apps/{app}/secrets/{secretID}

Parameters

NameInTypeRequiredDescription
apppathstringtrueApp ID
secretIDpathstringtrueSecret ID

Responses

StatusMeaningDescriptionSchema
204No ContentNo Content

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

OAuth2 authorization request.

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/oauth2/authorize?client_id=string&state=string&response_type=code \
  -H 'Coder-Session-Token: API_KEY'

POST /oauth2/authorize

Parameters

NameInTypeRequiredDescription
client_idquerystringtrueClient ID
statequerystringtrueA random unguessable string
response_typequerystringtrueResponse type
redirect_uriquerystringfalseRedirect here after authorization
scopequerystringfalseToken scopes (currently ignored)

Enumerated Values

ParameterValue
response_typecode

Responses

StatusMeaningDescriptionSchema
302FoundFound

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

OAuth2 token exchange.

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/oauth2/tokens \
  -H 'Accept: application/json'

POST /oauth2/tokens

Body parameter

client_id: string
client_secret: string
code: string
refresh_token: string
grant_type: authorization_code

Parameters

NameInTypeRequiredDescription
bodybodyobjectfalse
» client_idbodystringfalseClient ID, required if grant_type=authorization_code
» client_secretbodystringfalseClient secret, required if grant_type=authorization_code
» codebodystringfalseAuthorization code, required if grant_type=authorization_code
» refresh_tokenbodystringfalseRefresh token, required if grant_type=refresh_token
» grant_typebodystringtrueGrant type

Enumerated Values

ParameterValue
» grant_typeauthorization_code
» grant_typerefresh_token

Example responses

200 Response

{
	"access_token": "string",
	"expires_in": 0,
	"expiry": "string",
	"refresh_token": "string",
	"token_type": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKoauth2.Token

Delete OAuth2 application tokens.

Code samples

# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/oauth2/tokens?client_id=string \
  -H 'Coder-Session-Token: API_KEY'

DELETE /oauth2/tokens

Parameters

NameInTypeRequiredDescription
client_idquerystringtrueClient ID

Responses

StatusMeaningDescriptionSchema
204No ContentNo Content

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",
		"display_name": "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",
				"login_type": "",
				"name": "string",
				"status": "active",
				"theme_preference": "string",
				"updated_at": "2019-08-24T14:15:22Z",
				"username": "string"
			}
		],
		"name": "string",
		"organization_display_name": "string",
		"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
		"organization_name": "string",
		"quota_allowance": 0,
		"source": "user",
		"total_member_count": 0
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.Group

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» avatar_urlstringfalse
» display_namestringfalse
» 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
»» login_typecodersdk.LoginTypefalse
»» namestringfalse
»» statuscodersdk.UserStatusfalse
»» theme_preferencestringfalse
»» updated_atstring(date-time)false
»» usernamestringtrue
» namestringfalse
» organization_display_namestringfalse
» organization_idstring(uuid)false
» organization_namestringfalse
» quota_allowanceintegerfalse
» sourcecodersdk.GroupSourcefalse
» total_member_countintegerfalseHow many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).

Enumerated Values

PropertyValue
login_type``
login_typepassword
login_typegithub
login_typeoidc
login_typetoken
login_typenone
statusactive
statussuspended
sourceuser
sourceoidc

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

Create group for organization

Code samples

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

POST /organizations/{organization}/groups

Body parameter

{
	"avatar_url": "string",
	"display_name": "string",
	"name": "string",
	"quota_allowance": 0
}

Parameters

NameInTypeRequiredDescription
organizationpathstringtrueOrganization ID
bodybodycodersdk.CreateGroupRequesttrueCreate group request

Example responses

201 Response

{
	"avatar_url": "string",
	"display_name": "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",
			"login_type": "",
			"name": "string",
			"status": "active",
			"theme_preference": "string",
			"updated_at": "2019-08-24T14:15:22Z",
			"username": "string"
		}
	],
	"name": "string",
	"organization_display_name": "string",
	"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
	"organization_name": "string",
	"quota_allowance": 0,
	"source": "user",
	"total_member_count": 0
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreatedcodersdk.Group

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",
	"display_name": "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",
			"login_type": "",
			"name": "string",
			"status": "active",
			"theme_preference": "string",
			"updated_at": "2019-08-24T14:15:22Z",
			"username": "string"
		}
	],
	"name": "string",
	"organization_display_name": "string",
	"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
	"organization_name": "string",
	"quota_allowance": 0,
	"source": "user",
	"total_member_count": 0
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Group

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/organizations/{organization}/members/{user}/workspace-quota \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /organizations/{organization}/members/{user}/workspace-quota

Parameters

NameInTypeRequiredDescription
userpathstringtrueUser ID, name, or me
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

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

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.WorkspaceQuota

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
tagsqueryobjectfalseProvisioner tags to filter by (JSON of the form {'tag1':'value1','tag2':'value2'})

Example responses

200 Response

[
	{
		"api_version": "string",
		"created_at": "2019-08-24T14:15:22Z",
		"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
		"key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
		"last_seen_at": "2019-08-24T14:15:22Z",
		"name": "string",
		"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
		"provisioners": ["string"],
		"tags": {
			"property1": "string",
			"property2": "string"
		},
		"version": "string"
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.ProvisionerDaemon

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» api_versionstringfalse
» created_atstring(date-time)false
» idstring(uuid)false
» key_idstring(uuid)false
» last_seen_atstring(date-time)false
» namestringfalse
» organization_idstring(uuid)false
» provisionersarrayfalse
» tagsobjectfalse
»» [any property]stringfalse
» versionstringfalse

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.

List provisioner key

Code samples

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

GET /organizations/{organization}/provisionerkeys

Parameters

NameInTypeRequiredDescription
organizationpathstringtrueOrganization ID

Example responses

200 Response

[
	{
		"created_at": "2019-08-24T14:15:22Z",
		"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
		"name": "string",
		"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
		"tags": {
			"property1": "string",
			"property2": "string"
		}
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.ProvisionerKey

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» created_atstring(date-time)false
» idstring(uuid)false
» namestringfalse
» organizationstring(uuid)false
» tagscodersdk.ProvisionerKeyTagsfalse
»» [any property]stringfalse

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

Create provisioner key

Code samples

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

POST /organizations/{organization}/provisionerkeys

Parameters

NameInTypeRequiredDescription
organizationpathstringtrueOrganization ID

Example responses

201 Response

{
	"key": "string"
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreatedcodersdk.CreateProvisionerKeyResponse

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

List provisioner key daemons

Code samples

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

GET /organizations/{organization}/provisionerkeys/daemons

Parameters

NameInTypeRequiredDescription
organizationpathstringtrueOrganization ID

Example responses

200 Response

[
	{
		"daemons": [
			{
				"api_version": "string",
				"created_at": "2019-08-24T14:15:22Z",
				"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
				"key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
				"last_seen_at": "2019-08-24T14:15:22Z",
				"name": "string",
				"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
				"provisioners": ["string"],
				"tags": {
					"property1": "string",
					"property2": "string"
				},
				"version": "string"
			}
		],
		"key": {
			"created_at": "2019-08-24T14:15:22Z",
			"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
			"name": "string",
			"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
			"tags": {
				"property1": "string",
				"property2": "string"
			}
		}
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.ProvisionerKeyDaemons

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» daemonsarrayfalse
»» api_versionstringfalse
»» created_atstring(date-time)false
»» idstring(uuid)false
»» key_idstring(uuid)false
»» last_seen_atstring(date-time)false
»» namestringfalse
»» organization_idstring(uuid)false
»» provisionersarrayfalse
»» tagsobjectfalse
»»» [any property]stringfalse
»» versionstringfalse
» keycodersdk.ProvisionerKeyfalse
»» created_atstring(date-time)false
»» idstring(uuid)false
»» namestringfalse
»» organizationstring(uuid)false
»» tagscodersdk.ProvisionerKeyTagsfalse
»»» [any property]stringfalse

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

Delete provisioner key

Code samples

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

DELETE /organizations/{organization}/provisionerkeys/{provisionerkey}

Parameters

NameInTypeRequiredDescription
organizationpathstringtrueOrganization ID
provisionerkeypathstringtrueProvisioner key name

Responses

StatusMeaningDescriptionSchema
204No ContentNo Content

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

Get the available organization idp sync claim fields

Code samples

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

GET /organizations/{organization}/settings/idpsync/available-fields

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

["string"]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of string

Response Schema

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

Get group IdP Sync settings by organization

Code samples

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

GET /organizations/{organization}/settings/idpsync/groups

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

{
	"auto_create_missing_groups": true,
	"field": "string",
	"legacy_group_name_mapping": {
		"property1": "string",
		"property2": "string"
	},
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	},
	"regex_filter": {}
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.GroupSyncSettings

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

Update group IdP Sync settings by organization

Code samples

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

PATCH /organizations/{organization}/settings/idpsync/groups

Body parameter

{
	"auto_create_missing_groups": true,
	"field": "string",
	"legacy_group_name_mapping": {
		"property1": "string",
		"property2": "string"
	},
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	},
	"regex_filter": {}
}

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID
bodybodycodersdk.GroupSyncSettingstrueNew settings

Example responses

200 Response

{
	"auto_create_missing_groups": true,
	"field": "string",
	"legacy_group_name_mapping": {
		"property1": "string",
		"property2": "string"
	},
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	},
	"regex_filter": {}
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.GroupSyncSettings

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

Get role IdP Sync settings by organization

Code samples

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

GET /organizations/{organization}/settings/idpsync/roles

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

{
	"field": "string",
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	}
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.RoleSyncSettings

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

Update role IdP Sync settings by organization

Code samples

# Example request using curl
curl -X PATCH http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/roles \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

PATCH /organizations/{organization}/settings/idpsync/roles

Body parameter

{
	"field": "string",
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	}
}

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID
bodybodycodersdk.RoleSyncSettingstrueNew settings

Example responses

200 Response

{
	"field": "string",
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	}
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.RoleSyncSettings

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

Fetch provisioner key details

Code samples

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

GET /provisionerkeys/{provisionerkey}

Parameters

NameInTypeRequiredDescription
provisionerkeypathstringtrueProvisioner Key

Example responses

200 Response

{
	"created_at": "2019-08-24T14:15:22Z",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string",
	"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
	"tags": {
		"property1": "string",
		"property2": "string"
	}
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.ProvisionerKey

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: Service Provider Config

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/scim/v2/ServiceProviderConfig

GET /scim/v2/ServiceProviderConfig

Responses

StatusMeaningDescriptionSchema
200OKOK

SCIM 2.0: Get users

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/scim/v2/Users \
  -H 'Authorizaiton: 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 'Authorizaiton: 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 'Authorizaiton: 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 'Authorizaiton: 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",
	"login_type": "",
	"name": "string",
	"organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
	"roles": [
		{
			"display_name": "string",
			"name": "string",
			"organization_id": "string"
		}
	],
	"status": "active",
	"theme_preference": "string",
	"updated_at": "2019-08-24T14:15:22Z",
	"username": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.User

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

Get the available idp sync claim fields

Code samples

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

GET /settings/idpsync/available-fields

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

["string"]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of string

Response Schema

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

Get organization IdP Sync settings

Code samples

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

GET /settings/idpsync/organization

Example responses

200 Response

{
	"field": "string",
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	},
	"organization_assign_default": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.OrganizationSyncSettings

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

Update organization IdP Sync settings

Code samples

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

PATCH /settings/idpsync/organization

Body parameter

{
	"field": "string",
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	},
	"organization_assign_default": true
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.OrganizationSyncSettingstrueNew settings

Example responses

200 Response

{
	"field": "string",
	"mapping": {
		"property1": ["string"],
		"property2": ["string"]
	},
	"organization_assign_default": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.OrganizationSyncSettings

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",
		"login_type": "",
		"name": "string",
		"organization_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
		"role": "admin",
		"roles": [
			{
				"display_name": "string",
				"name": "string",
				"organization_id": "string"
			}
		],
		"status": "active",
		"theme_preference": "string",
		"updated_at": "2019-08-24T14:15:22Z",
		"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
» login_typecodersdk.LoginTypefalse
» namestringfalse
» organization_idsarrayfalse
» rolecodersdk.TemplateRolefalse
» rolesarrayfalse
»» display_namestringfalse
»» namestringfalse
»» organization_idstringfalse
» statuscodersdk.UserStatusfalse
» theme_preferencestringfalse
» updated_atstring(date-time)false
» usernamestringtrue

Enumerated Values

PropertyValue
login_type``
login_typepassword
login_typegithub
login_typeoidc
login_typetoken
login_typenone
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": {
		"8bd26b20-f3e8-48be-a903-46bb920cf671": "use",
		"<user_id>>": "admin"
	},
	"user_perms": {
		"4df59e74-c027-470b-ab4d-cbba8963a5e9": "use",
		"<group_id>": "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 template available acl users/groups

Code samples

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

GET /templates/{template}/acl/available

Parameters

NameInTypeRequiredDescription
templatepathstring(uuid)trueTemplate ID

Example responses

200 Response

[
	{
		"groups": [
			{
				"avatar_url": "string",
				"display_name": "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",
						"login_type": "",
						"name": "string",
						"status": "active",
						"theme_preference": "string",
						"updated_at": "2019-08-24T14:15:22Z",
						"username": "string"
					}
				],
				"name": "string",
				"organization_display_name": "string",
				"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
				"organization_name": "string",
				"quota_allowance": 0,
				"source": "user",
				"total_member_count": 0
			}
		],
		"users": [
			{
				"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",
				"login_type": "",
				"name": "string",
				"status": "active",
				"theme_preference": "string",
				"updated_at": "2019-08-24T14:15:22Z",
				"username": "string"
			}
		]
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.ACLAvailable

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» groupsarrayfalse
»» avatar_urlstringfalse
»» display_namestringfalse
»» 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
»»» login_typecodersdk.LoginTypefalse
»»» namestringfalse
»»» statuscodersdk.UserStatusfalse
»»» theme_preferencestringfalse
»»» updated_atstring(date-time)false
»»» usernamestringtrue
»» namestringfalse
»» organization_display_namestringfalse
»» organization_idstring(uuid)false
»» organization_namestringfalse
»» quota_allowanceintegerfalse
»» sourcecodersdk.GroupSourcefalse
»» total_member_countintegerfalseHow many members are in this group. Shows the total count, even if the user is not authorized to read group member details. May be greater than len(Group.Members).
» usersarrayfalse

Enumerated Values

PropertyValue
login_type``
login_typepassword
login_typegithub
login_typeoidc
login_typetoken
login_typenone
statusactive
statussuspended
sourceuser
sourceoidc

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

Get user quiet hours schedule

Code samples

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

GET /users/{user}/quiet-hours

Parameters

NameInTypeRequiredDescription
userpathstring(uuid)trueUser ID

Example responses

200 Response

[
	{
		"next": "2019-08-24T14:15:22Z",
		"raw_schedule": "string",
		"time": "string",
		"timezone": "string",
		"user_can_set": true,
		"user_set": true
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.UserQuietHoursScheduleResponse

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» nextstring(date-time)falseNext is the next time that the quiet hours window will start.
» raw_schedulestringfalse
» timestringfalseTime is the time of day that the quiet hours window starts in the given Timezone each day.
» timezonestringfalseraw format from the cron expression, UTC if unspecified
» user_can_setbooleanfalseUser can set is true if the user is allowed to set their own quiet hours schedule. If false, the user cannot set a custom schedule and the default schedule will always be used.
» user_setbooleanfalseUser set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule.

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

Update user quiet hours schedule

Code samples

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

PUT /users/{user}/quiet-hours

Body parameter

{
	"schedule": "string"
}

Parameters

NameInTypeRequiredDescription
userpathstring(uuid)trueUser ID
bodybodycodersdk.UpdateUserQuietHoursScheduleRequesttrueUpdate schedule request

Example responses

200 Response

[
	{
		"next": "2019-08-24T14:15:22Z",
		"raw_schedule": "string",
		"time": "string",
		"timezone": "string",
		"user_can_set": true,
		"user_set": true
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.UserQuietHoursScheduleResponse

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» nextstring(date-time)falseNext is the next time that the quiet hours window will start.
» raw_schedulestringfalse
» timestringfalseTime is the time of day that the quiet hours window starts in the given Timezone each day.
» timezonestringfalseraw format from the cron expression, UTC if unspecified
» user_can_setbooleanfalseUser can set is true if the user is allowed to set their own quiet hours schedule. If false, the user cannot set a custom schedule and the default schedule will always be used.
» user_setbooleanfalseUser set is true if the user has set their own quiet hours schedule. If false, the user is using the default schedule.

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

Get workspace quota by user deprecated

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.

Get workspace proxies

Code samples

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

GET /workspaceproxies

Example responses

200 Response

[
	{
		"regions": [
			{
				"created_at": "2019-08-24T14:15:22Z",
				"deleted": true,
				"derp_enabled": true,
				"derp_only": true,
				"display_name": "string",
				"healthy": true,
				"icon_url": "string",
				"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
				"name": "string",
				"path_app_url": "string",
				"status": {
					"checked_at": "2019-08-24T14:15:22Z",
					"report": {
						"errors": ["string"],
						"warnings": ["string"]
					},
					"status": "ok"
				},
				"updated_at": "2019-08-24T14:15:22Z",
				"version": "string",
				"wildcard_hostname": "string"
			}
		]
	}
]

Responses

StatusMeaningDescriptionSchema
200OKOKarray of codersdk.RegionsResponse-codersdk_WorkspaceProxy

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
[array item]arrayfalse
» regionsarrayfalse
»» created_atstring(date-time)false
»» deletedbooleanfalse
»» derp_enabledbooleanfalse
»» derp_onlybooleanfalse
»» display_namestringfalse
»» healthybooleanfalse
»» icon_urlstringfalse
»» idstring(uuid)false
»» namestringfalse
»» path_app_urlstringfalsePath app URL is the URL to the base path for path apps. Optional unless wildcard_hostname is set. E.g. https://us.example.com
»» statuscodersdk.WorkspaceProxyStatusfalseStatus is the latest status check of the proxy. This will be empty for deleted proxies. This value can be used to determine if a workspace proxy is healthy and ready to use.
»»» checked_atstring(date-time)false
»»» reportcodersdk.ProxyHealthReportfalseReport provides more information about the health of the workspace proxy.
»»»» errorsarrayfalseErrors are problems that prevent the workspace proxy from being healthy
»»»» warningsarrayfalseWarnings do not prevent the workspace proxy from being healthy, but should be addressed.
»»» statuscodersdk.ProxyHealthStatusfalse
»» updated_atstring(date-time)false
»» versionstringfalse
»» wildcard_hostnamestringfalseWildcard hostname is the wildcard hostname for subdomain apps. E.g. _.us.example.com E.g. _--suffix.au.example.com Optional. Does not need to be on the same domain as PathAppURL.

Enumerated Values

PropertyValue
statusok
statusunreachable
statusunhealthy
statusunregistered

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

Create workspace proxy

Code samples

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

POST /workspaceproxies

Body parameter

{
	"display_name": "string",
	"icon": "string",
	"name": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.CreateWorkspaceProxyRequesttrueCreate workspace proxy request

Example responses

201 Response

{
	"created_at": "2019-08-24T14:15:22Z",
	"deleted": true,
	"derp_enabled": true,
	"derp_only": true,
	"display_name": "string",
	"healthy": true,
	"icon_url": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string",
	"path_app_url": "string",
	"status": {
		"checked_at": "2019-08-24T14:15:22Z",
		"report": {
			"errors": ["string"],
			"warnings": ["string"]
		},
		"status": "ok"
	},
	"updated_at": "2019-08-24T14:15:22Z",
	"version": "string",
	"wildcard_hostname": "string"
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreatedcodersdk.WorkspaceProxy

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

Get workspace proxy

Code samples

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

GET /workspaceproxies/{workspaceproxy}

Parameters

NameInTypeRequiredDescription
workspaceproxypathstring(uuid)trueProxy ID or name

Example responses

200 Response

{
	"created_at": "2019-08-24T14:15:22Z",
	"deleted": true,
	"derp_enabled": true,
	"derp_only": true,
	"display_name": "string",
	"healthy": true,
	"icon_url": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string",
	"path_app_url": "string",
	"status": {
		"checked_at": "2019-08-24T14:15:22Z",
		"report": {
			"errors": ["string"],
			"warnings": ["string"]
		},
		"status": "ok"
	},
	"updated_at": "2019-08-24T14:15:22Z",
	"version": "string",
	"wildcard_hostname": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.WorkspaceProxy

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

Delete workspace proxy

Code samples

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

DELETE /workspaceproxies/{workspaceproxy}

Parameters

NameInTypeRequiredDescription
workspaceproxypathstring(uuid)trueProxy ID or name

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.

Update workspace proxy

Code samples

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

PATCH /workspaceproxies/{workspaceproxy}

Body parameter

{
	"display_name": "string",
	"icon": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string",
	"regenerate_token": true
}

Parameters

NameInTypeRequiredDescription
workspaceproxypathstring(uuid)trueProxy ID or name
bodybodycodersdk.PatchWorkspaceProxytrueUpdate workspace proxy request

Example responses

200 Response

{
	"created_at": "2019-08-24T14:15:22Z",
	"deleted": true,
	"derp_enabled": true,
	"derp_only": true,
	"display_name": "string",
	"healthy": true,
	"icon_url": "string",
	"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
	"name": "string",
	"path_app_url": "string",
	"status": {
		"checked_at": "2019-08-24T14:15:22Z",
		"report": {
			"errors": ["string"],
			"warnings": ["string"]
		},
		"status": "ok"
	},
	"updated_at": "2019-08-24T14:15:22Z",
	"version": "string",
	"wildcard_hostname": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.WorkspaceProxy

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

See an opportunity to improve our docs? Make an edit.
On this page