Open document via REST API
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Mon Jul 12, 2021 7:22 pm
Open document via REST API
Hello,
In my web application I am trying to open a document using the Web Author REST plugin directly rather than browsing for documents. My Goal is something like this:
The documentation (https://github.com/oxygenxml/web-author ... PI-spec.md) states four endpoints for file operations. However, they seem to apply only to binary files and I can't find documentation about how the endpoint in my Java backend must look like for XML Documents.
Can you please point my in the right direction?
Cheers
In my web application I am trying to open a document using the Web Author REST plugin directly rather than browsing for documents. My Goal is something like this:
Code: Select all
https://localhost:10443/webauthor/api/document?url=rest%3A%2F%2Flocalhost%3A10443%2Fwebauthor%2Fapi%2Ffiles%3Furl%3D%2Fdita%2Fflowers%2Ftopics%2Fflowers%2Fgardenia.dita%26ccOnEnter%3Dfalse%26stylesheet-titles%3DBasic%2C%2B%20Inline%20insertion%20actions%26author%3DAnonym
Can you please point my in the right direction?
Cheers
-
- Posts: 2
- Joined: Mon Jul 12, 2021 7:22 pm
Re: Open document via REST API
I tried
and that results in a XHR call for
which seems what I need. I am just wondering if the expected result from
Cheers
Code: Select all
https://localhost:10443/webauthor/app/oxygen.html?url=rest%3A%2F%2Flocalhost%3A10443%2Fwebauthor%2Fapi%2Ffiles%3Furl%3D%2Fdita%2Fflowers%2Ftopics%2Fflowers%2Fgardenia.dita%26ccOnEnter%3Dfalse%26stylesheet-titles%3DBasic%2C%2B%20Inline%20insertion%20actions%26author%3DAnonym
Code: Select all
https://localhost:10443/webauthor/rest/v23.1.0/doc/load?userName=Anonym
is somewhere documented I haven't checked yet.doc/load
Cheers
-
- Posts: 81
- Joined: Wed Jul 20, 2016 8:22 am
Re: Open document via REST API
Post by mihai_coanda »
Hello,
In the REST plugin you configure your server's URL as REST Server URL, documented as $BASE_URL.
When you try to open
A request to your server will be made:
$BASE_URL/file?url=rest%3A%2F%2Flocalhost%3A10443%2Fwebauthor%2Fapi%2Ffiles%3Furl%3D%2Fdita%2Fflowers%2Ftopics%2Fflowers%2Fgardenia.dita
In this request, you will have to detect the file that you should serve and respond with the file's content.
Is this request not made to your REST server?
Please note that this request is made from the server, not the browser.
Regards,
Michael
In the REST plugin you configure your server's URL as REST Server URL, documented as $BASE_URL.
When you try to open
Code: Select all
https://localhost:10443/webauthor/app/oxygen.html?url=rest%3A%2F%2Flocalhost%3A10443%2Fwebauthor%2Fapi%2Ffiles%3Furl%3D%2Fdita%2Fflowers%2Ftopics%2Fflowers%2Fgardenia.dita%26ccOnEnter%3Dfalse%26stylesheet-titles%3DBasic%2C%2B%20Inline%20insertion%20actions%26author%3DAnonym
$BASE_URL/file?url=rest%3A%2F%2Flocalhost%3A10443%2Fwebauthor%2Fapi%2Ffiles%3Furl%3D%2Fdita%2Fflowers%2Ftopics%2Fflowers%2Fgardenia.dita
In this request, you will have to detect the file that you should serve and respond with the file's content.
Is this request not made to your REST server?
Please note that this request is made from the server, not the browser.
Regards,
Michael
Michael
https://www.oxygenxml.com
https://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service