Skip to content

Commit

Permalink
docs: describe GET /api/admin/segments
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Apr 1, 2022
1 parent 5d164db commit d880327
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions website/docs/api/admin/segments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,29 @@ The segments API is available to Pro and Enterprise users from Unleash 4.10.
To use the admin API, you'll need to [create and use an admin API token](../../user_guide/token.md).
:::

The segments API lets you create, read, update, and delete [segments](../../reference/segments.mdx).
The segments API lets you create, read, update, and delete [segments](../../reference/segments.mdx). All payload

### Get all segments
## Get all segments

<ApiRequest verb="Get" url={basePath} title="Retrieve all existing segments."/>

<details>
Retrieve all segments that exist in this Unleash instance. Returns a list of [segment objects](#isegment).

<summary>Responses</summary>

##### 200 OK
<ApiRequest verb="Get" url={basePath} title="Retrieve all existing segments."/>

The user no longer has the specified role in the project. If the user had this role prior to this API request, they will have been removed from the project. This response has no body.
<details open>

##### 400 Bad Request
<summary>Example responses</summary>

You tried to remove the only user with the role `owner` in the project:
### 200 OK

``` json
[
{
"msg": "A project must have at least one owner."
"id": 1,
"name": "my-segment",
"description": "a segment description",
"constraints": [],
"createdBy": "user id",
"createdAt": "2022-04-01T14:02:25.491Z"
}
]
```
Expand Down

0 comments on commit d880327

Please sign in to comment.