### GET /rolloutStatuses Source: https://docs.split.io/reference/get-rollout-statuses Retrieves a list of all defined rollout statuses for a given workspace. ```APIDOC ## GET /rolloutStatuses ### Description Retrieves the rollout statuses available within a specific workspace (project). This is useful for understanding the lifecycle stages of feature flags. ### Method GET ### Endpoint /rolloutStatuses?wsId={wsId} ### Parameters #### Query Parameters - **wsId** (string) - Required - The ID of the project (workspace) to retrieve rollout statuses from. ### Request Example GET https://api.split.io/internal/api/v2/rolloutStatuses?wsId=my-workspace-id ### Response #### Success Response (200) - **id** (string) - The unique identifier for the rollout status. - **name** (string) - The display name of the status. - **description** (string) - A brief explanation of the status. #### Response Example [ { "id": "ec4b199f-ae6f-4839-90e5-3cd0f2c36fd4", "name": "Pre-Production", "description": "Splits where code for the feature haven’t been pushed to prod yet" } ] ``` -------------------------------- ### GET /api/v1/workspaces Source: https://docs.split.io/reference/workspaces-overview Retrieves a list of all projects (workspaces) available in the account. ```APIDOC ## GET /api/v1/workspaces ### Description Returns a list of all projects (workspaces) defined in the organization. This endpoint is stable and will not be deprecated. ### Method GET ### Endpoint /api/v1/workspaces ### Parameters None ### Request Example GET /api/v1/workspaces ### Response #### Success Response (200) - **objects** (array) - A list of workspace objects. #### Response Example { "objects": [ { "id": "ws-123", "name": "Production" } ] } ``` -------------------------------- ### GET /internal/api/v2/rolloutStatuses Source: https://docs.split.io/reference/get-rollout-statuses Retrieves the rollout status for a specified workspace. ```APIDOC ## GET /internal/api/v2/rolloutStatuses ### Description Retrieves the current rollout status for a given workspace ID. ### Method GET ### Endpoint /internal/api/v2/rolloutStatuses?wsId={wsId} ### Parameters #### Query Parameters - **wsId** (string) - Required - The unique identifier of the workspace. ### Request Example ```bash curl -v -X GET \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ADMIN_API_KEY' \ 'https://api.split.io/internal/api/v2/rolloutStatuses?wsId={wsId}' ``` ### Response #### Success Response (200) - **transactionId** (string) - The unique identifier for the transaction. - **details** (string) - Additional status details. #### Response Example { "transactionId": "9ohbr8wmzf", "details": "" } ``` -------------------------------- ### GET /internal/api/v2/rule-based-segments/ws/{workspace-id} Source: https://docs.split.io/reference/get_internal-api-v2-rule-based-segments-ws-workspace-id List all rule-based segments in a project (formerly called workspace). ```APIDOC ## GET /internal/api/v2/rule-based-segments/ws/{workspace-id} ### Description List all rule-based segments in a project (formerly called workspace). ### Method GET ### Endpoint /internal/api/v2/rule-based-segments/ws/{workspace-id} ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The ID of the project (workspace) to get a list of rule-based segments from. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **example** (object) - Description of the success response body #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /workspaces Source: https://docs.split.io/reference/get-workspaces Retrieves a list of projects (formerly known as workspaces) for an account, with support for pagination and filtering. ```APIDOC ## GET /workspaces ### Description Retrieves the projects (formerly known as workspaces) for an account. Supports pagination and filtering by name or Harness identifiers. ### Method GET ### Endpoint https://api.split.io/internal/api/v2/workspaces ### Parameters #### Query Parameters - **offset** (integer) - Optional - The offset to retrieve. Useful for pagination. - **limit** (integer) - Optional - The maximum return limit per call (default: 20, max: 1000). - **name** (string) - Optional - Filter projects by name. - **nameOp** (string) - Optional - Match operator for the name query parameter (IS, STARTS_WITH, CONTAINS). - **organizationIdentifier** (string) - Optional - Filter projects by the Harness organization ID. - **projectIdentifier** (string) - Optional - Filter projects by the Harness project ID. ### Request Example GET /workspaces?limit=10&offset=0 ### Response #### Success Response (200) - **objects** (array) - List of workspace objects - **offset** (integer) - Current offset - **limit** (integer) - Current limit - **totalCount** (integer) - Total number of projects #### Response Example { "objects": [ { "id": "07bc24a0-5ea9-22g4-95e6-62f888f94f2e", "name": "Default", "type": "workspace", "organizationIdentifier": "DocumentationFME", "projectIdentifier": "Default", "requiresTitleAndComments": false } ], "offset": 0, "limit": 10, "totalCount": 4 } ``` -------------------------------- ### List Large Segments in Environment Source: https://docs.split.io/reference/listlargesegmentsinenvironment Get a list of large segment configurations in a given project (workspace) and FME environment. ```APIDOC ## GET /websites/split_io ### Description Get a list of large segment configurations in a given project (workspace) and FME environment. ### Method GET ### Endpoint /websites/split_io ### Parameters #### Query Parameters - **project** (string) - Required - The name of the project (workspace). - **environment** (string) - Required - The FME environment name. ### Request Example ``` GET /websites/split_io?project=my_project&environment=my_env ``` ### Response #### Success Response (200) - **segments** (array) - A list of large segment configurations. - **name** (string) - The name of the segment. - **id** (string) - The unique identifier of the segment. - **description** (string) - A description of the segment. #### Response Example ```json { "segments": [ { "name": "Segment A", "id": "seg-12345", "description": "This is the first large segment." }, { "name": "Segment B", "id": "seg-67890", "description": "This is the second large segment." } ] } ``` ``` -------------------------------- ### GET /groups/{group_id} Source: https://docs.split.io/reference/get-group Retrieves details for a specific active group in the account. ```APIDOC ## GET /groups/{group_id} ### Description List details for a specific active group in the account. Note: This endpoint is planned for migration to Harness systems. ### Method GET ### Endpoint https://api.split.io/internal/api/v2/groups/{group_id} ### Parameters #### Path Parameters - **group_id** (string) - Required - The unique identifier of the group. ### Request Example ```bash curl -X GET \ -H 'Authorization: Bearer ADMIN_API_KEY' \ https://api.split.io/internal/api/v2/groups/ ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the group. - **name** (string) - The name of the group. - **description** (string) - A description of the group. - **type** (string) - The type of the object (e.g., "group"). #### Response Example { "id": "", "name": "", "description": "", "type": "group" } ``` -------------------------------- ### POST /api/v1/workspaces Source: https://docs.split.io/reference/workspaces-overview Creates a new project (workspace). Note: This endpoint is subject to future changes due to Harness integration. ```APIDOC ## POST /api/v1/workspaces ### Description Creates a new project (workspace). Warning: This endpoint is slated for migration as part of the Harness integration; avoid new integrations if possible. ### Method POST ### Endpoint /api/v1/workspaces ### Parameters #### Request Body - **name** (string) - Required - The name of the new workspace. ### Request Example { "name": "New Project" } ### Response #### Success Response (200) - **id** (string) - The ID of the created workspace. #### Response Example { "id": "ws-456", "name": "New Project" } ``` -------------------------------- ### ALL_OF_SET Matcher Configuration (Conceptual) Source: https://docs.split.io/reference/matcher-type Example of configuring the ALL_OF_SET matcher. This matcher selects customers whose multi-valued attribute contains all of the provided string literals. It requires 'strings' and 'attribute' fields, and optionally 'negate'. ```json { "matcherType": "ALL_OF_SET", "strings": ["value1", "value2"], "attribute": "user_attribute", "negate": false } ``` -------------------------------- ### Example Segment JSON Payload with Owners - Split.io API Source: https://docs.split.io/reference/create-segment An example of a JSON payload for creating a segment in Split.io, demonstrating the inclusion of owner details. This example shows how to specify both a 'User' and a 'Team' owner, including the special '_project_all_users' team ID. ```json { "name": "premier_status_members", "description": "description", "owners": [ { "id": "EvGB7BeOTAWilAUxLcFlgA", "type": "User" }, { "id": "_project_all_users", "type": "Team" } ] } ``` -------------------------------- ### POST /environments/ws/{workspaceId} Source: https://docs.split.io/reference/create-environment Creates a new FME environment within a specific workspace. Requires an Admin API Key with appropriate roles and scopes. ```APIDOC ## POST /environments/ws/{workspaceId} ### Description Creates a new FME environment. Allows configuration of change permissions, including approval requirements and groups authorized to skip approvals. ### Method POST ### Endpoint https://app.split.io/internal/api/v2/environments/ws/{workspaceId} ### Parameters #### Path Parameters - **workspaceId** (string) - Required - The unique identifier of the workspace. #### Request Body - **name** (string) - Required - The name of the environment. - **production** (boolean) - Required - Whether this is a production environment. - **changePermissions** (object) - Optional - Configuration for approval and editor restrictions. - **dataExportPermissions** (object) - Optional - Configuration for data export restrictions. - **envType** (string) - Optional - The type of environment (e.g., stage). ### Request Example { "name": "workspace name", "production": false, "changePermissions": { "areApprovalsRequired": true, "approvalSkippableBy": [ { "id": "", "name": "Administrators", "type": "group" } ] }, "envType": "stage" } ### Response #### Success Response (200) - **id** (string) - The unique ID of the created environment. - **name** (string) - The name of the environment. - **status** (string) - The current status of the environment. #### Response Example { "id": "", "type": "environment", "name": "workspace_name", "status": "ACTIVE" } ``` -------------------------------- ### Split.io API Error Response Examples (JSON) Source: https://docs.split.io/reference/create-flag-set This snippet provides examples of JSON error responses from the Split.io API. These examples illustrate the structure of error objects, including type, status, code, request ID, and optional detailed errors for specific fields. These are useful for understanding how to handle API errors in your application. ```json { "type": "ERROR", "status": 400, "code": "BAD_REQUEST", "requestId": "2abc7524jgy8", "errors": [ { "type": "DETAILED_ERROR", "field": "name", "code": "INVALID_NAME" }, { "type": "DETAILED_ERROR", "field": "name", "code": "RESOURCE_NAME_TOO_LONG" } ] } ``` ```json { "type": "ERROR", "status": 401, "code": "UNAUTHORIZED", "requestId": "2abc7524jgy8" } ``` ```json { "type": "ERROR", "status": 402, "code": "LIMIT_REACHED", "requestId": "2abc7524jgy8" } ``` ```json { "type": "ERROR", "status": 402, "code": "MISSING_REQUIRED_PACK", "requestId": "2abc7524jgy9" } ``` ```json { "type": "ERROR", "status": 403, "code": "FORBIDDEN", "requestId": "2abc7524jgy8" } ``` ```json { "type": "ERROR", "status": 409, "code": "CONFLICT", "requestId": "2abc7524jgy8", "errors": [ { "type": "DETAILED_ERROR", "field": "name", "code": "RESOURCE_NAME_IN_USE" } ] } ``` ```json { "type": "ERROR", "status": 429, "code": "TOO_MANY_REQUESTS", "requestId": "2abc7524jgy8" } ``` ```json { "type": "ERROR", "status": 500, "code": "INTERNAL_SERVER_ERROR", "requestId": "2abc7524jgy8" } ``` ```json { "type": "ERROR", "status": 502, "code": "BAD_GATEWAY", "requestId": "2abc7524jgy8" } ``` -------------------------------- ### POST /users Source: https://docs.split.io/reference/invite-a-new-user Invites a new user to your account. The user is created with a 'Pending' status. ```APIDOC ## POST /users ### Description Invite a new user to your account. They are created with a Pending status. ### Method POST ### Endpoint https://api.split.io/internal/api/v2/users ### Parameters #### Request Body - **email** (string) - Required - The email address of the user to invite. - **groups** (array) - Optional - A list of group IDs to assign to the user. ### Request Example ```json { "email": "user@example.com", "groups": ["group_id_1", "group_id_2"] } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the invited user. - **type** (string) - The type of the entity, always "user". - **name** (string) - The display name of the user. - **email** (string) - The email address of the user. - **status** (string) - The status of the user, e.g., "PENDING". - **2fa** (boolean) - Indicates if two-factor authentication is enabled. - **groups** (array) - A list of groups the user belongs to, each with an 'id' and 'type'. #### Response Example ```json { "id": "", "type": "user", "name": "", "email": "", "status": "PENDING", "2fa": false, "groups": [{"id":"", "type":"group"}] } ``` #### Error Response (400) - **Description**: Malformatted body or invalid JSON structure. #### Error Response (401) - **Description**: Invalid API Key used. #### Error Response (409) - **code** (integer) - The error code, 409. - **message** (string) - A message indicating the conflict, e.g., "User already exists / was already invited to an org". - **details** (string) - Additional details about the error. - **transactionId** (string) - The transaction ID for the request. #### Error Response Example (409) ```json { "code": 409, "message": "User already exists / was already invited to an org", "details": "", "transactionId": "" } ``` ``` -------------------------------- ### API Error Response Examples (JSON) Source: https://docs.split.io/reference/update-environment This section provides examples of JSON responses for common API errors, including 404 Not Found, 409 Conflict, and 500 Internal Server Error. Each example details the structure of the error message, including error codes, messages, and transaction IDs. ```json { "code": 404, "message": "Could not find environment environmentId", "details": "", "transactionId": "2abc7vlpzi7f" } ``` ```json { "changeRequests": "There are change requests that will be auto-rejected", "editorRestrictions": "There are editor restrictions that will be overridden on split/segments" } ``` ```json { "code": 500, "message": "Error while updating the environment", "details": "", "transactionId": "2abc7vlpzi7f" } ``` -------------------------------- ### Create Environment with Skip Approvals (cURL) Source: https://docs.split.io/reference/create-environment This cURL command demonstrates how to create a new FME environment and configure it to allow skipping approvals. It requires an Admin API Key with appropriate roles and scopes. The payload specifies the environment name, production status, and detailed change permissions, including the 'approvalSkippableBy' attribute. ```curl curl --location --request POST 'https://app.split.io/internal/api/v2/environments/ws/12417780-8aa5-11ec-b903-d66b067dacc0' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "workspace name", "production": "false", "changePermissions": { "areApprovalsRequired": true, "areApproversRestricted": true, "approvers": [ ], "areEditorsRestricted": false, "editors": [], "approvalSkippableBy": [ { "id": "", "name": "Administrators", "type": "group" } ] }, "dataExportPermissions": { "areExportersRestricted": false, "exporters": [] }, "envType":"stage" }' ``` -------------------------------- ### GET /internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} Source: https://docs.split.io/reference/get-feature-flag-definition-in-environment Retrieves the details of a specific feature flag within a designated workspace and environment. ```APIDOC ## GET /internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} ### Description Retrieves the configuration and status of a specific feature flag for a given workspace and environment. ### Method GET ### Endpoint /internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The unique identifier for the workspace. - **feature-flag-name** (string) - Required - The name of the feature flag. - **environment-id-or-name** (string) - Required - The ID or name of the environment. ### Request Example ```bash curl -v -X GET \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ADMIN_API_KEY' \ https://api.split.io/internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} ``` ### Response #### Error Response (403) - **code** (integer) - 403 - **message** (string) - Organization does not have permissions to execute API - **transactionId** (string) - Unique transaction identifier #### Error Response (404) - **code** (integer) - 404 - **message** (string) - Could not find the requested resource - **transactionId** (string) - Unique transaction identifier #### Response Example { "code": 403, "message": "Organization does not have permissions to execute API", "transactionId": "9oek34hvot" } ``` -------------------------------- ### GET /users/user_id Source: https://docs.split.io/reference/get-user Retrieves a user's information by their unique user ID. This endpoint is part of the Split.io API and requires administrative privileges. ```APIDOC ## GET /users/user_id ### Description Get a user by their user Id. ### Method GET ### Endpoint https://api.split.io/internal/api/v2/users/ ### Parameters #### Path Parameters - **user_id** (string) - Required - The unique identifier of the user to retrieve. ### Request Example ```json { "example": "curl -X GET \n -H 'Authorization: Bearer ADMIN_API_KEY' \n https://api.split.io/internal/api/v2/users/" } ``` ### Response #### Success Response (200) - **id** (string) - The user's unique identifier. - **type** (string) - The type of the entity, typically 'user'. - **name** (string) - The display name of the user. - **email** (string) - The email address of the user. - **status** (string) - The current status of the user (e.g., 'ACTIVE'). - **groups** (array) - A list of groups the user belongs to, each with 'type' and 'id'. #### Response Example ```json { "example": "{\n \"id\": \"\",\n \"type\": \"user\",\n \"name\": \"\",\n \"email\": \"\",\n \"status\": \"ACTIVE\",\n \"groups\": [\n {\n \"type\": \"group\",\n \"id\": \"\"\n },\n {\n \"type\": \"group\",\n \"id\": \"\"\n }\n ]\n}" } ``` #### Error Response (401) - **description**: If using an invalid API Key ``` -------------------------------- ### ANY_OF_SET Matcher Configuration (Conceptual) Source: https://docs.split.io/reference/matcher-type Example of configuring the ANY_OF_SET matcher. This matcher targets customers whose multi-valued attribute contains at least one of the provided string literals. It requires 'strings' and 'attribute' fields, and optionally 'negate'. ```json { "matcherType": "ANY_OF_SET", "strings": ["value1", "value2"], "attribute": "user_attribute", "negate": false } ``` -------------------------------- ### POST /internal/api/v3/flag-sets Source: https://docs.split.io/reference/create-flag-set Creates a new flag set within a specified workspace. Requires a name, description, and workspace identifier. ```APIDOC ## POST /internal/api/v3/flag-sets ### Description Create a new flag set in a given project (formerly called workspace). Include the flag set details in the JSON body. ### Method POST ### Endpoint /internal/api/v3/flag-sets ### Parameters #### Request Body - **name** (string) - Required - The name of the new flag set (1-50 chars, starts with lowercase/digit, contains _a-z0-9). - **description** (string) - Optional - The flag set description (max 200 chars). - **workspace** (object) - Required - The workspace the flag set belongs to. - **id** (string) - Required - UUID of the workspace. - **type** (string) - Required - Must be "WORKSPACE". ### Request Example { "name": "my_flag_set", "description": "Controls access to beta features", "workspace": { "id": "ad2eb8f0-9c3a-11ed-873c-e234abaad3aa", "type": "WORKSPACE" } } ### Response #### Success Response (201) - **id** (string) - The unique identifier of the created flag set. - **type** (string) - The resource type (FLAG_SET). - **name** (string) - The name of the flag set. - **createdAt** (string) - Datetime of creation. #### Response Example { "id": "123e4567-e89b-12d3-a456-426614174000", "type": "FLAG_SET", "name": "my_flag_set", "description": "Controls access to beta features", "workspace": { "id": "ad2eb8f0-9c3a-11ed-873c-e234abaad3aa", "type": "WORKSPACE" }, "createdAt": "2023-10-27T10:00:00Z" } ``` -------------------------------- ### GET /splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} Source: https://docs.split.io/reference/get-feature-flag-definition-in-environment Retrieves the full definition of a specific feature flag within a designated workspace and environment. ```APIDOC ## GET /splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} ### Description Retrieves a feature flag definition given the name and the environment. ### Method GET ### Endpoint /splits/ws/{workspace-id}/{feature-flag-name}/environments/{environment-id-or-name} ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The ID of the project (workspace) of the feature flag. - **feature-flag-name** (string) - Required - The case-sensitive name of the feature flag. - **environment-id-or-name** (string) - Required - The ID or case-sensitive name of the FME environment. ### Request Example N/A (No request body required for GET) ### Response #### Success Response (200) - **name** (string) - The name of the feature flag. - **environment** (object) - The environment details. - **trafficType** (object) - The traffic type associated with the flag. - **killed** (boolean) - Whether the flag is killed. - **treatments** (array) - List of available treatments. #### Response Example { "name": "paywall_beta", "environment": { "id": "2626cf50-73d7-11e7-91fb-0ec612a5b38a", "name": "Production" }, "trafficType": { "id": "4d3405a0-9ca5-11e5-9706-16a11fb02dec", "name":"user" }, "killed": false, "treatments": [ {"name":"on","configurations": "{\"color\":\"red\"}"},{"name":"off","configurations": "{\"color\":\"blue\"}"} ] } ``` -------------------------------- ### GET /trafficTypes/ws/{workspace-id} Source: https://docs.split.io/reference/get-traffic-types Retrieves a list of traffic types for a given workspace. This endpoint requires an Admin API Key with appropriate roles and scopes. ```APIDOC ## GET /trafficTypes/ws/{workspace-id} ### Description Gets a list of traffic types within a specified workspace. ### Method GET ### Endpoint `/internal/api/v2/trafficTypes/ws/{workspace-id}` ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The ID of the project (workspace) to get a list of traffic types from. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name. #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the traffic type. - **name** (string) - The name of the traffic type. - **displayAttributeId** (string) - The ID of the display attribute associated with the traffic type. #### Response Example ```json [ { id: "", name: "", displayAttributeId: "" }, ... ] ``` #### Error Response (404) ```json { "code": 404 } ``` ``` -------------------------------- ### GET /websites/split_io/rollout_statuses Source: https://docs.split.io/reference/rollout-statuses-overview Fetches a list of all available rollout statuses in the specified workspace. This is useful for understanding the different states a feature rollout can be in. ```APIDOC ## GET /websites/split_io/rollout_statuses ### Description Use this endpoint to see what the available rollout statuses are in a given workspace. ### Method GET ### Endpoint /websites/split_io/rollout_statuses ### Parameters #### Query Parameters - **workspace_id** (string) - Required - The unique identifier for the workspace. ### Request Example ``` GET /websites/split_io/rollout_statuses?workspace_id=your_workspace_id ``` ### Response #### Success Response (200) - **statuses** (array) - A list of available rollout status objects. - **status_id** (string) - The unique identifier for the rollout status. - **name** (string) - The display name of the rollout status. - **description** (string) - A brief description of the rollout status. #### Response Example ```json { "statuses": [ { "status_id": "active", "name": "Active", "description": "The feature is currently live and available to users." }, { "status_id": "paused", "name": "Paused", "description": "The feature rollout has been temporarily stopped." }, { "status_id": "draft", "name": "Draft", "description": "The feature is still in development and not yet ready for rollout." } ] } ``` ``` -------------------------------- ### GET /environments/ws/{workspace-id} Source: https://docs.split.io/reference/get-environments Retrieves a list of environments associated with a specific workspace ID. Requires appropriate Admin API Key roles and scopes for access. ```APIDOC ## GET /environments/ws/{workspace-id} ### Description Get a list of environments for a given workspace. ### Method GET ### Endpoint /environments/ws/{workspace-id} ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The ID of the project (workspace) you want to get an environment from. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name. #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "No request body needed for this GET request." } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the environment. - **name** (string) - The name of the environment. #### Response Example ```json [ { "id": "string", "name": "string" } ] ``` #### Error Response (404) - **code** (integer) - The error code, typically 404 for not found. #### Error Response Example ```json { "code": 404 } ``` ``` -------------------------------- ### POST /websites/split_io/projects Source: https://docs.split.io/reference/create-workspace Creates a new project (workspace) in Split.io. This action does not create a default environment. ```APIDOC ## POST /websites/split_io/projects ### Description Allows you to create projects (formerly known as workspaces). Note: When you create a project from this API, this won't create the default environment. You must use the create environments API to create an environment. ### Method POST ### Endpoint /websites/split_io/projects ### Parameters #### Request Body - **name** (string) - Required - The name of the project to be created. - **requiresTitleAndComments** (boolean) - Required - Specifies whether titles and comments are required for this project. ### Request Example ```json { "name": "My New Project", "requiresTitleAndComments": true } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the created project. - **name** (string) - The name of the created project. - **requiresTitleAndComments** (boolean) - Indicates if titles and comments are required. - **createdAt** (string) - The timestamp when the project was created. - **lastUpdatedAt** (string) - The timestamp when the project was last updated. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "My New Project", "requiresTitleAndComments": true, "createdAt": "2023-10-27T10:00:00Z", "lastUpdatedAt": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### GET /internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name} Source: https://docs.split.io/reference/get-feature-flag Retrieves the metadata for a specific feature flag within a given workspace. This endpoint is useful for fetching detailed configuration and status of your feature flags. ```APIDOC ## GET /internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name} ### Description Retrieves the metadata for a specific feature flag within a given workspace. This endpoint is useful for fetching detailed configuration and status of your feature flags. ### Method GET ### Endpoint /internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name} ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The ID of the workspace. - **feature-flag-name** (string) - Required - The name of the feature flag. ### Request Example ```json { "example": "curl -v -X GET \n -H 'Content-Type: application/json' \n -H 'Authorization: Bearer ADMIN_API_KEY' \n https://api.split.io/internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name}" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the split. - **trafficType** (string) - The traffic type associated with the split. - **defaultRule** (object) - The default rule for the split. - **conditions** (array) - An array of conditions for the split. - **status** (string) - The status of the split (e.g., 'ACTIVE', 'ARCHIVED'). - **killed** (boolean) - Indicates if the split is killed. - **defaultPriority** (integer) - The default priority for the split. - **creationTime** (integer) - The creation timestamp of the split. - **lastUpdateTime** (integer) - The last update timestamp of the split. - **environmentId** (string) - The ID of the environment. - **workspaceId** (string) - The ID of the workspace. - **experiment** (object) - Experiment details if applicable. #### Response Example ```json { "example": "{\n \"name\": \"paywall_beta\",\n \"trafficType\": \"user\",\n \"defaultRule\": {\n \"conditionType\": \"TRAFFIC_TYPE\",\n \"treatment\": \"on\"\n },\n \"conditions\": [\n {\n \"conditionType\": \"USER_ID\",\n \"label\": \"user_id_condition\",\n \" Treatments\": [\n {\n \"treatment\": \"on\",\n \"percentage\": 100\n }\n ]\n }\n ],\n \"status\": \"ACTIVE\",\n \"killed\": false,\n \"defaultPriority\": 1,\n \"creationTime\": 1626274192008,\n \"lastUpdateTime\": 1626274192008,\n \"environmentId\": \"60d8a0b1e4b0f3001c8b4567\",\n \"workspaceId\": \"60d8a0b1e4b0f3001c8b4566\",\n \"experiment\": {\n \"name\": \"experiment_name\",\n \"treatment\": \"control\"\n }\n }" } ``` #### Error Responses - **401 Unauthorized** - **code** (integer) - The error code. - **message** (string) - The error message. - **transactionId** (string) - The transaction ID for tracing. - **403 Forbidden** - **code** (integer) - The error code. - **message** (string) - The error message. - **transactionId** (string) - The transaction ID for tracing. - **404 Not Found** - **code** (integer) - The error code. - **message** (string) - The error message. - **transactionId** (string) - The transaction ID for tracing. ``` -------------------------------- ### GET /splits/ws/{workspace-id}/{feature-flag-name} Source: https://docs.split.io/reference/get-feature-flag Retrieves a specific feature flag within a given workspace. This endpoint is useful for fetching the details of a feature flag by its name and the associated workspace ID. ```APIDOC ## GET /splits/ws/{workspace-id}/{feature-flag-name} ### Description Retrieves the feature flag. ### Method GET ### Endpoint https://api.split.io/internal/api/v2/splits/ws/{workspace-id}/{feature-flag-name} ### Parameters #### Path Parameters - **workspace-id** (string) - Required - The ID of the project (workspace) to get the feature flag from. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name. - **feature-flag-name** (string) - Required - The case-sensitive name of the feature flag ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the feature flag. - **description** (string) - The description of the feature flag. - **trafficType** (object) - Information about the traffic type. - **id** (string) - The ID of the traffic type. - **name** (string) - The name of the traffic type. - **creationTime** (integer) - The timestamp when the feature flag was created. - **id** (string) - The unique identifier of the feature flag. - **tags** (array) - A list of tags associated with the feature flag. - **name** (string) - The name of the tag. - **rolloutStatus** (object) - Information about the rollout status. - **id** (string) - The ID of the rollout status. - **name** (string) - The name of the rollout status. - **owners** (array) - A list of owners for the feature flag. - **id** (string) - The ID of the owner. - **type** (string) - The type of the owner (e.g., "user"). - **rolloutStatusTimestamp** (integer) - The timestamp when the rollout status was last updated. #### Response Example ```json { "example": "{\n \"name\": \"paywall_beta\",\n \"description\": \"A sample feature to help you learn how split works.\",\n \"trafficType\": {\n \"id\": \"6414cea0-8f4d-11e7-b345-124259445f48\",\n \"name\": \"user\"\n },\n \"creationTime\": 1504294821336,\n \"id\": \"0000cea0-8f4d-11e7-b345-491559441642\",\n \"tags\" : [{ \"name\": \"one tag\" }],\n \"rolloutStatus\": {\n \"id\": \"dac63b9d-6976-4037-a96c-6f7fec31124f\",\n \"name\": \"Pre-Production\"\n },\n \"owners\": [\n {\n \"id\": \"42986350-3079-11e9-9f41-0ed50fa918ca\",\n \"type\": \"user\" \n }\n ], \n \"rolloutStatusTimestamp\": 1626274192008\n}" } ``` ``` -------------------------------- ### PART_OF_SET Matcher Configuration (Conceptual) Source: https://docs.split.io/reference/matcher-type Example of configuring the PART_OF_SET matcher. This matcher targets customers whose multi-valued attribute is a subset of the provided set of values. It requires 'strings' and 'attribute' fields, and optionally 'negate'. ```json { "matcherType": "PART_OF_SET", "strings": ["value1", "value2"], "attribute": "user_attribute", "negate": false } ``` -------------------------------- ### POST /workspaces Source: https://docs.split.io/reference/create-workspace Allows you to create projects (formerly known as workspaces). Note: When you create a project from this API, this won't create the default environment. You must use the create environments API to create an environment. ```APIDOC ## POST /workspaces ### Description Allows you to create projects (formerly known as workspaces). Note: When you create a project from this API, this won't create the default environment. You must use the create environments API to create an environment. ### Method POST ### Endpoint https://api.split.io/internal/api/v2/workspaces ### Parameters #### Request Body - **workspace** (string) - Required - request payload (json format) ### Request Example ```json { "workspace": "{\"name\": \"My New Project\"}" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created project. - **type** (string) - The type of the resource, which is 'workspace'. - **name** (string) - The name of the created project. - **requiresTitleAndComments** (boolean) - Indicates if the project requires titles and comments. #### Response Example ```json { "id": "string", "type": "workspace", "name": "string", "requiresTitleAndComments": true } ``` #### Error Responses - **400 Bad Request**: Returned if the request payload is invalid. - **401 Unauthorized**: Returned if the API key is missing or invalid. - **409 Conflict**: Returned if a project with the same name already exists. ``` -------------------------------- ### Split.io API Not Found Error Example Source: https://docs.split.io/reference/get-flag-set-by-id Example of a 'Not Found' error response, returned when a requested resource does not exist. The response includes the error type, status code 404, the 'NOT_FOUND' error code, and a unique request ID. ```json { "type": "ERROR", "status": 404, "code": "NOT_FOUND", "requestId": "2abc7524jgy8" } ``` -------------------------------- ### Split.io API Payment Required Error Examples Source: https://docs.split.io/reference/get-flag-set-by-id Examples of 'Payment Required' errors (status code 402). This can occur due to reaching an organization's usage limit ('LIMIT_REACHED') or lacking access to a required feature or package ('MISSING_REQUIRED_PACK'). ```json { "type": "ERROR", "status": 402, "code": "LIMIT_REACHED", "requestId": "2abc7524jgy8" } ``` ```json { "type": "ERROR", "status": 402, "code": "MISSING_REQUIRED_PACK", "requestId": "2abc7524jgy9" } ```