# Configs ## Retrieve configuration files `client.projects.configs.retrieve(ConfigRetrieveParamsparams?, RequestOptionsoptions?): ConfigRetrieveResponse` **get** `/v0/projects/{project}/configs` Retrieve the configuration files for a given project. ### Parameters - `params: ConfigRetrieveParams` - `project?: string` Path param - `branch?: string` Query param: Branch name, defaults to "main". - `include?: string` Query param ### Returns - `ConfigRetrieveResponse = Record` Config files contents - `content: string` The file content ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); const config = await client.projects.configs.retrieve({ project: 'project' }); console.log(config); ``` #### Response ```json { "foo": { "content": "content" } } ``` ## Generate config suggestions `client.projects.configs.guess(ConfigGuessParamsparams, RequestOptionsoptions?): ConfigGuessResponse` **post** `/v0/projects/{project}/configs/guess` Generate suggestions for changes to config files based on an OpenAPI spec. ### Parameters - `params: ConfigGuessParams` - `project?: string` Path param - `spec: string` Body param: OpenAPI spec - `branch?: string` Body param: Branch name ### Returns - `ConfigGuessResponse = Record` Config files contents - `content: string` The file content ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); const response = await client.projects.configs.guess({ project: 'project', spec: 'spec' }); console.log(response); ``` #### Response ```json { "foo": { "content": "content" } } ``` ## Domain Types ### Config Retrieve Response - `ConfigRetrieveResponse = Record` Config files contents - `content: string` The file content ### Config Guess Response - `ConfigGuessResponse = Record` Config files contents - `content: string` The file content