Access Key Resource
Definition
Access keys in the DeepVA App are essential for integrating various frontend components into user workflows. These keys enable secure authorization for different parts of the application, allowing users to seamlessly incorporate DeepVA's powerful features into their custom solutions. Users can generate these keys through the API using the endpoints bellow or via the user interface on the Preferences page, enabling customized access controls based on the user's needs.
You can retrieve it to see the information of the access key.
ENDPOINTS
GET /v1/access-keys/
POST /v1/access-keys/
GET /v1/access-keys/{ID}
/
PUT /v1/access-keys/{ID}
/
PATCH /v1/access-keys/{ID}
/
DELETE /v1/access-keys/{D}
/
Attributes
Top level attributes
Name | Type | Description |
---|---|---|
key | string | Global identifier |
name | string | A descriptive name of the key |
type | string | The type of the key (only jwt is available currently). The access key of the type jwt allows JWT token based authentication to our resources which are defined by the scope. |
scopes | string | The scopes are the permissions of the key. See available scopes. |
time_created | string | Creation time of the webhook (ISO Time String) |
Example
In the following example we are going to create an Access Key to let users accessing the Transcript Editor without the need to log in to the DeepVA platform.
Creating an access key via POST request on the /access-keys/
endpoint.
The type of the key is jwt
in order to use its secret for JWT token generation. The scopes include the access to the transcript and export resources.
After generation of the JWT token, it can be used to authenticate users to the Transcript Editor.
curl -d '{"name": "My Key", "type": "jwt", "scopes": ["transcript.read","transcript.write","export.read","export.write"]}' -H "Content-Type: application/json" -H "Authorization: Key {your-api-key}" -X POST https://api.deepva.com/api/v1/access-keys/
# coming soon
Response:
{
"key": "9c8e43d4-71c5-4db9-a7ce-efcc679ce685",
"name": "My Key",
"time_created": "2024-06-28T09:24:03.852179Z",
"type": "jwt",
"scopes": [
"transcript.read",
"transcript.write",
"export.read",
"export.write"
],
"secret": "VC8KVI_ewKn5INXD3h4PXg"
}
The secret
is part of the response of the POST request. Please store this secret in a safe place. It will not be displayed again. The secret
field is not part of the GET response, its being returned once after creation only.
The secret
can now be used to follow the steps in the Transcript Editor Integration documentation to generate a JWT token and access the Transcript Editor.
Available scopes
Scope | Description |
---|---|
transcript.read | Read permission to the transcript editor resources (transcript, variant, version, paragraph) |
transcript.write | Write permission to the transcript editor resources (transcript, variant, version, paragraph) |
export.read | Read permission to the export and export artifact resources |
export.write | Write permission to the export and export artifact resources |