The Vector API

Vector ships with a GraphQL API that allows you to interact with a running Vector instance. This page covers how to configure and enable Vector’s API.

Configuration

address

common optional string
The network address to which the API should bind. If you’re running Vector in a Docker container, make sure to bind to 0.0.0.0. Otherwise the API will not be exposed outside the container.
default: 127.0.0.1:8686

enabled

common optional bool
Whether the GraphQL API is enabled for this Vector instance.
default: false

playground

optional bool
Whether the GraphQL Playground is enabled for the API. The Playground is accessible via the /playground endpoint of the address set using the bind parameter.
default: true

Endpoints

POST /graphql

Main endpoint for receiving and processing GraphQL queries.

Responses

Code
Description
200
The query has been processed. GraphQL returns 200 regardless if the query was successful or not. This is due to the fact that queries can partially fail. Please check for the errors key to determine if there were any errors in your query.

GET /health

Healthcheck endpoint. Useful to verify that Vector is up and running.

Responses

Code
Description
200
Vector is initialized and running.

GET /playground

A bundled GraphQL playground that enables you to explore the available queries and manually run queries.

We offer a public playground that you can explore without hosting your own Vector instance.

Responses

Code
Description
200
Vector is initialized and running.

How it works

GraphQL

Vector chose GraphQL for its API because GraphQL is self-documenting and type safe. We believe that this offers a superior client experience and makes Vector richly programmable through its API.

Playground

Vector’s GraphQL API ships with a built-in playground that allows you to explore the available commands and manually run queries against the API. This can be accessed at the /playground path. We also offer a public playground that you can explore without hosting your own Vector instance.