Create an App Client
POSThttps://api.vectara.io/v2/app_clients
An App Client is used for OAuth 2.0 authentication when calling Vectara APIs.
Request
Header Parameters
Possible values: >= 1
The API will make a best effort to complete the request in the specified seconds or time out.
Possible values: >= 1
The API will make a best effort to complete the request in the specified milliseconds or time out.
- application/json
Body
- CreateClientCredentialsRequest
Name of the client credentials.
Description of the client credentials.
Default value: client_credentials
This will always be the value client_credentials
.
Possible values: [owner
, administrator
, billing_administrator
, corpus_administrator
]
API roles that the client credentials will have.
Responses
- 201
- 400
- 403
An App Client object, used to query the Vectara API with the assigned roles.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: Value must match regular expression app_.+$
The Vectara App Client ID. This ID is not used during an OAuth flow. However, the ID used within the Vectara API.
The human-readable name of the App Client.
Description of the App Client.
The client ID used with the OAuth flow.
The client secret used in API requests. The secret should be kept secure.
Possible values: [owner
, administrator
, billing_administrator
, corpus_administrator
]
The API roles attached to the App Client.
api_policy object
{
"id": "string",
"name": "string",
"description": "string",
"client_id": "string",
"client_secret": "string",
"api_roles": [
"owner"
],
"api_policy": {
"name": "string",
"allowed_operations": {}
}
}
App Client creation request was malformed.
- application/json
- Schema
- Example (from schema)
Schema
field_errors object
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"field_errors": {},
"messages": [
"string"
],
"request_id": "string"
}
Permissions do not allow creating the App Client.
- application/json
- Schema
- Example (from schema)
Schema
The messages describing why the error occurred.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"messages": [
"Internal server error."
],
"request_id": "string"
}
Authorization: x-api-key
name: x-api-keytype: apiKeyin: header
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://api.vectara.io/v2/app_clients' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-api-key: <API_KEY_VALUE>' \
--data-raw '{
"name": "string",
"description": "string",
"type": "client_credentials",
"api_roles": [
"owner"
]
}'