Method GetApiTokens
GetApiTokens(String)
Get API tokens.
Declaration
List<ApiTokenOptionsContract> GetApiTokens(string connectionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ApiTokenOptionsContract> | Return the list of the api tokens. |
Examples
POST https://YourServerName/InfoShare/Json/Authentication/GetApiTokens
Example for a get api token.{
"connectionId": "6bc655a4-c079-4535-a733-f259e3232a3a"
}
Response:
{
"GetApiTokensResult": [{
"ExpirationDate": "31\/12\/9999 23:59:59",
"Scope":
{
"LoginAsUser": true
},
"TokenId": "b1aca353-50e7-456d-9999-9e1d63858174",
"TokenName": "TokenName",
"WithConnenctionId": false
}, {
"ExpirationDate": "15\/06\/2022 10:00:00",
"Scope":
{
"LoginAsUser": true
},
"TokenId": "3803ce97-a5ef-4645-941d-b452363ba316",
"TokenName": "TokenName2",
"WithConnenctionId": false }]
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |