Retrieve All Sites

Retrieve All Sites
Get all sites currently connected to the platform.

Retrieves all sites currently connected to the platform. By default, all site types (NSX_MANAGER, SSP and AVI) are returned, but query parameters can be used to filter the sites.

Notes:

  • If no sites are connected to the platform an empty list will be returned.
  • The platform does not store the username and password that were used to onboard the site, so these fields will always be returned empty.
Request
URI
GET
https://{api_host}/ssp/sites
COPY
Query Parameters
integer
offset
Optional
Constraints: minimum: 0 default: 0

Offset pagination parameter used to exclude from a response the first N items of a resource collection. Combine the offset and the page_size options to request a particular set or page of items.

integer
page_size
Optional
Constraints: minimum: 0 default: 1000

Number of records to be returned in the API request from the provided offset

boolean,null
sort_ascending
Optional
Constraints: default: false

True, if the list of records returned need to be sorted in ascending order, false otherwise.

string
sort_by
Optional

The parameter name on which to sort the list of records. Only top-level parameters in the returned list of records will be supported. If not provided, system will define the parameter by which results are sorted.

string
site_name
Optional

Use this request param to filter by site name.

string
site_type
Optional

Use this request param to filter by site type.

Enumeration: NSX_MANAGER, AVI, SSP
string
current_state
Optional

Use this request param to filter by a site's current status.

Enumeration: READY, NOT_READY, INACTIVE, UNKNOWN, ONBOARD_IN_PROGRESS, OFFBOARD_IN_PROGRESS

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns SiteList of type(s) application/json
This response body class contains all of the following: ListResult , InlineSiteList1
{
    "total_result_count": 1,
    "sites": [
        {
            "_create_time": 1779491346080,
            "_last_modified_time": 1779491350276,
            "_resource_type": "Site",
            "_revision": 0,
            "id": "2dc09816-34c0-43fb-99a6-b19b249a43da",
            "site_ids": [
                "2dc09816-34c0-43fb-99a6-b19b249a43da"
            ],
            "desired_state": "ONBOARD",
            "cluster_manager_ips": [
                "190.168.111.9"
            ],
            "site_connection_info": {
                "password": "",
                "username": "",
                "connection_type": "DYNAMIC",
                "hostname": "190.168.111.9"
            },
            "site_name": "nsx-mgr-0",
            "site_type": "NSX_MANAGER",
            "status": {
                "cluster_status": "STABLE",
                "conditions": [
                    {
                        "last_transition_time": 1779491372000,
                        "message": "",
                        "name": "CertificatesInSync",
                        "state": "PASS"
                    },
                    {
                        "last_transition_time": 1779491434000,
                        "message": "",
                        "name": "ConnectionEstablished",
                        "state": "PASS"
                    },
                    {
                        "last_transition_time": 1779491437000,
                        "message": "",
                        "name": "SiteConditionConfiguredPlatformDeploymentConfig",
                        "state": "NOT_APPLICABLE"
                    },
                    {
                        "last_transition_time": 1779491439000,
                        "message": "",
                        "name": "CreatedNsxSspApplianceInfo",
                        "state": "PASS"
                    },
                    {
                        "last_transition_time": 1779491534000,
                        "message": "",
                        "name": "FeatureSettingsReady",
                        "state": "PASS"
                    },
                    {
                        "last_transition_time": 1779491514000,
                        "message": "",
                        "name": "CommonAgentReady",
                        "state": "PASS"
                    },
                    {
                        "last_transition_time": 1779491563000,
                        "message": "",
                        "name": "PaceAgentReady",
                        "state": "PASS"
                    },
                    {
                        "last_transition_time": 1779491532000,
                        "message": "",
                        "name": "NsxStreamingReady",
                        "state": "PASS"
                    }
                ],
                "configuration_status": {
                    "configuration_message": "OnboardingComplete",
                    "current_status": "READY",
                    "site_precheck_status": {
                        "site_precheck_phase": "ONBOARD",
                        "site_precheck_results": [
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteConnectionPrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "ActiveSitePrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteUserRolePrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteVersionCompatabilityPrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteNodeTypePrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteRegistrationPrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteNtpPrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "BackupRestoreInProgressPrecheck",
                                "precheck_result_status": "PASSED"
                            },
                            {
                                "precheck_last_run_time": 1779491349000,
                                "precheck_name": "SiteNsxConfigLimitPrecheck",
                                "precheck_result_status": "PASSED"
                            }
                        ],
                        "site_precheck_state": "PASSED"
                    }
                },
                "connection_status": "HEALTHY",
                "infrastructure_sync_agent_status": {
                    "last_transition_time": 1779491514000,
                    "status": "UP"
                },
                "inventory_sync_agent_status": {
                    "last_transition_time": 1779491563000,
                    "status": "UP"
                },
                "nsx_cluster_id": "463ce5e1-8001-4b60-b346-796940459666",
                "nsx_version": "9.2.0.0.25077145"
            },
            "virtual_ip": "190.168.111.99"
        }
    ]
}

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": 200001,
    "error_message": "An internal server error occurred.",
    "module_name": "site"
}
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 -H 'Authorization: <value>' https://{api_host}/ssp/sites