Amigo External Roles API
The External Roles API from Amigo — 2 operation(s) for external roles.
The External Roles API from Amigo — 2 operation(s) for external roles.
openapi: 3.1.0
info:
title: Amigo Account External Roles API
version: 0.1.0
servers:
- url: https://api.amigo.ai
- url: https://internal-api.amigo.ai
- url: https://api-eu-central-1.amigo.ai
- url: https://api-ap-southeast-2.amigo.ai
- url: https://api-ca-central-1.amigo.ai
security:
- Bearer-Authorization: []
Bearer-Authorization-Organization: []
Basic: []
tags:
- name: External Roles
paths:
/v1/{workspace_id}/external-roles:
get:
tags:
- External Roles
summary: List External Roles
operationId: list-external-roles
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: sort_by
in: query
required: false
schema:
type: array
items:
type: string
default: []
title: Sort By
- name: limit
in: query
required: false
schema:
type: integer
maximum: 200
exclusiveMinimum: 0
default: 50
title: Limit
- name: continuation_token
in: query
required: false
schema:
title: Continuation Token
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/src__routes__external_roles__ListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- External Roles
summary: Create External Role
operationId: create-external-role
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/src__routes__external_roles__CreateRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalRoleItem'
'409':
description: An external role with the given name already exists
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
/v1/{workspace_id}/external-roles/{role_id}:
get:
tags:
- External Roles
summary: Get External Role
operationId: get-external-role
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: role_id
in: path
required: true
schema:
type: string
format: uuid
title: Role Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalRoleItem'
'404':
description: External role not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- External Roles
summary: Delete External Role
operationId: delete-external-role
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: role_id
in: path
required: true
schema:
type: string
format: uuid
title: Role Id
responses:
'204':
description: Successful Response
'404':
description: External role not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
src__routes__external_roles__ListResponse:
properties:
items:
items:
$ref: '#/components/schemas/ExternalRoleItem'
type: array
title: Items
has_more:
type: boolean
title: Has More
continuation_token:
title: Continuation Token
type: object
required:
- items
- has_more
title: ListResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
ExternalRoleItem:
properties:
id:
type: string
format: uuid
title: Id
name:
type: string
title: Name
external_name:
type: string
title: External Name
description:
anyOf:
- type: string
- type: 'null'
title: Description
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
type: object
required:
- id
- name
- external_name
- created_at
- updated_at
title: ExternalRoleItem
description: Wire shape for read + create responses.
src__routes__external_roles__CreateRequest:
properties:
name:
type: string
maxLength: 64
minLength: 1
pattern: ^[a-z][a-z0-9_]{0,63}$
title: Name
external_name:
type: string
maxLength: 256
minLength: 1
title: External Name
description:
anyOf:
- type: string
maxLength: 2048
- type: 'null'
title: Description
additionalProperties: false
type: object
required:
- name
- external_name
title: CreateRequest
securitySchemes:
Bearer-Authorization:
type: http
scheme: bearer
bearerFormat: JWT
description: Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the [`SignInWithAPIKey`](sign-in-with-api-key) endpoint.
Bearer-Authorization-Organization:
type: apiKey
in: header
name: X-ORG-ID
description: An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
Basic:
type: http
scheme: basic
description: The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.