Segments (beta)

Big Segments is an Enterprise feature

Big Segments is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

This feature is in beta

To use this feature, pass in a header including the LD-API-Version key with value set to beta. Use this header with each call. To learn more, read Beta resources.

Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.

Create Big Segment export

Starts a new export process for a Big Segment

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

segmentKey
required
string <string>

The segment key

Responses
200

Action succeeded

400

Invalid request

401

Invalid access token

404

Invalid resource identifier

429

Rate limited

post/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports
Request samples
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "Invalid request body"
}

Get Big Segment export

Returns info about a Big Segment export process.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

segmentKey
required
string <string>

The segment key

exportID
required
string <string>

The export ID

Responses
200

Segment export response

400

Invalid request

404

Invalid resource identifier

429

Rate limited

get/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}
Request samples
Response samples
application/json
{
  • "id": "1234a567-bcd8-9123-4567-abcd1234567f",
  • "segmentKey": "example-big-segment",
  • "creationTime": 0,
  • "status": "complete",
  • "sizeBytes": 18,
  • "size": "18 B",
  • "initiator": {
    },
  • "_links": {
    }
}

Create Big Segment import

Start a new import process for a Big Segment.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

segmentKey
required
string <string>

The segment key

Request Body schema: multipart/form-data
file
string <binary>

CSV file containing keys

mode
string <string>

Import mode. Use either merge or replace

Responses
204

Import request submitted successfully

400

Invalid request

401

Invalid access token

404

Invalid resource identifier

409

Conflicting process

429

Rate limited

post/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports
Request samples
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "Invalid request body"
}

Get Big Segment import

Returns info about a Big Segment import process.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

segmentKey
required
string <string>

The segment key

importID
required
string <string>

The import ID

Responses
200

Segment import response

400

Invalid request

404

Invalid resource identifier

429

Rate limited

get/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}
Request samples
Response samples
application/json
{
  • "id": "1234a567-bcd8-9123-4567-abcd1234567f",
  • "segmentKey": "example-big-segment",
  • "creationTime": 0,
  • "mode": "replace",
  • "status": "complete",
  • "files": [
    ],
  • "_links": {
    }
}