Stashbase
Workspace Clien

Projects

Manage projects

This API allows you to manage your projects.

Make sure the API Key has the necessary permissions.

Get

Get single project by name or ID.

Parameters

This method takes a project name or ID (string) as a parameter.

Example

const { data, error } = await stashbase.projects.get('my-project')

// check for error
if (error) {
  // handle error
} else {
  // do something with the data
}

List

List projects.

Parameters

This method takes optional object parameter with the following properties:

Prop

Type

Example

const { data, error } = await stashbase.secrets.list({ page: 1, pageSize: 5 })

// check for error
if (error) {
  // handle error
} else {
  // do something with the data
}

Create

Create new project in the workspace. This method returns id and name properties.

Parameters

This method takes object parameter with the following properties:

Prop

Type

Example

const { data, error } = await stashbase.projects.create({
  name: 'my-project',
  description: 'My project description',
})

// check for error
if (error) {
  // handle error
} else {
  // do something with the data
}

Update

Update existing project in the workspace.

Parameters

Prop

Type

Data

Prop

Type

Example

const { error } = await stashbase.projects.update('my-project', {
  name: 'my-new-project',
  description: 'My new project description',
})

Delete

Delete existing project by name or ID.

This deletes all project environments and its secrets.

Parameters

This method takes a project name or ID (string) as a parameter.

Example

const { error } = await stashbase.projects.create('my-project')

// check for error
if (error) {
  // handle error
} else {
  // do something with the data
}

On this page