Skip to content
FeedbackDashboard

Create project

projects.create(**kwargs) -> Project { config_repo, display_name, object, 3 more }
POST/v0/projects

Create a new project.

ParametersExpand Collapse
display_name: String

Human-readable project name

org: String

Organization name

revision: Hash[Symbol, FileInput]

File contents to commit

Accepts one of the following:
class Content { content }
content: String

File content

class URL { url }
url: String

URL to fetch file content from

slug: String

Project name/slug

targets: Array[Target]

Targets to generate for

Accepts one of the following:
:node
:typescript
:python
:go
:java
:kotlin
:ruby
:terraform
:cli
:php
:csharp
:sql
:openapi
ReturnsExpand Collapse
class Project { config_repo, display_name, object, 3 more }

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

config_repo: String
display_name: String
object: :project
org: String
slug: String
targets: Array[Target]
Accepts one of the following:
:node
:typescript
:python
:go
:java
:kotlin
:ruby
:terraform
:cli
:php
:csharp
:sql
:openapi

Create project

require "stainless_v0"

stainless = StainlessV0::Client.new(
  api_key: "My API Key",
  environment: "staging" # defaults to "production"
)

project = stainless.projects.create(
  display_name: "display_name",
  org: "org",
  revision: {foo: {content: "content"}},
  slug: "slug",
  targets: [:node]
)

puts(project)
{
  "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"
  ]
}