openapi: 3.1.0 info: title: Arthur Scope Agents V1 Users V1 API version: 0.1.0 tags: - name: Users V1 paths: /api/v1/organization/users: get: tags: - Users V1 summary: Get Users In An Organization. description: Requires organization_list_users permission. operationId: get_organization_users security: - OAuth2AuthorizationCode: - organization_list_users parameters: - name: sort in: query required: false schema: $ref: '#/components/schemas/UserSort' description: Override the field used for sorting. Optional. default: name description: Override the field used for sorting. Optional. - name: order in: query required: false schema: $ref: '#/components/schemas/SortOrder' description: Override the sort order used. Optional. default: asc description: Override the sort order used. Optional. - name: user_types in: query required: false schema: type: array items: $ref: '#/components/schemas/UserType' description: Limits the results to a specific set of user types. default: - user - service_account title: User Types description: Limits the results to a specific set of user types. - name: search in: query required: false schema: type: string description: Search for users by name or email. title: Search description: Search for users by name or email. - name: user_ids in: query required: false schema: type: array items: type: string format: uuid description: Optional list of user IDs to filter down. title: User Ids description: Optional list of user IDs to filter down. - name: page in: query required: false schema: type: integer minimum: 1 description: The page to return starting from 1 up to total_pages. default: 1 title: Page description: The page to return starting from 1 up to total_pages. - name: page_size in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: The number of records per page. The max is 1000. default: 20 title: Page Size description: The number of records per page. The max is 1000. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResourceList_User_' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Users V1 summary: Create User description: Requires organization_create_user permission. operationId: post_organization_user security: - OAuth2AuthorizationCode: - organization_create_user requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostEndUser' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '409': content: application/json: schema: $ref: '#/components/schemas/ConflictError' description: Conflict '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/organization/users/invite-user: post: tags: - Users V1 summary: Create User Via Email Invite description: 'Requires organization_invite_user permission. Also requires underlying permissions for managing user permissions: group_create_group_membership, organization_create_role_binding, workspace_create_role_binding, or project_create_role_binding depending on whether the user is being added to a group or granted a role bound to an organization, workspace, or project.' operationId: post_organization_user_invite requestBody: content: application/json: schema: $ref: '#/components/schemas/InviteNewUser' required: true responses: '201': description: Successful Response content: application/json: schema: {} '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/InternalServerError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - OAuth2AuthorizationCode: - organization_invite_user /api/v1/organization/service_accounts: post: tags: - Users V1 summary: Create Service Account description: Requires organization_create_service_account permission. operationId: post_organization_service_account requestBody: content: application/json: schema: $ref: '#/components/schemas/PostServiceAccount' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UserServiceAccountCredentials' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/InternalServerError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - OAuth2AuthorizationCode: - organization_create_service_account /api/v1/users/me: get: tags: - Users V1 summary: Get User Metadata description: Returns Arthur user metadata. operationId: get_users_me responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/InternalServerError' security: - OAuth2AuthorizationCode: [] /api/v1/users/me/accept-invite: post: tags: - Users V1 summary: Accept User Invitations description: Accepts pending invitations for the user. operationId: accept_my_invites responses: '204': description: Successful Response '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/InternalServerError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/BadRequestError' security: - OAuth2AuthorizationCode: [] /api/v1/users/{user_id}: delete: tags: - Users V1 summary: Delete User description: Requires delete_user permission. operationId: delete_user security: - OAuth2AuthorizationCode: - delete_user parameters: - name: user_id in: path required: true schema: type: string format: uuid title: User Id responses: '204': description: Successful Response '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Users V1 summary: Patch User. description: Requires user_update permission. operationId: patch_user security: - OAuth2AuthorizationCode: - user_update parameters: - name: user_id in: path required: true schema: type: string format: uuid title: User Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchUser' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/users/{user_id}/credentials: post: tags: - Users V1 summary: Regenerate User Credentials. description: Requires user_regenerate_creds permission. operationId: post_user_creds security: - OAuth2AuthorizationCode: - user_regenerate_creds parameters: - name: user_id in: path required: true schema: type: string format: uuid title: User Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SensitiveUser' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/users/{user_id}/service_account: patch: tags: - Users V1 summary: Patch Service Account User. description: Requires user_update permission. operationId: patch_service_account_user security: - OAuth2AuthorizationCode: - user_update parameters: - name: user_id in: path required: true schema: type: string format: uuid title: User Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchServiceAccountUser' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/User' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: 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 PostServiceAccount: properties: name: type: string title: Name description: The service account's name. type: object required: - name title: PostServiceAccount BoundResourceKind: type: string enum: - organization - workspace - project - data_plane title: BoundResourceKind User: properties: created_at: type: string format: date-time title: Created At description: Time of record creation. updated_at: type: string format: date-time title: Updated At description: Time of last record update. organization_id: type: string format: uuid4 title: Organization Id description: The ID of the Arthur organization the user belongs to. id: type: string format: uuid4 title: Id description: Unique user ID assigned by Arthur. first_name: type: string title: First Name description: The user's first name. last_name: anyOf: - type: string - type: 'null' title: Last Name description: The user's last name. email: anyOf: - type: string format: email - type: 'null' title: Email description: The user's email, if provided. picture: anyOf: - type: string - type: 'null' title: Picture description: A url to the user's profile picture, if one exists. user_type: $ref: '#/components/schemas/UserType' description: The type of user. data_plane_id: anyOf: - type: string format: uuid - type: 'null' title: Data Plane Id description: Arthur data plane ID. Only set for data plane users. client_id: anyOf: - type: string - type: 'null' title: Client Id description: Arthur client ID for this user. Only set for service account type users. organization_name: type: string title: Organization Name description: Name of user's Arthur organization. type: object required: - created_at - updated_at - organization_id - id - first_name - last_name - user_type - organization_name title: User UserServiceAccountCredentials: properties: created_at: type: string format: date-time title: Created At description: Time of record creation. updated_at: type: string format: date-time title: Updated At description: Time of last record update. organization_id: type: string format: uuid4 title: Organization Id description: The ID of the Arthur organization the user belongs to. id: type: string format: uuid4 title: Id description: Unique user ID assigned by Arthur. first_name: type: string title: First Name description: The user's first name. last_name: anyOf: - type: string - type: 'null' title: Last Name description: The user's last name. email: anyOf: - type: string format: email - type: 'null' title: Email description: The user's email, if provided. picture: anyOf: - type: string - type: 'null' title: Picture description: A url to the user's profile picture, if one exists. user_type: $ref: '#/components/schemas/UserType' description: The type of user. data_plane_id: anyOf: - type: string format: uuid - type: 'null' title: Data Plane Id description: Arthur data plane ID. Only set for data plane users. client_id: anyOf: - type: string - type: 'null' title: Client Id description: Arthur client ID for this user. Only set for service account type users. organization_name: type: string title: Organization Name description: Name of user's Arthur organization. credentials: $ref: '#/components/schemas/ServiceAccountCredentials' description: The service account credentials. type: object required: - created_at - updated_at - organization_id - id - first_name - last_name - user_type - organization_name - credentials title: UserServiceAccountCredentials HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError UserSort: type: string enum: - name - email - created_at - updated_at title: UserSort InviteNewUser: properties: email: type: string format: email title: Email description: The user's email. role_binding: anyOf: - $ref: '#/components/schemas/PostGlobalRoleBinding' - type: 'null' description: Metadata of the role to grant to the user after creation. group_ids: anyOf: - items: type: string format: uuid type: array - type: 'null' title: Group Ids description: IDs of groups to add the user to after creation. type: object required: - email title: InviteNewUser PatchServiceAccountUser: properties: name: anyOf: - type: string - type: 'null' title: Name description: The name of the service account user. type: object title: PatchServiceAccountUser ConflictError: properties: detail: type: string title: Detail default: Conflict type: object title: ConflictError NotFoundError: properties: detail: type: string title: Detail default: Resource not found type: object title: NotFoundError InternalServerError: properties: detail: type: string title: Detail default: Internal server error type: object title: InternalServerError BadRequestError: properties: detail: type: string title: Detail default: Bad Request type: object title: BadRequestError UserCredentials: properties: password: type: string format: password title: Password description: The user's password. writeOnly: true type: object required: - password title: UserCredentials UserType: type: string enum: - user - data_plane - service_account title: UserType Pagination: properties: page: type: integer title: Page description: The current page number. Page 1 is the first page. default: 1 page_size: type: integer title: Page Size description: Number of records per page. default: 20 total_pages: type: integer title: Total Pages description: Total number of pages. total_records: type: integer title: Total Records description: Total number of records across all pages. type: object required: - total_pages - total_records title: Pagination SensitiveUser: properties: created_at: type: string format: date-time title: Created At description: Time of record creation. updated_at: type: string format: date-time title: Updated At description: Time of last record update. organization_id: type: string format: uuid4 title: Organization Id description: The ID of the Arthur organization the user belongs to. id: type: string format: uuid4 title: Id description: Unique user ID assigned by Arthur. first_name: type: string title: First Name description: The user's first name. last_name: anyOf: - type: string - type: 'null' title: Last Name description: The user's last name. email: anyOf: - type: string format: email - type: 'null' title: Email description: The user's email, if provided. picture: anyOf: - type: string - type: 'null' title: Picture description: A url to the user's profile picture, if one exists. user_type: $ref: '#/components/schemas/UserType' description: The type of user. data_plane_id: anyOf: - type: string format: uuid - type: 'null' title: Data Plane Id description: Arthur data plane ID. Only set for data plane users. client_id: anyOf: - type: string - type: 'null' title: Client Id description: Arthur client ID for this user. Only set for service account type users. organization_name: type: string title: Organization Name description: Name of user's Arthur organization. credentials: anyOf: - $ref: '#/components/schemas/ServiceAccountCredentials' - $ref: '#/components/schemas/UserCredentials' title: Credentials description: The user credentials. type: object required: - created_at - updated_at - organization_id - id - first_name - last_name - user_type - organization_name - credentials title: SensitiveUser PostGlobalRoleBinding: properties: role_id: type: string format: uuid title: Role Id description: ID of the bound role. bound_resource_kind: $ref: '#/components/schemas/BoundResourceKind' description: Kind of the bound resource. resource_id: type: string format: uuid title: Resource Id description: Id of the bound resource. type: object required: - role_id - bound_resource_kind - resource_id title: PostGlobalRoleBinding ServiceAccountCredentials: properties: client_id: type: string title: Client Id description: The service account client ID. client_secret: type: string format: password title: Client Secret description: The service account client secret. writeOnly: true type: object required: - client_id - client_secret title: ServiceAccountCredentials ResourceList_User_: properties: records: items: $ref: '#/components/schemas/User' type: array title: Records description: List of records. pagination: $ref: '#/components/schemas/Pagination' description: Pagination information. type: object required: - records - pagination title: ResourceList[User] SortOrder: type: string enum: - asc - desc title: SortOrder PostEndUser: properties: first_name: type: string title: First Name description: The user's first name. last_name: anyOf: - type: string - type: 'null' title: Last Name description: The user's last name. email: type: string format: email title: Email description: The user's email. password: type: string title: Password description: One time password for the user. picture: anyOf: - type: string - type: 'null' title: Picture description: A url to the user's profile picture, if one exists. type: object required: - first_name - email - password title: PostEndUser PatchUser: properties: first_name: anyOf: - type: string - type: 'null' title: First Name description: The user's first name. last_name: anyOf: - type: string - type: 'null' title: Last Name description: The user's last name. email: anyOf: - type: string format: email - type: 'null' title: Email description: The user's email. picture: anyOf: - type: string - type: 'null' title: Picture description: A url to the user's profile picture, if one exists. type: object title: PatchUser securitySchemes: OAuth2AuthorizationCode: type: oauth2 flows: authorizationCode: refreshUrl: https://platform-auth.arthur.ai/realms/arthur/protocol/openid-connect/token scopes: {} authorizationUrl: https://platform-auth.arthur.ai/realms/arthur/protocol/openid-connect/auth tokenUrl: https://platform-auth.arthur.ai/realms/arthur/protocol/openid-connect/token