...
The following is a list of APIs you can invoke with an access token with an access token generated with admin credentials.
Subscriber
...
authentication API
Localtabgroup |
---|
Localtab |
---|
| HTTP Request method | POST | URL | https://gateway.api.cloud.wso2.com/api/am/user/subscriber/authenticate/ | Headers | Content-Type: application/json Authorization: Bearer <Bearer token received by following prerequisites> | Payload | Code Block |
---|
{
"username":"alex@wso2.com@testcompany",
"password":”xxxx”
} |
Username is constructed using the email address(alex@wso2.com) and tenant domain(testcompany). |
|
Localtab |
---|
| Code Block |
---|
title | Successful invocation |
---|
| {
"success": true,
"authenticated": true,
"message": "User is successfully authenticated."
}
{
"success": true,
"authenticated": false,
"message": "Authentication data is invalid."
} |
Code Block |
---|
title | If the security token is invalid |
---|
| <ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat">
<ns1:faultstring>org.apache.cxf.interceptor.security.AuthenticationException: Unauthenticated request</ns1:faultstring>
</ns1:XMLFault> |
Note |
---|
The failure error given above will be converted into JSON format in the future releases of this API. |
|
|
Subscriber
...
invitation API
Localtabgroup |
---|
Localtab |
---|
| HTTP Request method | POST | URL | https://gateway.api.cloud.wso2.com/api/am/user/subscriber/ | Headers | Content-Type: application/json Authorization: Bearer <Bearer token received by following prerequisites> | Payload | Code Block |
---|
{
"username":"alex.cse@gmail.com@testcompany",
} |
Username is constructed using the email address(‘alex.cse@gmail.com’) and tenant domain(testcompany). |
|
Localtab |
---|
| Code Block |
---|
title | Successful invocation |
---|
| {
"success": true,
"message": "User is invited successfully."
} |
Code Block |
---|
title | If the security token is invalid |
---|
| <ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat">
<ns1:faultstring>org.apache.cxf.interceptor.security.AuthenticationException: Unauthenticated request</ns1:faultstring>
</ns1:XMLFault> |
Note |
---|
The failure error given above will be converted into JSON format in the future releases of this API. |
|
|
Subscriber
...
invitation verification API
Tip |
---|
|
This API is required to invite a member or approve a self sign up request made by a user. You need to obtain the registration link of the user to invoke this API. This is an intermediate step to verify the confirmation key of members, before adding them to your organization |
Localtabgroup |
---|
Localtab |
---|
| The confirmation key is retrieved from the invitation link received by the end user you need to add to the organization. A sample is given below. Code Block |
---|
https://wso2store.wso2.com/site/pages/confirm-verification.jag?confirmation=11508277-080d-45e4-b7ac-956f76c3f93f&isStoreInvitee=true&tenant=mycompany. |
You need to extract the following information, required for the request query parameters. Parameter | Description |
---|
isStoreInvitee | Obtained from the one-time link of a self-signed up user. If not found, pass this parameter with a null value. | IsInvitee | Obtained from the one-time link of an invited user. If not found, pass this parameter with a null value. |
|
Localtab |
---|
| Code Block |
---|
title | Successful invocation for new users to WSO2 Cloud |
---|
| {
"success":true,
"message":"Successfully confirmed the the confirmation key for the user sam@wso2.com","data":"{\"confirmationKey\":\"a346c52d-f9b0-4415-c409-00300dbc23ba\",\"email\":\"sam@wso2.com\"}"
} |
You can add the user after successful confirmation Code Block |
---|
title | Successful invocation for existing users to WSO2 Cloud |
---|
| {
"success":true,
"message":"The user : sam@wso2.com has been successfully invited. Please use the same password to login"
} |
Code Block |
---|
title | Unsuccessful invocation (Invalid code) |
---|
| {
"success":false,
"message":"The link you are trying to click or the provided confirmation code has expired or is not valid"
} |
|
|
Subscriber
...
registration API
Tip |
---|
|
The tenant admin is recommended to perform this task. |
...
You have now successfully reset the password, after completing the steps listed above.
Log
...
download API
Localtabgroup |
---|
Localtab |
---|
| HTTP Request method | GET | URL | https://gateway.api.cloud.wso2.com/api/logs?logType=<log-type>&date=yyyy-mm-dd | Headers | Content-Type: application/json Authorization: Bearer <Bearer token received by following prerequisites> |
|
Localtab |
---|
| Code Block |
---|
title | Successful invocation |
---|
| {
“archiveFileUrl” : “https://link-to-archive-file”,
“validPeriodInSeconds” : 300
} |
Note |
---|
title | Unsuccessful invocations |
---|
| Code Block |
---|
title | Unsuccessful invocations |
---|
| {
"message": "2019-04/08 is an invalid date format. Valid format is year-month-day (yyyy-mm-dd) Pacific Standard Time"
} |
Code Block |
---|
title | Unsuccessful invocations |
---|
| {
"message": "load-balance is an invalid 'logType' value. Valid values are : [load-balancer, gateway]"
} |
Code Block |
---|
title | Unsuccessful invocations |
---|
| {
"message": "Logs are not available for the specified type : load-balancer and date : 2019-04-07"
} |
Code Block |
---|
title | Unsuccessful invocations |
---|
| {
"message": "An internal server error occurred during the log retrieval process"
} |
Code Block |
---|
title | Unsuccessful invocations |
---|
| {
"message": "Unauthorized user. User must have admin privileges to invoke the log download API"
} |
|
|
|
...