# Example request using curl
curl -X GET http://coder-server:8080/api/v2/auth/scopes \
-H 'Accept: application/json'GET /api/v2/auth/scopes
200 Response
{
"external": [
"all"
]
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | codersdk.ExternalAPIKeyScopes |
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/authcheck \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'POST /api/v2/authcheck
Body parameter
{
"checks": {
"property1": {
"action": "create",
"object": {
"any_org": true,
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "*"
}
},
"property2": {
"action": "create",
"object": {
"any_org": true,
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "*"
}
}
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
body |
body | codersdk.AuthorizationRequest | true | Authorization request |
200 Response
{
"property1": true,
"property2": true
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | codersdk.AuthorizationResponse |
To perform this operation, you must be authenticated. Learn more.
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/login \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'POST /api/v2/users/login
Body parameter
{
"email": "user@example.com",
"password": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
body |
body | codersdk.LoginWithPasswordRequest | true | Login request |
201 Response
{
"session_token": "string"
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | codersdk.LoginWithPasswordResponse |
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/otp/change-password \
-H 'Content-Type: application/json'POST /api/v2/users/otp/change-password
Body parameter
{
"email": "user@example.com",
"one_time_passcode": "string",
"password": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
body |
body | codersdk.ChangePasswordWithOneTimePasscodeRequest | true | Change password request |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | No Content |
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/otp/request \
-H 'Content-Type: application/json'POST /api/v2/users/otp/request
Body parameter
{
"email": "user@example.com"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
body |
body | codersdk.RequestOneTimePasscodeRequest | true | One-time passcode request |
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | No Content |
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/validate-password \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'POST /api/v2/users/validate-password
Body parameter
{
"password": "string"
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
body |
body | codersdk.ValidateUserPasswordRequest | true | Validate user password request |
200 Response
{
"details": "string",
"valid": true
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | codersdk.ValidateUserPasswordResponse |
To perform this operation, you must be authenticated. Learn more.
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'POST /api/v2/users/{user}/convert-login
Body parameter
{
"password": "string",
"to_type": ""
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
user |
path | string | true | User ID, name, or me |
body |
body | codersdk.ConvertLoginRequest | true | Convert request |
201 Response
{
"expires_at": "2019-08-24T14:15:22Z",
"state_string": "string",
"to_type": "",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | codersdk.OAuthConversionResponse |
To perform this operation, you must be authenticated. Learn more.