Skip to main content

Function: createProject()

createProject(client, props): Promise<{ id: number; name: string; description: string; visibility: "PRIVATE" | "PUBLIC"; createdAt: string; updatedAt: string; orgId: number; orgName: string; }>

Creates a new project in an organization.

Parameters​

client​

ApiClient

The API client instance

props​

The request properties

params​

{ orgName: string; } = createProjectParamsSchema

Path parameters (orgName)

params.orgName​

string = orgNameSchema

body​

{ name: string; description?: string; visibility: "PRIVATE" | "PUBLIC"; } = createProjectBodySchema

Request body with project details

body.name​

string = ...

body.description?​

string = ...

body.visibility​

"PRIVATE" | "PUBLIC" = ...

Returns​

Promise<{ id: number; name: string; description: string; visibility: "PRIVATE" | "PUBLIC"; createdAt: string; updatedAt: string; orgId: number; orgName: string; }>

Promise resolving to the created project

Operation Id​

create-project

Example​

const project = await createProject(client, {
params: { orgName: 'my-org' },
body: { name: 'my-project', description: 'My project', visibility: 'PUBLIC' }
});