Is there any API available to perform publisher operations on WSO2 Governance Registry?

久未见 提交于 2019-12-10 15:34:23

问题


I have read through the documents and I saw that there is a governance and a web service API available, but I do not understand the execution part. I would like to understand how to execute below operations through an API.

1) how can I publish service (SOAP or REST) using the API ?

2) how can I configure values to different items in publisher portal using API ?

Overview Categorization Contacts Interface Security Doc links Tags Taxonomy

3) how can I upload the artifacts WSDL, schema, policy etc ?.


回答1:


WSO2 Governance Registry supports Registry REST API and Governance REST API. You can use these APIs to do all the above operations and also these documentations contain sample curl requests which you can get an idea of executing.

For the resources specific operations, refer to documentation [1] & [2]

[1] - https://docs.wso2.com/display/Governance530/Resources+with+REST+API

[2] - https://docs.wso2.com/display/Governance530/Governance+REST+API#GovernanceRESTAPI-Assets




回答2:


There are 3 ways to add resources remotely to G-Reg

i. Using registry REST API

Add a Resource using registry REST API

Retrieving Associations Using WSO2 G-Reg Registry API Explained

ii. Using publisher API (G-Reg 5.0.0 or above)

Create Schema:(Upload file)

Request

URL:https://<host>:<port>/publisher/assets/schema/apis/schemas?type=schema

Method: POST
Header:Cookie: JSESSIONID=<SESSION-ID>

Payload:(form data)
schema : schema
schema_file : <schema file name>.xsd
filename : <schema file name>.xsd
schema_file_name : <schema file name>.xsd
file_version : <version>
addNewSchemaFileAssetButton : Create

File Upload:

Upload the schema file. Give the field entry as ‘schema_file’

Response should be:

Status: 200 OK

To upload a zip file just change the schema_file,filename and schema_file_name values with zip file name.(I didn't test this but should work according to the source code.)

iii. Using Governance API - only for hosted content type resources. (G-Reg 5.2.0 or above)

What is the version your using? Hope these details will help you!



来源:https://stackoverflow.com/questions/40164987/is-there-any-api-available-to-perform-publisher-operations-on-wso2-governance-re

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!