Using the product commands

You can use the product commands to get and list the products on your Developer Portal service.

  1. Log in as Provider org:
    apic login --server management_server --realm provider/identity_provider --username provider_username --password provider_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 provider --server mgmt_endpoint_url --fields title,realm
    For example:
    apic identity-providers:list --scope provider --server --fields title,realm 
    total_results: 2
      - title: Cloud Manager User Registry
        realm: provider/default-idp-2
      - title: Corporate LDAP user registry
        realm: provider/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 API Manager Local User Registry for login as a member of a provider organization is default-idp-2.

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

  2. Get a list of products from a site.
    For example,
    apic --mode portaladmin product:list --org orgid/name --server management_server --catalog catalogid/name
    • management_server is the endpoint URL of the management server (required).
    • catalogid/name is the ID or name of the catalog that the site belongs to (required).
    • orgid/name is the ID or name of the provider organization that the catalog belongs to (required).
    • format_type is the output format. Can be json, yaml, go-template=..., go-template-file=.... Defaults to yaml.
  3. Get a product from a site by using the id or name:version.
    For example,
    apic --mode portaladmin product:get --org orgid/name --server management_server --catalog catalogid/name id/name:version
    • id/name:version - The ID or name:version of a specific product (required). For example, id-of-product-called-example-3 or example:3.0.0.
  4. Get a specific entire product document from the portal of the provided organization and catalog by using the id or name:version.
    apic --mode portaladmin product:get-document --org orgid/name --server management_server --catalog catalogid/name --format format_type  id/name:version
    For example:
    apic --mode portaladmin product:get-document --org ibm --server --catalog portal-test --format yaml  intuiz-product:1.0.0