mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
* docs: audit, deploymentconfig, files, parameters * Swagger comments in workspacebuilds.go * structs in workspacebuilds.go * workspaceagents: instance identity * workspaceagents.go in progress * workspaceagents.go in progress * Agents * workspacebuilds.go * /workspaces * templates.go, templateversions.go * templateversion.go in progress * cancel * templateversions * wip * Merge * x-apidocgen * NullTime hack not needed anymore * Fix: x-apidocgen * Members * Fixes * Fix * WIP * WIP * Users * Logout * User profile * Status suspend activate * User roles * User tokens * Keys * SSH key * All * Typo * Fix * Fix * Fix: LoginWithPasswordRequest
3.3 KiB
3.3 KiB
Authorization
This page is incomplete, stay tuned.
Check authorization
Code samples
# 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 /authcheck
Body parameter
{
"checks": {
"property1": {
"action": "create",
"object": {
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "string"
}
},
"property2": {
"action": "create",
"object": {
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "string"
}
}
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body |
body | codersdk.AuthorizationRequest | true | Authorization request |
Example responses
200 Response
{
"property1": true,
"property2": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | codersdk.AuthorizationResponse |
To perform this operation, you must be authenticated. Learn more.
Log in user
Code samples
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/users/login \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
POST /users/login
Body parameter
{
"email": "user@example.com",
"password": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body |
body | codersdk.LoginWithPasswordRequest | true | Login request |
Example responses
201 Response
{
"session_token": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | codersdk.LoginWithPasswordResponse |
To perform this operation, you must be authenticated. Learn more.