API Management 10.4 | Using CentraSite | Runtime Governance | Consumer Management | Managing Consumers through Command Line Interface | Reassigning Consumer Association to a Virtual Service
 
Reassigning Consumer Association to a Virtual Service
Pre-requisites:
To reassign an Application, API-Key, or OAuth2 Client asset (represented as a consumer application) to a Virtual Service asset through the CentraSite Command Line Interface (CLI), you must have the CentraSite Administrator role.
When a virtual service associated with an instance of the asset type Application, API-Key, or OAuth2 Client is imported from a source instance to a target instance of CentraSite, the imported virtual service does not include the associated asset in the target instance.
CentraSite provides a command tool named reassign Consumer for this purpose. This tool reassigns an Application, API-Key, or OAuth2 Client asset from one virtual service to another service. During the process, an association of the API key or OAuth2 Client token of the consumer application is moved from one virtual service to another.
* To reassign a consumer association
*Run the command reassign Consumer.
The syntax is of the format: C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd|sh reassign Consumer [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> -application <CONSUMER-APPLICATION> -service <VIRTUAL-SERVICE>
The input parameters are:
Parameter
Description
CENTRASITE-URL
(Optional). The URL of the CentraSite registry. For example, http://localhost:53307/CentraSite/CentraSite.
USER-ID
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
PASSWORD
The password for the CentraSite user identified by the parameter USER-ID.
CONSUMER-APPLICATION
The name or key of an Application, API-Key, or OAuth2 Client asset (consumer application) you want to reassociate with a virtual service.
VIRTUAL-SERVICE
The name or key of the virtual service to which you want to reassociate the consumer application identified by the parameter CONSUMER-APPLICATION.
Example (all in one line):
The command for reassigning an Application, API-Key, or OAuth2 Client asset with a virtual service with an administrator account INTERNAL\Admin and password AdminPW would be:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd reassign Consumer -user INTERNAL\Admin -password AdminPW -url http://localhost:53307/CentraSite/CentraSite -application MyAPIKey -service SampleVirtualService-2

Copyright © 2015- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release