Skip to content
FeedbackDashboard

Update project

client.Projects.Update(ctx, params) (*Project, error)
patch/v0/projects/{project}

Update a project's properties.

ParametersExpand Collapse
params ProjectUpdateParams
Project param.Field[string]optional

Path param:

DisplayName param.Field[string]optional

Body param:

ReturnsExpand Collapse
type Project struct{…}

A project is a collection of SDKs generated from the same set of config files.

ConfigRepo string
DisplayName string
Object ProjectObject
Org string
Slug string
Targets []Target
Accepts one of the following:
const TargetNode Target = "node"
const TargetTypescript Target = "typescript"
const TargetPython Target = "python"
const TargetGo Target = "go"
const TargetJava Target = "java"
const TargetKotlin Target = "kotlin"
const TargetRuby Target = "ruby"
const TargetTerraform Target = "terraform"
const TargetCli Target = "cli"
const TargetPhp Target = "php"
const TargetCsharp Target = "csharp"
const TargetOpenAPI Target = "openapi"
Update project
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"),
  )
  project, err := client.Projects.Update(context.TODO(), stainless.ProjectUpdateParams{
    Project: stainless.String("project"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", project.ConfigRepo)
}
{
  "config_repo": "config_repo",
  "display_name": "display_name",
  "object": "project",
  "org": "org",
  "slug": "slug",
  "targets": [
    "node"
  ]
}
Returns Examples
{
  "config_repo": "config_repo",
  "display_name": "display_name",
  "object": "project",
  "org": "org",
  "slug": "slug",
  "targets": [
    "node"
  ]
}