API Portal Administrator's Guide : Managing API Assets : API Portal Extension Points : Managing Access Tokens
Managing Access Tokens
This section explains how a provider registered with SMTP details can provide access tokens for the consumers.
Accessing the list of all events in the INPROGRESS status
Method: GET
EndPoint: http://<host>:<port>/abs/apirepository/v1/events?eventStatus=INPROGRESS
Publishing an access token
A provider can publish the access token for the respective access token request based on the eventId value.
Method: POST
EndPointURL: http://<host>:<port>/ abs/apirepository/v1/accesstokens?eventId=<eventId>
Sample request payload for API key
{
"type":"APIKey",
"accessTokenDetails":[
{
"key":"apiKeyString",
"value":"< apiKeyString >"
},
{
"key":"expiryDate",
"value":"< expiryDate >"
}
]
}
Sample request payload for OAuth2
{
"type":"OAuth2",
"accessTokenDetails":[
{
"key":"clientId",
"value":"< clientId >"
},
{
"key":"clientSecret",
"value":"< clientSecret >"
}
]
}
Sample response payload for the API key once the request is processed successfully
{
"status":"SUCCESS",
"message":"Access token created successfully!",
"accesstokenuuid":"<GUID>"
}
Renewing an access token
The renew access token request is based on the accesstokenuuid and eventId value.
Method: PUT
EndPointURL: http://<host>:<port>/ abs/apirepository/v1/accesstokens/<accesstokenuuid>?eventId=<eventId>
Request payload
{
"type":"APIKey",
"accessTokenDetails":[
{
"key":"apiKeyString",
"value":"< apiKeyString >"
},
{
"key":"expiryDate",
"value":"< expiryDate >"
}
]
}
Response payload
{
"status":"SUCCESS",
"message":"Access token renewed successfully!"
}
Revoking an access token
The revoke access token request is based on the accesstokenuuid and eventId value.
Method: DELETE
EndPointURL: http://<host>:<port>/ abs/apirepository/v1/accesstokens/<accesstokenuuid>?eventId=<eventId>
Response: 204 (No content)
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback