REST URL | https://<connect>:<port>/rest/apikey/generate?providerId=<provider entity id> |
Method Type | POST |
Authentication Type | Basic |
User ID & Password | As defined in Adeptia Connect |
Request headers |
Request content type | Content-Type: application/json |
Response content type | |
Input Parameters |
---|
Provider ID | Web Service Provider Activity ID as a query parameter value. This query parameter value is important; as it is used for token authentication when consumer hits the actual endpoint created with Web Service Provider activity. Perform the following steps to get providerId. - Login to Adeptia Connect.
- Go to Configure > Web Services > REST Provider.
- Select the provider activity and click View to open the View Page from more menu.
- Locate the Entity Id from the view page and use it as a providerId.
|
Request Payload Data | For payload data, the parameters should be same as the key parameters defined while creating the security policy. Perform the following steps to get the parameters: - Login to Adeptia Connect.
- Go to Configure > Web Services > Security Policy.
- Click the Security Policy activity used for the Provider.
- Expand Authentication Properties.
- Select Authentication check box and then select API Key as a value in Authentication Type drop-down list box.
- Use these key parameters as a form data or as a request body in JSON format as shown below.
Request Payload Data Example { "customer_name" : "Loue", "order_id" : "12OR2016", "company" : "IBM" } |
Response |
---|
Success | You will receive an API Key as shown below. Return JWT Example APIKey eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ |
Errors | 400: Bad Request (if any of the required information in payload data or providerId is missing) 401: Unauthorized (if the user id and password are incorrect or not provided) 500: Internal Server Error |