Files
coder/docs/api/git.md
Kyle Carberry 5596fb20b5 chore: move /gitauth to /externalauth on the frontend (#9954)
* chore: move `/gitauth` to `/externalauth` on the frontend

This actually took a lot more jank than anticipated,
so I wanted to split this up before adding the ability
to embed new providers.

* Rename FE

* Fix em' up

* Fix linting error

* Fix e2e tests

* chore: update helm golden files
2023-09-30 14:30:01 -05:00

3.7 KiB
Generated

Git

Get external auth by ID

Code samples

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

GET /externalauth/{externalauth}

Parameters

Name In Type Required Description
externalauth path string(string) true Git Provider ID

Example responses

200 Response

{
  "app_install_url": "string",
  "app_installable": true,
  "authenticated": true,
  "device": true,
  "installations": [
    {
      "account": {
        "avatar_url": "string",
        "login": "string",
        "name": "string",
        "profile_url": "string"
      },
      "configure_url": "string",
      "id": 0
    }
  ],
  "type": "string",
  "user": {
    "avatar_url": "string",
    "login": "string",
    "name": "string",
    "profile_url": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK codersdk.ExternalAuth

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

Get external auth device by ID.

Code samples

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

GET /externalauth/{externalauth}/device

Parameters

Name In Type Required Description
externalauth path string(string) true Git Provider ID

Example responses

200 Response

{
  "device_code": "string",
  "expires_in": 0,
  "interval": 0,
  "user_code": "string",
  "verification_uri": "string"
}

Responses

Status Meaning Description Schema
200 OK OK codersdk.ExternalAuthDevice

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

Post external auth device by ID

Code samples

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

POST /externalauth/{externalauth}/device

Parameters

Name In Type Required Description
externalauth path string(string) true External Provider ID

Responses

Status Meaning Description Schema
204 No Content No Content

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