Obtaining Business Owner Details from Wso2 APPM 2.1.0

Hasanthi Purnima Dissanayake
1 min readMar 17, 2019

At the time when I’m writing this APPM 2.1.0 is yet to release and I will use APPM 2.1.0 Alpha pack to obtain business owner details.

How to register the API client application

We can use post man client to send below payload with the headers to register API client application.

Authorization : Basic YWRtaW46YWRtaW4= (‘YWRtaW46YWRtaW4=’ is base64 encoded value of admin:admin)

Content-Type :application/json

{ “callbackUrl”:”www.google.lk",clientName":"app_11_04_0013","tokenScope":

“Production”,”owner”:”admin”,”grantType”:”password refresh_token”,”saasApp”:true}

The sample response is as below

{“clientId”:”9Xb0a5VIqM3lh40Sz9nKNDTHK5ga”,”clientName”:”app_11_04_0013",“CallBackURL”:”www.google.lk","clientSecret":"JxqHRTejpwQ3JomezwxAZZBGC3Ia"}

We need to get the base64encoded value of clientId:clientSecret to generate the curl command to obtain the access token. We can encode it from here.

The following curl command can be used to request the access token.

curl -X POST -H “Authorization: Basic OVhiMGE1VklxTTNsaDQwU3o5bktORFRISzVnYTpKeHFIUlRlanB3UTNKb21lend4QVpaQkdDM0lh” -H “Host: 127.0.0.1:9763” -H “Content-Type:application/x-www-form-urlencoded” http:

Defining business owners can be done by using admin-dashboard which can be accessed using https://localhost:9443/admin-dashboard. You can find more details on business owners functionality form here The request to obtain business user request

curl -X GET -H “Authorization: Bearer c7f5b01843b28ae7090a22f9db198c71””http://localhost:9763/api/appm/publisher/v1.1/administration/businessowner/1" -i

The response obtained

HTTP/1.1 200 OK Date: Thu, 02 Jun 2016 05:45:33 GMT Content-Type: application/json Transfer-Encoding: chunked Server: WSO2 Carbon Server {“site”:””,”email”:”hasanthi@gmail.com”,”description”:””,”name”:”hasanthi”,”properties”:[],”id”:1}

Originally published at hasanthipurnima.blogspot.com.

--

--