Briefcase OAuth REST API Example performed with the Virtuoso OAuth Testing Tool
The following example demonstrates adding a resource and getting resource info by the ODS REST APIs briefcase.resource.store and briefcase.resource.get using the OAuth Test Tool.
Full list of the ODS REST APIs for ODS Briefcase you can find here.
- Go to http://demo.openlinksw.com/ods
- Log in as user demo with password demo
- Go to Settings->OAuth Keys
- Copy the Token value for an Briefcase instance or create such in not existing.
For ex.: 32e2a8fdddb69cb76b0e8309c42e5a7d008fdefc
- Go to http://demo.openlinksw.com/ods/oauth_test.vsp
- In the shown form enter for:
- Server: http://demo.openlinksw.com/ods/api
- Consumer Key: 32e2a8fdddb69cb76b0e8309c42e5a7d008fdefc
- API method: briefcase.resource.store
- API parameters: path=/DAV/home/demo/Public/mytest&content=TEST
- Select for Query options: "Generate URI and Submit".
- Click the "Execute" button.
- In the shown authorization form click the "Authorize" button.
- As result will be shown the generated URI and the output message of executing the ODS REST API.
In our case, the id of the new created resource will be: 110997
- Now lets get the data for the created resource.
In the form enter:
- API method: briefcase.resource.get
- API parameters: path=/DAV/home/demo/Public/mytest
- Select for Query options: "Generate URI and Submit".
- Click the "Execute" button.
- As result in the "Response Body" text-area will be shown the retrieved content for the resource with the given above id.
Related
CategoryBriefcase CategoryODS