Projects

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

Endpoints

Method URI
GET /rest/api/projects/
POST /rest/api/projects/
GET /rest/api/projects/{project_id}
PATCH /rest/api/projects/{project_id}
DELETE /rest/api/projects/{project_id}

Default Schema

{
  "confidential": false,
  "name": "XML-Check_its",
  "withReview": [],
  "availableLanguages": [
    {
      "source": "de-DE",
      "target": [
        "en-US",
        "fr-FR"
      ]
    }
  ],
  "documentConfiguration": {
    "attachOriginals": true,
    "applySubfilterHtml": false,
    "excludeContentsFromTranslationPatterns":[
      "^tt_content$",
      "^[\\d]+$",
      "^[0-9a-f]{40}$"
    ],
    "itsDocument": "<<ITS-DOCUMENT>>",
    "jsonExceptions":[
      "^tt_content$",
      "draft"
    ],
    "xlsxExcludedBackgroundColors":[
      "RED",
      "YELLOW"
    ]
  },
  "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",
  "deliveryWithin": 72
}

Properties

project

Property Writeable Value
id readonly The id that identifies the project.
name The date name of the project.
withReview An array of user ids when who are allowed to do a review for tasks of this project. Only users with sufficient rights can start the review. An empty array indicates that every user with sufficient rights can make a review. A 'null' value indicates that for this project no review is required. For backwards compatibility setting 'withReview' to 'true' is equal to setting it to an empty array. Setting 'withReview' to 'false' equals to setting it to null.
confidential Indicates if a project contains confidential.
availableLanguages A set of languages that can be processed in the project.
orderReferenceNumbers An array of objects. Each represents a reference number with key and value that is submitted to the vendor. A key of 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.
deliveryWithin Optional value which represents the default delivery time in hours. If no desired-deadline is specified on a translation task the delivery time will be added on the current date (just counting the business days)
documentConfiguration See documentConfiguration
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

Info: availableLanguages

All languages in this property, if an LSP is configured, must be supported by it.

documentConfiguration

Property Value
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 <https://www.w3.org/TR/2007/REC-its-20070403/>
jsonExceptions An array of regular expression patterns which exclude key-value pairs from a translation of json files matching the key.
xlsxExcludedBackgroundColors Cells in excel files with the given background colors will not be translated. Valid color values are: 'DARKRED', 'RED', 'ORANGE', 'YELLOW', 'LIGHTGREEN', 'GREEN', 'LIGHTBLUE', 'BLUE', 'DARKBLUE', 'PURPLE'

notifications

Property Value
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

Property Value
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.

Description of Endpoints

GET  /rest/api/projects/

Returns all projects.

Example request:

GET /rest/api/projects/ HTTP/1.1

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

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

Example response:

{
  "confidential": false,
  "documentConfiguration": {
    "attachOriginals": false,
    "itsDocument": null,
    "applySubfilterHtml": false,
    "excludeContentsFromTranslationPatterns": [],
    "jsonExceptions": []
  },
  "name": "API-Project via API-TEST",
  "id": "hqiTimddZkRpiz3Hb"
}

GET  /rest/api/projects/{project_id}

Gets a project by it's id.

Example request:

GET /rest/api/projects/57dc28f1ffd16c2045aebf0b HTTP/1.1

Example response:

{
  "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

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

Example response:

{
  "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

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"
}