Using the maintenance commands
You can use the maintenance commands to manage the maintenance operations on your Developer Portal service.
- 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):
For example,apic identity-providers:list --scope provider --server mgmt_endpoint_url --fields title,realm
Theapic identity-providers:list --scope provider --server myserver.com --fields title,realm total_results: 2 results: - title: API Manager Local User Registry realm: provider/default-idp-2 - title: Corporate LDAP user registry realm: provider/corporate-ldap
title
value should enable you to determine which identity provider to use; you can then copy the corresponding--realm
parameter directly from the displayedrealm
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 isdefault-idp-2
.For full details of the
apic login
command, see Logging in to a management server.For a summary of the general-purpose commands and their use, see Developer Portal CLI commands.
- Get the current mode of your maintenance operations.
apic --mode portaladmin --server management_server maintenance:status --org orgid/name --catalog catalogid/name
mode
is the toolkit operation mode.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).management_server
is the endpoint URL of the management server (required).
For example,apic --mode portaladmin --server api.stagingexample.com maintenance:status --org ibm --catalog api-connect-catalog-1
- Enable the maintenance mode to make the Developer Portal site
inaccessible to everyone apart from an administrator. All other users who enter the site URL will
see a maintenance message set by the administrator.
apic --mode portaladmin --server management_server maintenance:enable --org orgid/name --catalog catalogid/name
- Disable the maintenance mode to make the Developer Portal site
accessible to everyone.
apic --mode portaladmin --server management_server maintenance:disable --org orgid/name --catalog catalogid/name
- Rebuild the node access table to prevent users from accessing the nodes to which they do not
have access permissions.
apic --mode portaladmin --server management_server maintenance:rebuild-node-access --org orgid/name --catalog catalogid/name
- Rebuild and reindex the search API index to increase the performance and storage space usage.
apic --mode portaladmin --server management_server maintenance:search-api-index-rebuild --org orgid/name --catalog catalogid/name
- Print the search API index status.
apic --mode portaladmin --server management_server maintenance:search-api-index-status --org orgid/name --catalog catalogid/name