# Configs ## Retrieve configuration files `client.Projects.Configs.Get(ctx, params) (*ProjectConfigGetResponse, error)` **get** `/v0/projects/{project}/configs` Retrieve the configuration files for a given project. ### Parameters - `params ProjectConfigGetParams` - `Project param.Field[string]` Path param - `Branch param.Field[string]` Query param: Branch name, defaults to "main". - `Include param.Field[string]` Query param ### Returns - `type ProjectConfigGetResponse map[string, ProjectConfigGetResponseItem]` Config files contents - `Content string` The file content ### Example ```go package main import ( "context" "fmt" "github.com/stainless-api/stainless-api-go" "github.com/stainless-api/stainless-api-go/option" ) func main() { client := stainless.NewClient( option.WithAPIKey("My API Key"), ) config, err := client.Projects.Configs.Get(context.TODO(), stainless.ProjectConfigGetParams{ Project: stainless.String("project"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", config) } ``` #### Response ```json { "foo": { "content": "content" } } ``` ## Generate config suggestions `client.Projects.Configs.Guess(ctx, params) (*ProjectConfigGuessResponse, error)` **post** `/v0/projects/{project}/configs/guess` Generate suggestions for changes to config files based on an OpenAPI spec. ### Parameters - `params ProjectConfigGuessParams` - `Project param.Field[string]` Path param - `Spec param.Field[string]` Body param: OpenAPI spec - `Branch param.Field[string]` Body param: Branch name ### Returns - `type ProjectConfigGuessResponse map[string, ProjectConfigGuessResponseItem]` Config files contents - `Content string` The file content ### Example ```go package main import ( "context" "fmt" "github.com/stainless-api/stainless-api-go" "github.com/stainless-api/stainless-api-go/option" ) func main() { client := stainless.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.Projects.Configs.Guess(context.TODO(), stainless.ProjectConfigGuessParams{ Project: stainless.String("project"), Spec: "spec", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json { "foo": { "content": "content" } } ```