---
title: "VaultSpeed API"
canonical: "https://docs.vaultspeed.com/space/VPD/3011936280/VaultSpeed%20API"
format: markdown
---
VaultSpeed has an API interface where you can interact with the tool programmatically.

> Macro (toc)

## Introduction

An Application Programming Interface, or API, enables companies to open up their applications’ data and functionality to external third-party developers, business partners, and internal departments within their companies.

This allows services and products to communicate with each other and leverage each other’s data and functionality through a documented interface.

Developers don't need to know how an API is implemented; they simply use the interface to communicate with other products and services. API use has surged over the past decade, to the degree that many of the most popular web applications today would not be possible without APIs.

Use cases of the VaultSpeed API:

- Automation of the Data Vault setup
- Automation of the code generation
- Building data lineage generation pipelines
- Integration with other systems and processes
- Creating, writing, and exporting the metadata
- Creating, editing, or stopping VaultSpeed tasks

## Authentication

Authentication is a process of verifying a user/entity to the system, which enables identified/validated access to the protected services and features of the application. VaultSpeed API is authenticated using the JWT access token. It can be generated by calling the POST [https://app.vaultspeed.com/api/login](https://app.vaultspeed.com/api/login) endpoint with valid user credentials (you can find the endpoint in the API documentation below). To access a private endpoint, a user must send an access token using the Authorization bearer token as shown below.

```
"Authorization: Bearer {vaultspeed access token}"
```

## Requests

VaultSpeed API supports the most common CRUD (create, read, update & delete) methods. Users can post data using URL encoded parameters or send them in the JSON body depending on the requirements defined in the OpenAPI specifications (i.e. API documentation).

**Custom Filters**

Custom filters are enabled on certain API endpoints for allowing end-users to do custom queries when getting data. They can be used to limit or skip a number of records, to search on a specific field(s) or values, or choose what data fields should be returned. More information about the custom filters can be found here: [https://loopback.io/doc/en/lb4/Querying-data.html](https://loopback.io/doc/en/lb4/Querying-data.html)

## Responses

VaultSpeed API responses fall into two most basic parts: errors and success responses. They follow the REST API standards meaning responses between 200 and 300 are successful and response statuses above 400 return an error. More information can be found in the API documentation which contains what response status and body is expended after endpoint execution.

Example error response:

```
{
 "error": {
    "statusCode": 404,
    "name": "NotFoundError",
    "message": "Endpoint \ GET  not found."
  }
}
```

> 📝 note that we have implemented a rate limiter for API calls, if you exceed this rate (100+ calls a second) you will get a ‘429 - Too Many Requests’ response

## VaultSpeed Tasks

Some of the application processes are executed asynchronously using the task queue as they can take longer or may depend on another process that has to be executed first. Therefore, there are a number of API endpoints that insert a task into the queue that is picked up by the particular part of the application (e.g. Agent). Endpoints that insert a task are identified with suffix (task) as part of the description and return status code 200 with the task group id. In addition, there are endpoints designated for inserting, checking, and canceling tasks. These are identified with /task root path.

**Example for creating and checking import source metadata task using cURL**

1. get a user access token:

```
curl --location --request POST 'https://app.vaultspeed.com/api/login' \
--header 'Content-Type: application/json' \
--data-raw '{
  "username": "username",
  "password": "password"
}'
```

Response:

```
{"access_token": "user_access_token"}
```

1. Insert get source metadata task:

```
curl --location --request POST 'https://app.vaultspeed.com/api/source/get-objects' \
--header 'Authorization: Bearer user_access_token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "src_id": 1
}'
```

Response:

```
{"task_set_id": 23}
```

1. Get task status:

```
curl --location --request GET 'https://dev.vaultspeed.com/api/tasks/23/status' \
--header 'Authorization: Bearer user_access_token'
```

Response:

```
{
    "task_set_id": 23,
    "task_status": "waiting_for_prev_task",
    "task_id": null
}
```

## API Documentation

VaultSpeed API has been generated using OpenAPI specification. You can find more about it here: [https://spec.openapis.org/oas/latest.html](https://spec.openapis.org/oas/latest.html) . VaultSpeed API documentation can be accessed in the VaultSpeed application under the API menu.

If you want to use the API documentation to enhance any AI usage, you can access the OpenAPI Specification (JSON) by using **GET** `/openapi.json`. This will generate a JSON file containing the complete documentation.

The documentation itself has a filter/search box at the top right and gives you examples of how the API-calls should be structured. For some of the calls there is even a ‘Try’ button where you can make an actual call from within the documentation.

![image](media://a43019c7-0d73-43a2-a0ba-fb9c5f04fd7e)

> ❌ Be aware that the ‘Try’ button does actual calls to your metadata. If you are using calls that will make changes, those changes are immediately persisted on your project. When you are not 100% sure what the call does it’s best to try it first on a Sandbox project as not to disturb your metadata.