Accessing the API for IBM App Connect Enterprise as a Service
You can access and use the IBM® App Connect Enterprise as a Service API after you obtain an access token for authentication.
About this task
To use the App Connect Enterprise as a Service API, you must first authenticate your credentials by including an access token in your API calls. To get an access token, you must generate an API key, a client ID, and a secret in App Connect Enterprise as a Service. The client ID represents a specific instance of App Connect Enterprise as a Service and all users of that instance share the ID. The API key represents a specific user of an instance and is specific to that user.
If you have a service that needs to access the API, you can also create a service ID, then create an API key for the service ID. The service ID is a type of user ID that represents that service. All users of the instance where the service ID is created can access the service ID.
- To access the API by using a user-specific API key, see Accessing the API with a personal API key.
- To access the API by using a service ID, see Accessing the API with a shared service ID.
Accessing the API with a personal API key
Procedure
The following steps describe how a specific user can get an access token by generating an API key, client ID, and secret.
Results
{
"access_token": "myAccessToken",
"token_type": "bearer",
"scope": "appcon:manage",
"expires_in": 43200
}
X-IBM-Client-Id
header to provide your client ID, and the Authorization:
Bearer
header to provide this access token. For example, the following call requests a list
of configurations.curl --request GET \
--url https://api.region.appconnect.automation.ibm.com/api/v1/configurations \
--header "Authorization: Bearer myAccessToken" \
--header 'X-IBM-Client-Id: myClientId' \
--header 'accept: application/json'
Authorization: Bearer
is
case-sensitive and must be referred to in calls with the correct capitalization.Accessing the API with a shared service ID
Procedure
The following steps describe how to get an access token for a service to use by generating a service ID, API key, client ID, and secret.
Results
{
"access_token": "myAccessToken",
"token_type": "bearer",
"scope": "appcon:manage",
"expires_in": 43200
}
X-IBM-Client-Id
header to provide your client ID, and the Authorization:
Bearer
header to provide this access token. For example, the following call requests a list
of configurations.curl --request GET \
--url https://api.region.appconnect.automation.ibm.com/api/v1/configurations \
--header "Authorization: Bearer myAccessToken" \
--header 'X-IBM-Client-Id: myClientId' \
--header 'accept: application/json'
Authorization: Bearer
is
case-sensitive and must be referred to in calls with the correct capitalization.