Query Proposed Segmentation Objects

Query Proposed Segmentation Objects
Query proposed segmentation objects

Retrieves a paginated list of proposed segmentation objects generated during segmentation analysis. Segmentation objects represent logical entities (applications, tiers, environments, regions, zones, infrastructure services) that may span multiple sites.

Notes

  • Only meaningful after ANALYSIS_SUCCESS else will return error if queried before
  • Supported sort_by values: displayName (default)
  • The id of each returned object is the proposed-segmentation-object-id
  • Used in subsequent calls
  • Proposed segmentation objects internally contain a list of the groups that will be created on nsx when publish is initiated
  • Publishing a segmentation object publishes all of its proposed_groups; individual group publication is not supported through this schema
  • Returns 200 on success
Request
URI
POST
https://{api_host}/ssp/segmentation/{session-id}/results/proposed-segmentation-objects
COPY
Path Parameters
string
session-id
Required  

Unique identifier of the segmentation session


Request Body

Query parameters for filtering, sorting, and pagination

ProposedSegmentationObjectsRequest of type(s) application/json
Required  
This request body class requires all of the following: ListRequestParameters , InlineProposedSegmentationObjectsRequest1
{
    "site_ids": [
        "123a456b-123c-456d-89ab-cdef12345678"
    ],
    "offset": 0,
    "page_size": 1000,
    "sort_ascending": false,
    "sort_by": "displayName",
    "segmentation_object_type": [
        "ENVIRONMENT"
    ]
}
Authentication
This operation uses the following authentication methods.
Responses
200

Successfully retrieved proposed segmentation objects

Returns ProposedSegmentationObjectListResponse of type(s) application/json
This response body class contains all of the following: ListResult , InlineProposedSegmentationObjectListResponse1
{
    "offset": 0,
    "number_of_results": 2,
    "total_result_count": 2,
    "total_pages": 1,
    "sort_ascending": false,
    "sort_by": "displayName",
    "results": [
        {
            "publish_action": "NONE",
            "_create_user": "admin",
            "_create_time": 1781139862075,
            "_last_modified_user": "admin",
            "_last_modified_time": 1781139862075,
            "_revision": 0,
            "id": "9177843080852596293",
            "display_name": "US-Central_Chicago_Dev",
            "site_ids": [],
            "segmentation_object_type": "ENVIRONMENT",
            "hierarchy_tags": [
                {
                    "scope": "region",
                    "tag": "US-Central"
                },
                {
                    "scope": "zone",
                    "tag": "Chicago"
                },
                {
                    "scope": "environment",
                    "tag": "Dev"
                }
            ],
            "proposed_groups": [
                {
                    "_create_user": "admin",
                    "_create_time": 1781139862075,
                    "_last_modified_user": "admin",
                    "_last_modified_time": 1781139862075,
                    "_revision": 0,
                    "id": "7969112174331119015",
                    "display_name": "US-Central_Chicago_Dev",
                    "site_ids": [
                        "abcdef12-abcd-ef12-abcd-ef1234567890"
                    ],
                    "group_path": "/infra/domains/default/groups/ef9fdbe2-fcf7-3704-9b9a-27f6209f0aa0",
                    "object_count_per_type": [
                        {
                            "type": "VIRTUAL_MACHINE",
                            "count": 3
                        }
                    ],
                    "group_action": "CREATE",
                    "publish_status_info": {
                        "publish_status": "READY_TO_PUBLISH"
                    },
                    "current_effective_vm_count": 0,
                    "projected_effective_vm_count": 3
                }
            ],
            "publish_status": "READY_TO_PUBLISH",
            "parent_id": "-3076270068264231186"
        },
        {
            "publish_action": "NONE",
            "_create_user": "admin",
            "_create_time": 1781139862075,
            "_last_modified_user": "admin",
            "_last_modified_time": 1781139862075,
            "_revision": 0,
            "id": "-4319949931050804959",
            "display_name": "Canada_Toronto_Dev",
            "site_ids": [],
            "segmentation_object_type": "ENVIRONMENT",
            "hierarchy_tags": [
                {
                    "scope": "region",
                    "tag": "Canada"
                },
                {
                    "scope": "zone",
                    "tag": "Toronto"
                },
                {
                    "scope": "environment",
                    "tag": "Dev"
                }
            ],
            "proposed_groups": [
                {
                    "_create_user": "admin",
                    "_create_time": 1781139862075,
                    "_last_modified_user": "admin",
                    "_last_modified_time": 1781139862075,
                    "_revision": 0,
                    "id": "3402284452046692786",
                    "display_name": "Canada_Toronto_Dev",
                    "site_ids": [
                        "abcdef12-abcd-ef12-abcd-ef1234567890"
                    ],
                    "group_path": "/infra/domains/default/groups/d2aa7de5-6ca0-3185-9d49-18455aceb7a4",
                    "object_count_per_type": [
                        {
                            "type": "VIRTUAL_MACHINE",
                            "count": 3
                        }
                    ],
                    "group_action": "CREATE",
                    "publish_status_info": {
                        "publish_status": "READY_TO_PUBLISH"
                    },
                    "current_effective_vm_count": 0,
                    "projected_effective_vm_count": 3
                }
            ],
            "publish_status": "READY_TO_PUBLISH",
            "parent_id": "-6704679072355221679"
        }
    ]
}

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: application/json' -d '{}' https://{api_host}/ssp/segmentation/{session-id}/results/proposed-segmentation-objects