Generating an API Key
- Akash Kumar Jaiswal (Unlicensed)
- Avinash Kumar
The consumer requires to generate an API Key to access RESTful Web Service (authenticated by an API Key) for the Provider. Following table lists the reference values a consumer will use while generating an API Key.
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 Content Type | application/json |
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.
|
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:
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 |