curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/octet-stream' \
--header 'Memsource: <memsource>' \
--data '{}'import requests
url = "https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs"
payload = "{}"
headers = {
"Memsource": "<memsource>",
"Authorization": "<api-key>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Memsource: '<memsource>',
Authorization: '<api-key>',
'Content-Type': 'application/octet-stream'
},
body: '{}'
};
fetch('https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{}",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/octet-stream",
"Memsource: <memsource>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Memsource", "<memsource>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs")
.header("Memsource", "<memsource>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/octet-stream")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Memsource"] = '<memsource>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/octet-stream'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"asyncRequest": {
"action": "PRE_ANALYSE",
"dateCreated": "2023-11-07T05:31:56Z",
"id": "<string>"
},
"jobs": [
{
"continuous": true,
"dateCreated": "2023-11-07T05:31:56Z",
"dateDue": "2023-11-07T05:31:56Z",
"filename": "<string>",
"fullFilename": "<string>",
"imported": true,
"jobAssignedEmailTemplate": {},
"notificationIntervalInMinutes": 123,
"providers": [
{
"type": "<string>",
"id": "<string>",
"uid": "<string>"
}
],
"sourceFileUid": "<string>",
"status": "NEW",
"targetLang": "<string>",
"uid": "<string>",
"updateSourceDate": "2023-11-07T05:31:56Z",
"workflowLevel": 123,
"workflowStep": {
"id": "<string>",
"lqaEnabled": true,
"name": "<string>",
"order": 123,
"uid": "<string>"
}
}
],
"unsupportedFiles": [
"<string>"
],
"warnings": [
{
"domain": "STYLEGUIDE",
"jobPartIds": [
"<string>"
],
"message": "<string>"
}
]
}Create job
Upload a source file to create a translation job in the specified project. An API call to create a job within a specified project. The source file can be uploaded directly in the message body or downloaded from connector.
Job import is asynchronous. The file is processed in the background after this call returns. The response body includes an asyncRequest object; poll Get asynchronous request (action: IMPORT_JOB) to track import progress. To check whether individual jobs are ready, poll Get job and inspect the importStatus.status field (RUNNING, ERROR, OK).
Please supply job metadata in Memsource header. For file in the request body provide also the
filename in Content-Disposition header.
A folder in the Content-Disposition filename (e.g. dir/sub/file.txt) is kept as the job directory and is appended to path if given. It is ignored for ZIP/archive uploads and for absolute names (leading slash or drive letter such as C:).
curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/octet-stream' \
--header 'Memsource: <memsource>' \
--data '{}'import requests
url = "https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs"
payload = "{}"
headers = {
"Memsource": "<memsource>",
"Authorization": "<api-key>",
"Content-Type": "application/octet-stream"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Memsource: '<memsource>',
Authorization: '<api-key>',
'Content-Type': 'application/octet-stream'
},
body: '{}'
};
fetch('https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{}",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/octet-stream",
"Memsource: <memsource>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Memsource", "<memsource>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs")
.header("Memsource", "<memsource>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/octet-stream")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/projects/{projectUid}/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Memsource"] = '<memsource>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/octet-stream'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"asyncRequest": {
"action": "PRE_ANALYSE",
"dateCreated": "2023-11-07T05:31:56Z",
"id": "<string>"
},
"jobs": [
{
"continuous": true,
"dateCreated": "2023-11-07T05:31:56Z",
"dateDue": "2023-11-07T05:31:56Z",
"filename": "<string>",
"fullFilename": "<string>",
"imported": true,
"jobAssignedEmailTemplate": {},
"notificationIntervalInMinutes": 123,
"providers": [
{
"type": "<string>",
"id": "<string>",
"uid": "<string>"
}
],
"sourceFileUid": "<string>",
"status": "NEW",
"targetLang": "<string>",
"uid": "<string>",
"updateSourceDate": "2023-11-07T05:31:56Z",
"workflowLevel": 123,
"workflowStep": {
"id": "<string>",
"lqaEnabled": true,
"name": "<string>",
"order": 123,
"uid": "<string>"
}
}
],
"unsupportedFiles": [
"<string>"
],
"warnings": [
{
"domain": "STYLEGUIDE",
"jobPartIds": [
"<string>"
],
"message": "<string>"
}
]
}Authorizations
Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.
Headers
Job metadata JSON. Required: targetLangs (languages in the project). Optional: due, workflowSettings, assignments, importSettings or useProjectFileImportSettings, preTranslate, semanticMarkup, notifyProvider, callbackUrl, path, remoteFile (for connector files), jobPreviewPackageFileUidRef, idmlPreviewAssetsFileUidRef, xmlAssistantProfile. See the JobCreateRequestDto model for details.
Body
Source file binary; required when remoteFile is not supplied in the metadata
The body is of type object.
Response
Created
Was this page helpful?