Stashbase
Projects

List

List projects.

GET
/v1/projects/

List projects.

Query Parameters

sort_by?string

Sort the projects by property, default: name.

Value in"name" | "created_at" | "updated_at" | "environment_count"
order?string

Sort the projects in ascending or descending order, default: asc.

Default"asc"
Value in"asc" | "desc"
search?string

Search projects by name.

page?number

The selected page number.

Range1 <= value <= 1000
page_size?number

The number of items per page, between 2 and 30, default is 10

Default10
Range2 <= value <= 30

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/"
{
  "data": [
    {
      "id": "pr_3TFmcBluEENNfFKtXzrHBS",
      "created_at": "2024-05-05T10:00:00Z",
      "updated_at": "2024-05-05T10:00:00Z",
      "name": "my-project",
      "description": null,
      "environment_count": 3
    },
    {
      "id": "pr_9Ve7ijuUMuwh9fb1j7CyBq",
      "created_at": "2024-06-05T14:00:00Z",
      "updated_at": "2024-06-05T14:00:00Z",
      "name": "public-api",
      "description": null,
      "environment_count": 0
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "total_items": 20,
    "total_pages": 2,
    "next_page": 2,
    "prev_page": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}