/
How to upload text to Quadriga through rest interface

How to upload text to Quadriga through rest interface

You can upload texts to Quadriga projects using Quadriga's API.

Step-by-step guide

The REST endpoint to upload texts to Quadriga is provided at: http://your.quadriga.instance/quadriga/rest/project/{projectId}/workspace/{workspaceId}/text

  1. Make a POST request to the endpoint.
  2. You need the ID of the project and the ID of the workspace to which you want to upload a text. This method will not automatically create projects or workspaces if they don't exist. You also need to provide the internal Quadriga ID of project and workspace. 
  3. Insert the "projectId" and "workspaceId" in the placeholders in the above specified url. For example: http://your.quadriga.instance/quadriga/rest/project/PROJ76YUI/workspace/WS34RTrt/text
  4. You will be uploading text by sending XML as payload of your request. It must contain the following tags:
    1. <text>                 - The proberly escaped text to be uploaded. 
    2. <handle>            - The URI of the original (where the text is taken).
    3. <file_name>       - A filename for the uploaded text.
    4. <accessibility>   - Visibility of the file. It's value can only be either "PUBLIC" (anyone can see a text) or "PRIVATE" (only project members can see a text).
      See the provided sample input file ("InputText.xml") for reference.
  5. If the upload is successful, an XML response is sent that contains a URI that points to the uploaded text. See the sample output file ("TextUploadResponse.xml") for reference.

 

Files:

Sample Input XML: InputText.xml

Sample Output XML: TextUploadResponse.xml

Related content

How to upload a network to Quadriga with Project and Workspace Info
How to upload a network to Quadriga with Project and Workspace Info
More like this
How to create a Project and Workspace
How to create a Project and Workspace
More like this
DEPRECATED: How to upload a network to Quadriga
DEPRECATED: How to upload a network to Quadriga
More like this
User Accounts
More like this
Setting up your Quadriga development environment (Java)
Setting up your Quadriga development environment (Java)
More like this
Getting started
Getting started
More like this