Job Asynchronous API v2

From Memsource
Jump to: navigation, search

Pre-translate

action: api/async/v2/job/preTranslate
  parameters: see Job API v8#Pre-translate
              callbackUrl              string           O

response: JSON
    {
      "asyncRequest":{
        "id":8414,
        "createdBy":{
          "id":1,
          "lastName":"test",
          "email":"test@test.com",
          "userName":"admin",
          "role":"ADMIN",
          "active":true,
          "firstName":"admin"
        },
        "asyncResponse":null,
        "action":"PRE_TRANSLATE",
        "dateCreated":"2014-11-03T16:03:11Z"
      }
    }

Create New Job

action: api/async/v2/job/create
  parameters: see Job API v8#Create_New_Job
              callbackUrl              string           O

response: JSON
    {
      "asyncRequest":{
        "id":8414,
        "createdBy":{
          "id":1,
          "lastName":"test",
          "email":"test@test.com",
          "userName":"admin",
          "role":"ADMIN",
          "active":true,
          "firstName":"admin"
        },
        "asyncResponse":null,
        "action":"PRE_TRANSLATE",
        "dateCreated":"2014-11-03T16:03:11Z"
      }
      "unsupportedFiles": [ "document.pdf" ],
      "jobParts" : [
        {
          "id": 9371,
          "task": "5023cd08e4b015e0656c4a8f",
          "fileName": "document.txt",
          "targetLang": "de",
          "wordCount":-1,
          "beginIndex":0,
          "endIndex":-1
        },
        {
          "id": 9372,
          "task": "5087ab08eac015e0656c4a00",
          "fileName": "document.doc",
          "targetLang": "de",
          "wordCount": -1,
          "beginIndex":0,
          "endIndex":-1
        }
      ]
    }