mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: adopt markdownlint and markdown-table-formatter for *.md (#15831)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
This commit is contained in:
co-authored by
Edward Angert
parent
08463c27d8
commit
94f5d52fdc
Generated
+52
-52
@@ -18,35 +18,35 @@ curl -X POST http://coder-server:8080/api/v2/authcheck \
|
||||
|
||||
```json
|
||||
{
|
||||
"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": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
"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": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | ------------------------------------------------------------------------ | -------- | --------------------- |
|
||||
|--------|------|--------------------------------------------------------------------------|----------|-----------------------|
|
||||
| `body` | body | [codersdk.AuthorizationRequest](schemas.md#codersdkauthorizationrequest) | true | Authorization request |
|
||||
|
||||
### Example responses
|
||||
@@ -55,15 +55,15 @@ curl -X POST http://coder-server:8080/api/v2/authcheck \
|
||||
|
||||
```json
|
||||
{
|
||||
"property1": true,
|
||||
"property2": true
|
||||
"property1": true,
|
||||
"property2": true
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- |
|
||||
|--------|---------------------------------------------------------|-------------|----------------------------------------------------------------------------|
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AuthorizationResponse](schemas.md#codersdkauthorizationresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
@@ -85,15 +85,15 @@ curl -X POST http://coder-server:8080/api/v2/users/login \
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "user@example.com",
|
||||
"password": "string"
|
||||
"email": "user@example.com",
|
||||
"password": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | -------------------------------------------------------------------------------- | -------- | ------------- |
|
||||
|--------|------|----------------------------------------------------------------------------------|----------|---------------|
|
||||
| `body` | body | [codersdk.LoginWithPasswordRequest](schemas.md#codersdkloginwithpasswordrequest) | true | Login request |
|
||||
|
||||
### Example responses
|
||||
@@ -102,14 +102,14 @@ curl -X POST http://coder-server:8080/api/v2/users/login \
|
||||
|
||||
```json
|
||||
{
|
||||
"session_token": "string"
|
||||
"session_token": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------- |
|
||||
|--------|--------------------------------------------------------------|-------------|------------------------------------------------------------------------------------|
|
||||
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.LoginWithPasswordResponse](schemas.md#codersdkloginwithpasswordresponse) |
|
||||
|
||||
## Change password with a one-time passcode
|
||||
@@ -128,22 +128,22 @@ curl -X POST http://coder-server:8080/api/v2/users/otp/change-password \
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "user@example.com",
|
||||
"one_time_passcode": "string",
|
||||
"password": "string"
|
||||
"email": "user@example.com",
|
||||
"one_time_passcode": "string",
|
||||
"password": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | ---------------------------------------------------------------------------------------------------------------- | -------- | ----------------------- |
|
||||
|--------|------|------------------------------------------------------------------------------------------------------------------|----------|-------------------------|
|
||||
| `body` | body | [codersdk.ChangePasswordWithOneTimePasscodeRequest](schemas.md#codersdkchangepasswordwithonetimepasscoderequest) | true | Change password request |
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | --------------------------------------------------------------- | ----------- | ------ |
|
||||
|--------|-----------------------------------------------------------------|-------------|--------|
|
||||
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
|
||||
|
||||
## Request one-time passcode
|
||||
@@ -162,20 +162,20 @@ curl -X POST http://coder-server:8080/api/v2/users/otp/request \
|
||||
|
||||
```json
|
||||
{
|
||||
"email": "user@example.com"
|
||||
"email": "user@example.com"
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | ------------------------------------------------------------------------------------------ | -------- | ------------------------- |
|
||||
|--------|------|--------------------------------------------------------------------------------------------|----------|---------------------------|
|
||||
| `body` | body | [codersdk.RequestOneTimePasscodeRequest](schemas.md#codersdkrequestonetimepasscoderequest) | true | One-time passcode request |
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | --------------------------------------------------------------- | ----------- | ------ |
|
||||
|--------|-----------------------------------------------------------------|-------------|--------|
|
||||
| 204 | [No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) | No Content | |
|
||||
|
||||
## Validate user password
|
||||
@@ -196,14 +196,14 @@ curl -X POST http://coder-server:8080/api/v2/users/validate-password \
|
||||
|
||||
```json
|
||||
{
|
||||
"password": "string"
|
||||
"password": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | -------------------------------------------------------------------------------------- | -------- | ------------------------------ |
|
||||
|--------|------|----------------------------------------------------------------------------------------|----------|--------------------------------|
|
||||
| `body` | body | [codersdk.ValidateUserPasswordRequest](schemas.md#codersdkvalidateuserpasswordrequest) | true | Validate user password request |
|
||||
|
||||
### Example responses
|
||||
@@ -212,15 +212,15 @@ curl -X POST http://coder-server:8080/api/v2/users/validate-password \
|
||||
|
||||
```json
|
||||
{
|
||||
"details": "string",
|
||||
"valid": true
|
||||
"details": "string",
|
||||
"valid": true
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |
|
||||
|--------|---------------------------------------------------------|-------------|------------------------------------------------------------------------------------------|
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.ValidateUserPasswordResponse](schemas.md#codersdkvalidateuserpasswordresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
@@ -243,15 +243,15 @@ curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \
|
||||
|
||||
```json
|
||||
{
|
||||
"password": "string",
|
||||
"to_type": ""
|
||||
"password": "string",
|
||||
"to_type": ""
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
| ------ | ---- | ---------------------------------------------------------------------- | -------- | -------------------- |
|
||||
|--------|------|------------------------------------------------------------------------|----------|----------------------|
|
||||
| `user` | path | string | true | User ID, name, or me |
|
||||
| `body` | body | [codersdk.ConvertLoginRequest](schemas.md#codersdkconvertloginrequest) | true | Convert request |
|
||||
|
||||
@@ -261,17 +261,17 @@ curl -X POST http://coder-server:8080/api/v2/users/{user}/convert-login \
|
||||
|
||||
```json
|
||||
{
|
||||
"expires_at": "2019-08-24T14:15:22Z",
|
||||
"state_string": "string",
|
||||
"to_type": "",
|
||||
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
|
||||
"expires_at": "2019-08-24T14:15:22Z",
|
||||
"state_string": "string",
|
||||
"to_type": "",
|
||||
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |
|
||||
|--------|--------------------------------------------------------------|-------------|--------------------------------------------------------------------------------|
|
||||
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.OAuthConversionResponse](schemas.md#codersdkoauthconversionresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
Reference in New Issue
Block a user