1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/docs/api/admin/project.md
Christopher Kolstad c224786f29
feat: update docs to match v4.
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-05-18 11:19:33 +02:00

1.4 KiB

id title
projects /api/admin/projects

The context feature is only available as part of Unleash Enterprise. In order to access the API programmatically you need to make sure you obtain an API token with admin permissions.

List projects in Unleash

GET https://unleash.host.com/api/admin/projects

Returns a list of projects in Unleash.

Example response:

{
  "version": 1,
  "projects": [
    {
      "id": "default",
      "name": "Default",
      "description": "Default project",
      "createdAt": "2020-12-03T09:47:20.170Z"
    },
    {
      "id": "MyNewProject",
      "name": "MyNewProject",
      "description": "A test project",
      "createdAt": "2020-12-03T09:47:20.170Z"
    },
    {
      "id": "test",
      "name": "Test Project",
      "description": "Collection of test toggles",
      "createdAt": "2020-12-03T09:47:20.170Z"
    }
  ]
}

Create a new project

POST https://unleash.host.com/api/admin/projects

Creates a new project.

Body

{
  "id": "someId",
  "name": "Test Project",
  "description": "Some description"
}

Update a projects field

PUT https://unleash.host.com/api/projects/:id

Updates a project with id=id.

Body

{
  "id": "someId",
  "name": "Test Project",
  "description": "Some description"
}

Delete a projects field

DELETE https://unleash.host.com/api/admin/projects/:id

Deletes the project with id=id.