Projects

A project contains configuration that is relevant for all ‘translationTasks’ which are associated to that project.

Endpoints:

Default Schema

{
  "confidential": false,
  "name": "XML-Check_its",
  "documentConfiguration": {
   "attachOriginals": true,
   "applySubfilterHtml": false
   "excludeContentsFromTranslationPatterns":[
      "^tt_content$",
      "^[\\d]+$",
      "^[0-9a-f]{40}$"
    ],
   "itsDocument": "<<ITS-DOCUMENT>>"
  },
  "orderReferenceNumbers": [
    {
      "CostCenter": {
        "number": "1561651"
      }
    },
    {
      "PO-Number": {
        "number": "PO-123456",
        "target": "en"
      }
    }
  ],
  "lspVendorIds": [
    "bDDYgzD2LMGKthQA3"
  ],
  "notifications": {
    "quotation": {
      "receiverTypes": {
        "USER": false,
        "TRANSLATION_TASK": false,
        "ADDITIONAL": false
      },
      "additionalEmails": [],
    },
    "delivery": {
      "receiverTypes": {
        "USER": false,
        "TRANSLATION_TASK": true,
        "ADDITIONAL": false
      },
      "additionalEmails": [],
      "shouldAttachTargetDocuments": false
    }
  },
  "pretranslationConfiguration": {
      "shouldPretranslate": false,
      "matchCap": 100
  },
  "id": "tS5mGtcxfyHngAYPc"
}

Project

confidential:Indicates if a project contains confidential.
name:The date name of the project.
documentConfiguration:
 See documentConfiguration.
orderReferenceNumbers:
 An array of objects. Each represents a reference number with key and value that is submitted to the vendor. Key the objects must contain at least one non whitespace character. Value represents a specific order number which property ‘number’ must contain at least one non whitespace character. An order number might specify an optional ‘target’ property which represents a target language. Quote enquiries are transferring the order reference number to the appropriate lsp vendors depending on the target language (no target language set means all languages).
lspVendorIds:An array of ids of lspVendors that will be enquired for quotes for each task of this project.
notifications:An object that allows the configuration of email notifications for different events. See notifications.
pretranslationConfiguration:
 An optional object that configures the pre-translation settings. See pretranslationConfiguration.
id [readonly]:The id that identifies the project.

documentConfiguration

attachOriginals:
 Specifies whether to send the original source documents to the lsp vendors or not.
applySubfilterHtml:
 This property is used for XML and Excel files only and applies an additional HTML filter for the extracted segments. This is very usefull e.g. for XML docuements with CDATA contents where pure HTML is inserted.
excludeContentsFromTranslationPatterns:
 An array of regular expression patterns which exclude matching strings from translation.
itsDocument:Specifies rules for XML-parsing. An its-document should be described correspondent to International Tag Set (ITS) Version 1.0: ITS 1.0 specification

notifications

quotation:Configures if someone should be notified when quotes for translationTasks of the given project arrive.
quotation.USER:If set to true the system will notify the email address of the user who created the translationTask.
quotation.TRANSLATION_TASK:
 If set to true the system will notify the email address that is used in the translationTask.
quotation.ADDITIONAL:
 If set to true the system will notify the email addresses that are entered in the property “additionalEmails”.
delivery:Configures if someone should be notified when languages for translationTasks of the given project are delivered.
delivery.USER:If set to true the system will notify the email address of the user who created the translationTask.
delivery.TRANSLATION_TASK:
 If set to true the system will notify the email address that is used in the translationTask.
delivery.ADDITIONAL:
 If set to true the system will notify the email addresses that are entered in the property “additionalEmails”.
delivery.shouldAttachTargetDocuments:
 If set to true the emails to notify a delivery will have the targetDocuments attached.

pretranslationConfiguration

shouldPretranslate:
 Configures if source documents for a given translation task should be pre-translated for all language combinations. Defaults to false.
matchCap:The minimal score as percentage value needed to accept the translation of a segment. 100% accepts only exact matches.

Endpoints

GET /rest/api/projects/

Returns all projects.

Example request:

GET /rest/api/projects/ HTTP/1.1
Host: example.com
Accept: application/json, text/javascript

Example response:

[
  {
    "confidential": false,
    "name": "XML-Check_its",
    "documentConfiguration": {
      "itsDocument": "<<ITS-DOCUMENT>>"
    },
    "orderReferenceNumbers": [
      {
        "CostCenter": {
          "number": "1561651"
        }
      },
      {
        "PO-Number": {
          "number": "PO-123456",
          "target": "en"
        }
      }
    ],
      "lspVendorIds": [
      "bDDYgzD2LMGKthQA3"
    ],
    "id": "tS5mGtcxfyHngAYPc"
  },
  {
    "confidential": false,
    "name": "XML-TEST",
    "documentConfiguration": {
     "itsDocument": "<<ITS-DOCUMENT>>"
    },
    "id": "29FA5PmHgookPQeF7"
  }
]
POST /rest/api/projects/

Creates a project.

Example request:

POST /rest/api/projects/ HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Content-Type: application/json

{
   "name": "Project via API - TEST"
}

Example response:

{
  "confidential": false,
  "name": "Project via API - TEST",
  "id": "KR35nGkBAstWWzkzY"
}
GET /rest/api/projects/(project_id)

Gets a project by it’s id.

Example request:

GET /rest/api/projects/57dc28f1ffd16c2045aebf0b HTTP/1.1
Host: example.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "id": "57dc28f1ffd16c2045aebf0b",
  "name": "Project via API - TEST",
  "confidential": false,
  "lspVendorIds": [
    "HzpNgoSc5FjMx9vFc"
  ],
  "orderReferenceNumbers": [
    {
      "CostCenter": {
        "number": "1561651"
      }
    },
    {
      "PO-Number": {
        "number": "PO-123456",
        "target": "en"
      }
    }
  ],
}
PATCH /rest/api/projects/(project_id)

Updates one project.

Example request:

PATCH /rest/api/projects/:id HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Content-Type: application/json

{
   "name": "Project via API - TEST",
   "confidential": true
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "id": "57dc28f1ffd16c2045aebf0b",
  "name": "Project via API - TEST",
  "confidential": true,
}
DELETE /rest/api/projects/(project_id)

Deletes one project. A project can only be deleted if it is not referenced by a translationTask.

Example request:

DELETE /rest/api/projects/:id HTTP/1.1
Host: example.com
Accept: application/json, text/javascript

Example Failure Response:

{
  "timestamp": 1473409082634,
  "status": 409,
  "error": "Conflict",
  "exception": {},
  "message": "Could not delete project because it is still referenced.",
  "path": "/rest/api/projects/5742f9fa0f6218b1d0e85ec9"
}