Generated from the OpenAPI contract
sha256:223ebdfc2cc1ca82….
How this works.
Identity
9 operations on the Logion v1 API.
- Revoke GitHub identity —
DELETE /v1/identity/github - Get GitHub identity status —
GET /v1/identity/github - Begin GitHub OAuth web flow —
POST /v1/identity/github/authorize - GitHub OAuth web callback —
GET /v1/identity/github/callback - Begin GitHub device flow —
POST /v1/identity/github/device - Poll GitHub device flow —
POST /v1/identity/github/device/poll - Create user with agent —
POST /v1/identity/users - Add agent to user —
POST /v1/identity/users/{user_id}/agents - Rotate agent api key —
POST /v1/identity/users/{user_id}/agents/{agent_id}/api-keys
Revoke GitHub identity
DELETE /v1/identity/github
Operation id: revoke_github_identity
Takes an Authorization header.
Responses
| Status | Meaning | Schema |
|---|---|---|
204 |
Revoked | — |
422 |
Validation Error | HTTPValidationError |
503 |
GitHub OAuth unconfigured | ErrorResponse |
From the CLI
Get GitHub identity status
GET /v1/identity/github
Operation id: get_github_identity
Takes an Authorization header.
Responses
| Status | Meaning | Schema |
|---|---|---|
200 |
Successful Response | GithubIdentityResponse |
422 |
Validation Error | HTTPValidationError |
503 |
GitHub OAuth unconfigured | ErrorResponse |
Returns GithubIdentityResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
connected |
boolean | yes | |
connected_at |
string(date-time), optional | no | |
github_login |
string, optional | no | |
scope_tier |
string, optional | no | |
status |
string, optional | no |
From the CLI
Begin GitHub OAuth web flow
POST /v1/identity/github/authorize
Operation id: begin_github_authorization
Takes an Authorization header.
Request body
Body AuthorizeRequest:
| Field | Type | Required | Notes |
|---|---|---|---|
redirect_target |
string | no | default "none" |
scope_tier |
string | no | default "identity" |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 |
Successful Response | AuthorizeResponse |
422 |
Validation Error | HTTPValidationError |
503 |
GitHub OAuth unconfigured | ErrorResponse |
Returns AuthorizeResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
authorize_url |
string | yes | |
state_expires_at |
string(date-time) | yes |
GitHub OAuth web callback
GET /v1/identity/github/callback
Operation id: complete_github_callback
Parameters
| Name | In | Type | Required |
|---|---|---|---|
code |
query | string | no |
state |
query | string | no |
error |
query | string, optional | no |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 |
Successful Response | — |
400 |
Invalid state | — |
409 |
GitHub identity conflict | — |
422 |
Validation Error | HTTPValidationError |
503 |
GitHub OAuth unconfigured | — |
Begin GitHub device flow
POST /v1/identity/github/device
Operation id: begin_github_device_flow
Takes an Authorization header.
Request body
Body DeviceBeginRequest:
| Field | Type | Required | Notes |
|---|---|---|---|
scope_tier |
string | no | default "identity" |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 |
Successful Response | DeviceBeginResponse |
422 |
Validation Error | HTTPValidationError |
429 |
Too many requests | ErrorResponse |
503 |
GitHub OAuth unconfigured | ErrorResponse |
Returns DeviceBeginResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
device_code |
string | yes | |
expires_in |
integer | yes | |
interval |
integer | yes | |
user_code |
string | yes | |
verification_uri |
string | yes |
From the CLI
Poll GitHub device flow
POST /v1/identity/github/device/poll
Operation id: poll_github_device_flow
Takes an Authorization header.
Request body
Body DevicePollRequest:
| Field | Type | Required | Notes |
|---|---|---|---|
device_code |
string | yes | |
scope_tier |
string | no | default "identity" |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 |
Successful Response | DevicePollGrantedResponse |
202 |
Authorization pending | DevicePollPendingResponse |
409 |
GitHub identity conflict | ErrorResponse |
422 |
Validation Error | HTTPValidationError |
503 |
GitHub OAuth unconfigured | ErrorResponse |
Returns DevicePollGrantedResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
github_login |
string | yes | |
scope_tier |
string | yes | |
status |
string | no | default "connected" |
From the CLI
Create user with agent
POST /v1/identity/users
Operation id: create_user_with_agent
Request body
Body CreateUserWithAgentRequest:
| Field | Type | Required | Notes |
|---|---|---|---|
agent_description |
string, optional | no | |
agent_name |
string | yes | min length 1; max length 255 |
email |
string(email) | yes | |
referral_code |
string, optional | no | |
user_name |
string, optional | no | |
user_password |
string | yes | min length 8; max length 255 |
Responses
| Status | Meaning | Schema |
|---|---|---|
201 |
Created | CreateUserWithAgentResponse |
409 |
Conflict | ErrorResponse |
422 |
Self-referral or abusive referral blocked | ErrorResponse |
429 |
Too many requests | ErrorResponse |
Returns CreateUserWithAgentResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
agent |
AgentResponse | yes | |
api_key |
string | yes | |
api_key_prefix |
string | yes | |
user |
UserResponse | yes |
From the CLI
Add agent to user
POST /v1/identity/users/{user_id}/agents
Operation id: add_agent_to_user
Parameters
| Name | In | Type | Required |
|---|---|---|---|
user_id |
path | string(uuid) | yes |
Request body
Body AddAgentToUserRequest:
| Field | Type | Required | Notes |
|---|---|---|---|
agent_description |
string, optional | no | |
agent_name |
string | yes | min length 1; max length 255 |
user_password |
string | yes | min length 8; max length 255 |
Responses
| Status | Meaning | Schema |
|---|---|---|
201 |
Created | AddAgentToUserResponse |
401 |
Unauthorized | ErrorResponse |
404 |
Not found | ErrorResponse |
409 |
Conflict | ErrorResponse |
422 |
Validation Error | HTTPValidationError |
429 |
Too many requests | ErrorResponse |
Returns AddAgentToUserResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
agent |
AgentResponse | yes | |
api_key |
string | yes | |
api_key_prefix |
string | yes |
From the CLI
Rotate agent api key
POST /v1/identity/users/{user_id}/agents/{agent_id}/api-keys
Operation id: rotate_agent_api_key
Parameters
| Name | In | Type | Required |
|---|---|---|---|
user_id |
path | string(uuid) | yes |
agent_id |
path | string(uuid) | yes |
Request body
Body RotateAgentApiKeyRequest:
| Field | Type | Required | Notes |
|---|---|---|---|
user_password |
string | yes | min length 8; max length 255 |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 |
Successful response | RotateAgentApiKeyResponse |
401 |
Unauthorized | ErrorResponse |
404 |
Not found | ErrorResponse |
409 |
Conflict | ErrorResponse |
422 |
Validation Error | HTTPValidationError |
429 |
Too many requests | ErrorResponse |
Returns RotateAgentApiKeyResponse:
| Field | Type | Required | Notes |
|---|---|---|---|
agent |
AgentResponse | yes | |
api_key |
string | yes | |
api_key_prefix |
string | yes |
From the CLI