Using the sites commands

You can use the sites commands to check and list the sites on your Developer Portal service.

  1. Log in as Cloud manager:
    apic login --server management_server --realm admin/identity_provider --username cloud_username --password cloud_password
    You can determine which identity provider to use in the --realm parameter by entering the following command to see a list of all available identity providers (you do not need to be logged in to use this command):
    apic identity-providers:list --scope admin --server mgmt_endpoint_url --fields title,realm
    For example:
    apic identity-providers:list --scope admin --server --fields title,realm
    total_results: 2
      - title: Cloud Manager User Registry
        realm: admin/default-idp-1
      - title: Corporate LDAP user registry
        realm: admin/corporate-ldap
    The title value should enable you to determine which identity provider to use; you can then copy the corresponding --realm parameter directly from the displayed realm value. For any identity providers that were created by your administrator after API Connect was installed, the names will have been determined at creation time. The default Cloud Manager Local User Registry for login as a member of the cloud administration organization is default-idp-1.

    For full details of the apic login command, see Logging in to a management server.

  2. Get the availability zone of the portal service's sites that you want to list.
    apic availability-zones --org orgid/name --server management_server
  3. List all the portal services in that availability zone.
    apic portal-services:list --org orgid/name --server management_server --availability-zone availability_zone
  4. Get the selected portal service's name.
    apic portal-services:get --org orgid/name --server management_server --availability-zone availability_zone PORTAL-SERVICE-NAME
  5. Check the sites on your portal service. This command checks the file system, database, and API Manager on all your portal sites, which might identify platform-related problems on one or more of your portal sites.
    apic --mode portaladmin sites:check --server management_server --portal_service_name PORTAL-SERVICE-NAME --format yaml
  6. List the sites of the portal service.
    apic --mode portaladmin sites:list --server management_server --portal_service_name PORTAL-SERVICE-NAME --format json