Skip to content
Get started

List projects

client.projects.list(ProjectListParams { cursor, limit, org } query?, RequestOptionsoptions?): Page<Project { config_repo, display_name, object, 3 more } >
get/v0/projects

List projects in an organization, from oldest to newest.

ParametersExpand Collapse
query: ProjectListParams { cursor, limit, org }
cursor?: string

Pagination cursor from a previous response

limit?: number

Maximum number of projects to return, defaults to 10 (maximum: 100).

exclusiveMinimum0
maximum100
org?: string
ReturnsExpand Collapse
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 | null
object: "project"
Accepts one of the following:
"project"
org: string
slug: string
targets: Array<Target>
Accepts one of the following:
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
List projects
IMPORT STAINLESS FROM '@STAINLESS-API/SDK';

CONST CLIENT = NEW STAINLESS({
  APIKEY: 'MY API KEY',
});

// AUTOMATICALLY FETCHES MORE PAGES AS NEEDED.
FOR AWAIT (CONST PROJECT OF CLIENT.PROJECTS.LIST()) {
  CONSOLE.LOG(PROJECT.CONFIG_REPO);
}
{
  "data": [
    {
      "config_repo": "config_repo",
      "display_name": "display_name",
      "object": "project",
      "org": "org",
      "slug": "slug",
      "targets": [
        "node"
      ]
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}
Returns Examples
{
  "data": [
    {
      "config_repo": "config_repo",
      "display_name": "display_name",
      "object": "project",
      "org": "org",
      "slug": "slug",
      "targets": [
        "node"
      ]
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}