| POST | /RestApi/translations/projects |
|---|
"use strict";
export class XliffProxy {
/** @param {{IsXliff?:boolean,IsFtp?:boolean,IsMachineTranslation?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
IsXliff;
/** @type {boolean} */
IsFtp;
/** @type {boolean} */
IsMachineTranslation;
}
export class LanguageProxy {
/** @param {{Code?:string,Name?:string,Count?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {string} */
Name;
/** @type {number} */
Count;
}
export class LanguagePairProxy {
/** @param {{ActualSource?:LanguageProxy,Target?:LanguageProxy}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {LanguageProxy} */
ActualSource;
/** @type {LanguageProxy} */
Target;
}
export class ConnectorProxy {
/** @param {{Name?:string,Title?:string,Count?:number,Xliff?:XliffProxy,SupportedLanguages?:LanguagePairProxy[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
Title;
/** @type {number} */
Count;
/** @type {XliffProxy} */
Xliff;
/** @type {LanguagePairProxy[]} */
SupportedLanguages;
}
export class ProjectProxy {
/** @param {{Id?:string,Title?:string,Description?:string,StartDate?:string,DueDate?:string,DateSent?:string,DateCompleted?:string,SentBy?:string,Connector?:ConnectorProxy,Status?:string,PoReference?:string,ActualSourceLanguage?:LanguageProxy,TargetLanguages?:LanguageProxy[],TranslationsCount?:number,CanBeCompleted?:boolean,ExternalId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Title;
/** @type {string} */
Description;
/** @type {string} */
StartDate;
/** @type {string} */
DueDate;
/** @type {?string} */
DateSent;
/** @type {?string} */
DateCompleted;
/** @type {string} */
SentBy;
/** @type {ConnectorProxy} */
Connector;
/** @type {string} */
Status;
/** @type {string} */
PoReference;
/** @type {LanguageProxy} */
ActualSourceLanguage;
/** @type {LanguageProxy[]} */
TargetLanguages;
/** @type {number} */
TranslationsCount;
/** @type {boolean} */
CanBeCompleted;
/** @type {string} */
ExternalId;
}
export class CreateProject {
/** @param {{Title?:string,StartDate?:string,EndDate?:string,Description?:string,Connector?:string,PoReference?:string,ActualSourceLanguage?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Title;
/** @type {?string} */
StartDate;
/** @type {?string} */
EndDate;
/** @type {string} */
Description;
/** @type {string} */
Connector;
/** @type {string} */
PoReference;
/** @type {string} */
ActualSourceLanguage;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /RestApi/translations/projects HTTP/1.1
Host: www.imglobal.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Title":"String","StartDate":"\/Date(-62135596800000-0000)\/","EndDate":"\/Date(-62135596800000-0000)\/","Description":"String","Connector":"String","PoReference":"String","ActualSourceLanguage":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Title":"String","Description":"String","StartDate":"\/Date(-62135596800000-0000)\/","DueDate":"\/Date(-62135596800000-0000)\/","DateSent":"\/Date(-62135596800000-0000)\/","DateCompleted":"\/Date(-62135596800000-0000)\/","SentBy":"String","Connector":{"Name":"String","Title":"String","Count":0,"Xliff":{"IsXliff":false,"IsFtp":false,"IsMachineTranslation":false}},"Status":"String","PoReference":"String","ActualSourceLanguage":{"Code":"String","Name":"String","Count":0},"TargetLanguages":[{"Code":"String","Name":"String","Count":0}],"TranslationsCount":0,"CanBeCompleted":false,"ExternalId":"String"}