-1

How to get the governance registry lifecycles using this api https://localhost:9443//governance/restservices in payload of json.I am getting all the field but i am not getting lifecycle value in that api.Can anyone suggest how to get that.I also see this api to get lifecycle state GET https://localhost:9443/ /governance/restservices/44dadw4/states but I dont want to use this api because I have to call for each time this api to get its lifecycle state.I want to use this api https://localhost:9443//governance/restservices and get the rest service lifecycle value in json payload.

Please help i am searching in web for this approach but not getting enough result.

Community
  • 1
  • 1
Aman Gupta
  • 47
  • 9

1 Answers1

0

There is no way getting LC details from https://localhost:9443//governance/restservices using vanilla WSO2 G-Reg. This endpoint is used to retrieve rest service artifact metadata.

I don't understand your point, why you can't use https://localhost:9443/ /governance/restservices/44dadw4/states endpoint for this. Documentation.

However, You can achieve this using a custom deployment. If you want to get LC details from this endpoint you have to update the existing API code. Basically you need to update Asset.java and deploy the new governance.war file.

tk_
  • 16,415
  • 8
  • 80
  • 90
  • i have grid where i need to show the data of the above api governance/restservices.for eg suppose now i have 50 records i have to hit 50 times this api governance/restservices/44dadw4/states to get the state and bind again to data which i got from prev api not good so way – Aman Gupta May 19 '17 at 17:07
  • Well as I mentioned in my above answer you should create a new governance API(governance.war), I have pointed the starting point above(Asset.java). – tk_ May 20 '17 at 04:21