Create Segmentation Session

Create Segmentation Session
Create segmentation session and upload CSV file(s)

Creates a new segmentation session and uploads an asset CSV file in a single request. Provide asset_file_name with asset_file_contents. The server validates and stores the file for further processing.

Notes

  • Returns 202 on successful upload.
  • After successful upload, validation of file will automatically trigger and status will be FILE_VALIDATING.
  • Poll GET /{session-id}/status until FILE_VALIDATED.
  • If there are any issues with validation, session will end up in FILE_VALIDATION_ERROR, at which point the session will still be persisted to view the errors.
  • To progress forward from FILE_VALIDATION_ERROR, delete the session and address the relevant issues before re-uploading.
  • One session is in FILE_VALIDATED state mappings for the csv file can be pushed through PUT /{session-id}/settings.
Request
URI
POST
https://{api_host}/ssp/segmentation
COPY
Request Body

Asset CSV file name and content pair.

CreateSegmentationSessionRequest of type(s) multipart/form-data
Required  
{
    "asset_file_name": "sample_asset_file.csv",
    "asset_file_contents": "contents of file"
}
string
asset_file_name
Optional
Constraints: maxLength: 255

Name of the asset CSV file

string As binary As binary
asset_file_contents
Optional

CSV file content as binary data

Authentication
This operation uses the following authentication methods.
Responses
202

Session created and CSV file uploaded; file validation initiated.

Returns AsyncApiResponse of type(s) application/json
{
    "id": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
    "status_url": "/segmentation/aaaa1111-bbbb-2222-cccc-3333dddd4444/status"
}
string
id
Optional

UUID identifier of the response.

string
status_url
Optional

The URL to check the status of the operation.


400

Bad Request

Returns BadRequest of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


412

Precondition Failed

Returns PreconditionFailed of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


428

Precondition Required

Returns PreconditionRequired of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


429

Too Many Requests

Returns TooManyRequests of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


default

Unexpected error

Returns Error of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{}' https://{api_host}/ssp/segmentation