Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

  1. Login to Adeptia Connect.
  2. Go to Configure > Web Services > REST Provider.
  3. Select the provider activity and click View to open the View Page from more menu.
  4. 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:

  1. Login to Adeptia Connect.
  2. Go to Configure > Web Services > Security Policy.
  3. Click the Security Policy activity used for the Provider.
  4. Expand Authentication Properties.
  5. Select Authentication check box and then select API Key as a value in Authentication Type drop-down list box.
  6. 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

  • No labels