Vespa provides a REST API for listing and retrieving config -
alternatives are the programmatic
C++
or Java APIs.
The Config API provides a way to inspect and retrieve all the config
that can be generated by the config model for a given
tenant's active application.
Some, but not necessarily all, of those configs are used by services by
subscribing to them.
The response format is JSON.
The current API version is 2. All config servers provide the REST API.
The API port is 19071 - use
vespa-model-inspect service configserver
to find config server hosts.
Example: http://myconfigserver.mydomain.com:19071/config/v2/tenant/msbe/application/articlesearch/
The API provides two ways to identify your application, given a tenant:
one using only an application name, and one using application name, environment, region and instance.
For the former, "short" form, a default environment, region and instance is used.
More formally, an application id is a tuple of the form
(application, environment, region, instance).
The system currently provides shorthand to the id (application, "default", "default", "default").
Note: Multiple environments, regions and instances are not currently supported for application deployments,
default is always used.
Example URL using only application name:
http://myconfigserver.mydomain.com:19071/config/v2/tenant/media/application/articlesearch/media.config.server-list/clusters/0
Part
Description
media
Tenant
articlesearch
Application
media.config
Namespace of the requested config
server-list
Name of the requested config
clusters/0
Config id of the requested config
Example URL using full application id:
http://myconfigserver.mydomain.com:19071/config/v2/tenant/media/application/articlesearch/environment/test/region/us/instance/staging/media.config.server-list/clusters/0
Part
Description
media
Tenant
articlesearch
Name of the application
test
Environment
us
Region
staging
Instance
media.config
Namespace of the requested config
server-list
Name of the requested config
clusters/0
Config id of the requested config
In this API specification, the short form of the application id,
i.e. only the application name, is used. The tenant mytenant and the
application name myapplication is used throughout in examples.
GET /config/v2/tenant/mytenant/application/myapplication/
List the configs in the model,
as config id specific URLs.
Parameters
Parameter
Default
Description
recursive
false
If true, include each config id in the model which produces
the config, and list only the links to the config payload.
If false, include the first level of the config ids in the listing of new list URLs, as explained above.
Request body
None
Response
A list response includes two arrays:
List-links to descend one level down in the config id hierarchy,
named children.
Config payload links for the current (top) level,
named configs.
Error Response
N/A
Examples:
GET /config/v2/tenant/mytenant/application/myapplication/