We can use the following steps to upload text through rest interface to Quadriga.
Step-by-step guide
REST endpoint has been provided by Quadriga at
http://your.quadriga.instance/quadriga/rest/project/{projectId}/workspace/{workspaceId}/text
Typically when we deploy Quadriga on local machine, the endpoint would be
http://localhost:8080/quadriga/rest/project/{projectId}/workspace/{workspaceId}/text
- Get the relevant "projectId" and "workspaceId" for the workspace to which you want to upload the text.
- Insert the "projectId" and "workspaceId" in the placeholders in the above specified url.
- Go to "pom.xml" of Quadriga and search for the tag "textfiles.location". Make sure that appropriate local path of the directory(which will contain the uploaded text) is given as value for that tag.
- You will be uploading text by sending XML in the body of request. It must contain the following tags
<text> - It contains the text which we are uploading
<handle> - It contains the uri from where text is taken
<file_name> - It contains the name of the text file which are uploading
<accessibility> - It contains the information about the visibility of the file.
It's value can only be either "PUBLIC" or "PRIVATE".
sample input file ("InputText.xml") is provided for reference. - When the upload is successful, xml is sent as response.
sample output file ("TextUploadResponse.xml") is sent as response.
Files:
Sample Input XML: InputText.xml
Sample Output XML: TextUploadResponse.xml
Related articles
Filter by label
There are no items with the selected labels at this time.