Earlier we integrated with XTRF via Web Service (SOAP) API. Unfortunately I didn't participate in that development, so I can only tell about what I see in our source code now. It seems, that in that version there was a Partner Service API (namespace: http://www.xtrf.eu/TranslationManagement/PartnerWSAPI), which had a service called "createSimpleProject" (type: http://www.xtrf.eu/PartnerWSAPI/createSimpleProject). In this service's request object there was a field called "files", containing objects of type "WorklowFile". Here we set
- the category of the file ("Workfile")
- the name of the file
- an URL pointing to it
... and my understanding is that we didn't have to send the content of the file to XTRF directly; rather, we sent only a URL pointing to the file, and XTRF downloaded the file for itself for further usage.
Example with the generated Java stubs we used:
SoapConnection connection = getConnection(null);
SimpleProject simpleProject = new SimpleProject();
/* Setting all other fields. */
WorkflowFile file = new WorkflowFile();
file.setCategory(WorkflowFileCategory.Workfile);
file.setName("veryImportant.xlf");
file.setUrl("http://example.com/xliff/file");
List<WorkflowFile> files = simpleProject.getFiles();
files.add(file);
simpleProject.setFiles(files);
String projectId = connection.createSimpleProject(simpleProject).getProjectId();
Now we are trying to integrate with XTRF using REST API, specifically the Customer API, and we need to call the quote creating service (POST /quotes) to complete our development task. Documentations suggest, that first we need to send the content of the XLIFF file directly to XTRF in a POST request with multipart/form-data encoding using the service POST /system/session/files. If I understand correctly, this service can not be used by passing only an URL, we need to send the entire content of the XLIFF in the POST request's payload; however, our application has a strict limitation, and works with large XLIFF files, and it is very likely, that we will exceed the limitation by very much.
(I tried passing the URL to the quote creating service, similar to as we earlier did with the SOAP version of the service, but I got back an error saying the resource was not found.)
So my question is if there is a way in the Customer REST API to send only the link pointing to the XLIFF file to XTRF, so XTRF would download the file itself, thus working around the limitation of our system?