Big Segments is an add-on feature
This section documents endpoints for both standard segements and Big Segments. Big Segments is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.
Segments allow you to create targeting rules and lists of users that can be shared by one or more feature flags in an environment. Creating a segment is a lot like creating a flag. You can include individual users from a segment. You can also create targeting rules, same as those for flags, that include or exclude users based on attributes your application has provided about those users. Finally, you can explicitly exclude users that would otherwise be included by those rules. To learn more, read Building user segments.
The segments API allows you to list, create, modify, and delete segments programmatically.
Starts a new export process for a Big Segment
Action succeeded
Invalid request
Invalid access token
Invalid resource identifier
Rate limited
curl -i -X POST \ 'https://app.launchdarkly.com/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "code": "invalid_request",
- "message": "Invalid request body"
}
Returns info about a Big Segment export process.
Segment export response
Invalid request
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "id": "string",
- "segmentKey": "string",
- "creationTime": 0,
- "status": "string",
- "sizeBytes": 0,
- "size": "string",
- "initiator": {
- "name": "string",
- "email": "string"
}, - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Start a new import process for a Big Segment.
Import request submitted successfully
Invalid request
Invalid access token
Invalid resource identifier
Conflicting process
Rate limited
curl -i -X POST \ 'https://app.launchdarkly.com/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Content-Type: multipart/form-data'
{- "code": "invalid_request",
- "message": "Invalid request body"
}
Returns info about a Big Segment import process.
Segment import response
Invalid request
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "id": "string",
- "segmentKey": "string",
- "creationTime": 0,
- "mode": "string",
- "status": "string",
- "files": [
- {
- "filename": "string",
- "status": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}