Governance Registry REST API Adding states

60 Views Asked by At

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.

1

There are 1 best solutions below

2
tk_ On

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.