Skip to content
Get started

Retrieve configuration files

client.projects.configs.retrieve(ConfigRetrieveParams { project, branch, include } params?, RequestOptionsoptions?): ConfigRetrieveResponse { content }
get/v0/projects/{project}/configs
Retrieve the configuration files for a given project.
ParametersExpand Collapse
params: ConfigRetrieveParams { project, branch, include }
project?: string

Path param:

branch?: string

Query param: Branch name, defaults to "main".

include?: string

Query param:

ReturnsExpand Collapse
ConfigRetrieveResponse = Record<string, item>

Config files contents

content: string

The file content

Retrieve configuration files
IMPORT STAINLESS FROM '@STAINLESS-API/SDK';

CONST CLIENT = NEW STAINLESS({
  APIKEY: 'MY API KEY',
});

CONST CONFIG = AWAIT CLIENT.PROJECTS.CONFIGS.RETRIEVE({ PROJECT: 'PROJECT' });

CONSOLE.LOG(CONFIG);
{
  "foo": {
    "content": "content"
  }
}
Returns Examples
{
  "foo": {
    "content": "content"
  }
}