Difference between revisions of "GlobalSight Web Services API"

From Globalsight
Jump to navigation Jump to search
(References)
 
m (Content import)
 
(7 intermediate revisions by the same user not shown)
Line 108: Line 108:
  
 
===Content import===
 
===Content import===
* '''String getFileProfileInformation(String accessToken)'''
+
Note: best practice for creating jobs is to use API's in order
** accessToken – the accessToken received from login()
 
  
This method returns XML containing the available file profiles that can be used to import file-based content into GlobalSight. An example XML response is:
+
'''login''' >> '''getUniqueJobName''' >> '''uploadFileForInitial''' >> uploadAttributeFiles >> addJobComment >> '''createJobOnInitial'''
  
<?xml version="1.0" encoding="UTF‐8" ?>
+
Required steps are in '''bold'''
<fileProfileInformation>
 
          <fileProfile>
 
                  <id>1001</id>
 
                  <name>html en2fres</name>
 
                  <description>HTML en_US to fr_FR and es_ES</description>
 
          </fileProfile>
 
          <fileProfile>
 
                  <id>1002</id>
 
                  <name>word en2fres</name>
 
                  <description>word documents en_US to fr_FR and es_ES</description>
 
          </fileProfile>
 
</fileProfileInformation>
 
  
 
* '''void uploadFile(HashMap args)'''
 
* '''void uploadFile(HashMap args)'''
Line 186: Line 173:
  
 
* '''void createJob(HashMap args)'''
 
* '''void createJob(HashMap args)'''
** jobName – the desired jobname to use for this job. Comment – the comment of this job
+
** jobName – the desired jobname to use for this job.  
** filePaths - this job may include more than one file. The paths of the files are added to a vector. Each filePath in the vector must match the value of filePath used in a successful call to uploadFile() for the same jobName.
+
** Comment – the comment of this job
** fileProfileIds – each file may select a file profile. The ids of the file profiles are added to a vector
+
** filePaths - It is a Vector.Contains the file path in job,can not be empty.  
** targetLocales –the target locales to be created when creating this job. The default is all target
+
** fileProfileIds – It is a Vector.Contains the file profile id ,can not be empty.
 +
** targetLocales –It is a Vector.Contains the target locales which like to be translated,can not be empty.
  
 
Locales bound in the L10N profile are selected. The target locales are added to a vector. This method creates a job with the target locales selected and multiple format files that are selected with different file profiles.
 
Locales bound in the L10N profile are selected. The target locales are added to a vector. This method creates a job with the target locales selected and multiple format files that are selected with different file profiles.
Line 197: Line 185:
 
** jobName –the desired jobname to use for this job
 
** jobName –the desired jobname to use for this job
 
** comment –the comment of this job
 
** comment –the comment of this job
** filePaths - this job may include more than one file. The paths of the files are added to a vector. Each filePath in the vector must match the value of filePath used in a successful call to uploadFile() for the same jobName.
+
** filePaths - String Path of files which are contained in job, split by "|",sample:"Setup.docx" or "Setup.docx|Overview_Partner.docx".Can not be empty.
** fileProfileIds – each file may select a file profile. The IDs of the file profiles are added to a vector
+
** fileProfileIds – String ID of file profiles, split by "|",sample:"23" or "23|23".Can not be empty.
** targetLocales –the target locales to be created when creating this job. The default is all targets
+
** targetLocales – String Target locales which like to be translated, split by "|",sample:"it_IT,de_DE" or "it_IT,de_DE|it_IT,de_DE". If empty, all locales of current L10nProfile will be used default.
  
 
This method is used for creating a job with the selected target locales and multiple format files that are selected with different file profiles.
 
This method is used for creating a job with the selected target locales and multiple format files that are selected with different file profiles.
Line 208: Line 196:
 
*** jobId -- ID of job
 
*** jobId -- ID of job
 
*** comment -- comment for this job
 
*** comment -- comment for this job
*** filePaths - this job may include more than one file. The paths of the files are added to a vector. Each filePath in the vector must match the value of filePath used in a successful call to uploadFile() for the same jobName.
+
*** filePaths - It is a Vector.Contains the file path in job,can not be empty.  
*** fileProfileIds – each file may select a file profile. The IDs of the file profiles are added to a vector
+
*** fileProfileIds – It is a Vector.Contains the file profile id ,can not be empty.
*** targetLocales –the target locales to be created when creating this job. The default is all targets
+
*** targetLocales – It is a Vector.Contains the target locales which like to be translated,can not be empty.
 
*** priority -- priority of job
 
*** priority -- priority of job
 
*** attributes – Attributes used to create the job
 
*** attributes – Attributes used to create the job
Line 220: Line 208:
 
** jobName –the desired jobname to use for this job
 
** jobName –the desired jobname to use for this job
 
** comment –the comment for this job
 
** comment –the comment for this job
** filePaths - this job may include more than one file. The paths of the files are added to a vector. Each filePath in the vector must match the value of filePath used in a successful call to uploadFile() for the same jobName.
+
** filePaths - String Path of files which are contained in job, split by "|",sample:"Setup.docx" or "Setup.docx|Overview_Partner.docx".Can not be empty.
** fileProfileIds – each file may select a file profile. The IDs of the file profiles are added to a vector
+
** fileProfileIds – String ID of file profiles, split by "|",sample:"23" or "23|23".Can not be empty.
** targetLocales –the target locales to be created when creating this job. The default is all targets
+
** targetLocales –String Target locales which like to be translated, split by "|",sample:"it_IT,de_DE" or "it_IT,de_DE|it_IT,de_DE". If empty, all locales of current L10nProfile will be used default.
 
** attributeXml – Attributes used to create the job
 
** attributeXml – Attributes used to create the job
  
Line 229: Line 217:
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
 
** jobName – the desired jobname to use for this job
 
** jobName – the desired jobname to use for this job
** filePaths - this job may include more than one file. The paths of the files are added to a vector
+
** filePaths - It is a Vector.Contains the file path in job.  
** fileProfileIds – each file may select a file profile. The ids of the file profiles are added to a vector
+
** fileProfileIds – It is a Vector.Contains the file profile id.
** targetLocales – the target locales to be created when creating this job. The default is all targets
+
** targetLocales – It is a Vector.Contains the target locales which like to be translated.
 
** taskId  – on the original GS server
 
** taskId  – on the original GS server
 
** job comment, original activity comments
 
** job comment, original activity comments
Line 285: Line 273:
  
 
This method is used to get the status of the uploading of the off-line translation kit. You can invoke this API after uploadEditionFileBack() and importOfflineKitFiles().
 
This method is used to get the status of the uploading of the off-line translation kit. You can invoke this API after uploadEditionFileBack() and importOfflineKitFiles().
 +
 +
* '''String getWorkOfflineFiles(String accessToken, Long taskId, int workOfflineFileType)
 +
** accessToken – the accessToken received from login()
 +
** taskId - the string of the task ID to offline download file from.
 +
** workOfflineFileType
 +
**  1 : Reviewer Comments Report or Translations Edit Report (this follows UI settings)
 +
**  2 : Offline Translation Kit
 +
**  3 : Translation Edit Report
 +
**  4 : Reviewer Comments Report
 +
**  5 : Reviewer Comments Report (Simplified)
 +
**  6 : Post Review QA Report
 +
 +
This method is used to get offline translation kit or report (Translation Edit Report or Reviewer Comments Report) for offline editing. If fail, it will return an xml string to tell error message; If succeed, for report downloading, it returns an URL like:
 +
http://w10.globalsight.com:8080/globalsight/DownloadReports/yorkadmin/TranslationsEditReport/20140219/ReviewersCommentsReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx
 +
 +
And for offline translation kit downloading, it returns an URL like:
 +
http://w10.globalsight.com:8080/globalsight/DownloadOfflineKit/[CompanyName]/GlobalSight/CustomerDownload/jobName_zh_CN.zip
 +
 +
"getWorkOfflineFiles()", "uploadWorkOfflineFiles()" and "importWorkOfflineFiles()" APIs are recommended to use together.
 +
 +
* '''String uploadWorkOfflineFiles(String accessToken, Long taskId, int workOfflineFileType, String fileName, byte[] bytesString)'''
 +
** accessToken – the accessToken received from login()
 +
** taskId – task ID to upload file to
 +
** workOfflineFileType - 1 : For reports like "Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report"; 2 : Offline Translation Kit
 +
** fileName - the upload file name
 +
** bytes - file contents in bytes
 +
 +
This method is used to upload offline translation kit or report ("Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report") file to server. If succeed, return an "identifyKey" which is used to identify this uploading, a sample is "532689969". If fail, no key, return a standard error xml:
 +
 +
<?xml version="1.0" encoding="UTF‐8" ?>
 +
<errorXml>
 +
        <method>uploadWorkOfflineFiles</method>
 +
        <error>error message</error>
 +
</errorXml>
 +
 +
* '''String importWorkOfflineFiles(String accessToken, Long taskId, String identifyKey, int workOfflineFileType)'''
 +
** accessToken – the accessToken received from login()
 +
** taskId – task ID to upload file to
 +
** identifyKey - this is used to locate the file which has been uploaded to server via "uploadWorkOfflineFiles()" API.
 +
** workOfflineFileType - 1 : For reports like "Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report"; 2 : Offline Translation Kit
 +
 +
This method is used to import offline translation kit or report ("Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report") file to update system. Return empty if succeed; if fail, return corresponding message.
 +
 +
<?xml version="1.0" encoding="UTF‐8" ?>
 +
<errorXml>
 +
        <method>importWorkOfflineFiles</method>
 +
        <error>error message</error>
 +
</errorXml>
  
 
===Project management===
 
===Project management===
Line 471: Line 507:
 
                 <completedDate>12/11/08 5:00:00 PM CST</completedDate>
 
                 <completedDate>12/11/08 5:00:00 PM CST</completedDate>
 
                 <availableDate>12/11/08 5:00:00 PM CST</availableDate>
 
                 <availableDate>12/11/08 5:00:00 PM CST</availableDate>
 +
                <isSkipped>true/false</isSkipped>
 +
                <outgoing>
 +
                        <arrowName>Action3</arrowName>
 +
                        <pointTo>review_linguistc1_1007</pointTo>
 +
                </outgoing>
 +
                <outgoing>
 +
                        <arrowName>Action5</arrowName>
 +
                        <pointTo>GSPM1_1007</pointTo>
 +
                </outgoing>
 
         </task>
 
         </task>
 
  </tasksInJob>
 
  </tasksInJob>
Line 500: Line 545:
 
                               <title>lp</title>
 
                               <title>lp</title>
 
                               <email>leoanyone@</email>
 
                               <email>leoanyone@</email>
                      </accepter>
+
                      </accepter>
                      <estimatedAcceptanceDate>12/8/08 5:00:00 PM CST</estimatedAcceptanceDate>
+
                      <estimatedAcceptanceDate>12/8/08 5:00:00 PM CST</estimatedAcceptanceDate>
 
                       <acceptedDate>12/5/08 11:08:20 AM CST</acceptedDate>
 
                       <acceptedDate>12/5/08 11:08:20 AM CST</acceptedDate>
 
                       <estimatedCompletionDate>12/12/08 5:00:00 PM CST</estimatedCompletionDate>
 
                       <estimatedCompletionDate>12/12/08 5:00:00 PM CST</estimatedCompletionDate>
 
                       <completedDate>12/11/08 5:00:00 PM CST</completedDate>
 
                       <completedDate>12/11/08 5:00:00 PM CST</completedDate>
                    <availableDate>12/11/08 5:00:00 PM CST</availableDate>
+
                      <availableDate>12/11/08 5:00:00 PM CST</availableDate>
 +
                      <isSkipped>true/false</isSkipped>
 +
                      <outgoing>
 +
                              <arrowName>Action3</arrowName>
 +
                              <pointTo>review_linguistc1_1007</pointTo>
 +
                      </outgoing>
 +
                      <outgoing>
 +
                              <arrowName>Action5</arrowName>
 +
                              <pointTo>GSPM1_1007</pointTo>
 +
                      </outgoing>
 
                 </task>
 
                 </task>
 
         </job>
 
         </job>
Line 517: Line 571:
 
This method is used to update the status of the specified task to the specified state.
 
This method is used to update the status of the specified task to the specified state.
  
* '''acceptTask(String p_accessToken, String p_taskId, String p_taskAcceptor)'''
+
* '''acceptTask(String p_accessToken, String p_taskId)'''
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
 
** p_taskId – the task ID to be accepted
 
** p_taskId – the task ID to be accepted
Line 530: Line 584:
 
This method is used to complete a task. If it succeeds, it returns as “success”.
 
This method is used to complete a task. If it succeeds, it returns as “success”.
  
* '''String rejectTask(String p_accessToken, String p_taskId, String p_rejectorUserId, String p_rejectComment)'''
+
* '''String rejectTask(String p_accessToken, String p_taskId, String p_rejectComment)'''
 
** accessToken –The access token received from the login
 
** accessToken –The access token received from the login
 
** p_taskId – the task ID to be rejected
 
** p_taskId – the task ID to be rejected
Line 536: Line 590:
  
 
This method is used to reject a specified task. If it is successful, it returns as "success".
 
This method is used to reject a specified task. If it is successful, it returns as "success".
 +
 +
* '''String getInContextReviewLink(String  p_accessToken, String p_taskId)'''
 +
** accessToken –The access token received from the login
 +
** p_taskId – task ID
 +
 +
This method returns a link for in context review for specified task ID. User can open in context review window directly via this link without logging in(the logging in happens background when open this link). A sample is:
 +
http://10.10.215.20:8080/globalsight/ControlServlet?linkName=self&pageName=inctxrvED1&secret=E127B35E1A1C1B52C742353BBA176327D7F54956B373428134DE7252182EAA0D.
  
 
===User management===
 
===User management===
Line 586: Line 647:
 
  1 – Invalid access token
 
  1 – Invalid access token
 
  2 – Invalid user id
 
  2 – Invalid user id
  3 – Invalid user password
+
  3 – Cannot create super user
  4 – Invalid first name
+
4 - User exists
  5 – Invalid last name
+
5 - User does NOT exist
  6 – Invalid email address
+
6 - User is NOT in the same company with logged user
  7 – Invalid permission groups
+
7 - Invalid user password
  8 – Invalid company name
+
  8 – Invalid first name
9 – Invalid project information  
+
  9 – Invalid last name
  10 – Invalid role information  
+
  10 – Invalid email address
 +
  11 – Invalid permission groups
 +
  12 – Invalid project information
 +
  13 – Invalid role information  
 +
14 - Current login user does not have enough permission
 
  -1 – Unknown exception
 
  -1 – Unknown exception
  
Line 611: Line 676:
 
** p_projectIds – String[] Projects that the user is included in. If p_isInAllProject is true, this does  not take effect
 
** p_projectIds – String[] Projects that the user is included in. If p_isInAllProject is true, this does  not take effect
  
Return code:
+
Return code:
 
  0 – Success
 
  0 – Success
 
  1 – Invalid access token
 
  1 – Invalid access token
  2 – Invalid user id or user is not exist.
+
  2 – Invalid user id
  3 – Invalid user password
+
3 – Cannot create super user
  4 – Invalid first name
+
4 - User exists
  5 – Invalid last name
+
5 - User does NOT exist
  6 – Invalid email address
+
6 - User is NOT in the same company with logged user
  7 – Invalid permission groups
+
  7 - Invalid user password
  8 – Invalid company name
+
  8 – Invalid first name
9 – Invalid project information  
+
  9 – Invalid last name
  10 – Invalid role information  
+
  10 – Invalid email address
  11 – User does not exist
+
  11 – Invalid permission groups
 +
  12 – Invalid project information
 +
  13 – Invalid role information  
 +
  14 - Current login user does not have enough permission
 
  -1 – Unknown exception
 
  -1 – Unknown exception
  
Line 788: Line 856:
 
  </job>
 
  </job>
  
The status field can contain the values UPLOADING, IN_QUEUE, DISPATCHED, EXPORTED, LOCALIZED, or CANCELLED. If the job does not exist, it returns as IN_QUEUE.
+
The status field can contain the values UPLOADING, IN_QUEUE, DISPATCHED, EXPORTED, LOCALIZED, or CANCELLED. If the job does not exist, it returns as UNKNOWN.
 +
 
 +
* '''String getImportExportStatus(String accessToken)'''
 +
** accessToken – the accessToken received from login()
 +
 
 +
Returns number of jobs importing and number of workflows exporting. An example response XML is:
 +
 
 +
<?xml version="1.0" encoding="UTF-8" ?>
 +
<ImportExportStatus>
 +
    <jobsCreating>1</jobsCreating>
 +
    <localesExporting>2</localesExporting>
 +
</ImportExportStatus>
  
 
* '''String getJobAndWorkflowInfo(String accessToken, long jobId)'''
 
* '''String getJobAndWorkflowInfo(String accessToken, long jobId)'''
Line 805: Line 884:
 
         <sourceLocale>English (United States) [en_US]</sourceLocale>
 
         <sourceLocale>English (United States) [en_US]</sourceLocale>
 
         <state>EXPORTED</state>
 
         <state>EXPORTED</state>
 +
        <creator>qaadmin</creator>
 
         <pageCount>1</pageCount>
 
         <pageCount>1</pageCount>
 
         <sourcePages>
 
         <sourcePages>
Line 825: Line 905:
 
                       <completeDate>12/12/08 5:01:13 PM CST</completeDate>
 
                       <completeDate>12/12/08 5:01:13 PM CST</completeDate>
 
                       <isInContextMatch>true</isInContextMatch>
 
                       <isInContextMatch>true</isInContextMatch>
                      <subLevRepetition>0</subLevRepetition>
 
                      <subLevMatch>100</subLevMatch>
 
 
                       <percentageComplete>80</percentageComplete>
 
                       <percentageComplete>80</percentageComplete>
 
                       <targetWordCount total=11>
 
                       <targetWordCount total=11>
Line 848: Line 926:
 
** startTime – Start time, it can be '2d', '8h' and '2d8h' format. 'd' means day, and 'h' means hours.
 
** startTime – Start time, it can be '2d', '8h' and '2d8h' format. 'd' means day, and 'h' means hours.
  
This queries jobs whose creation date is after the specified start time. An example response XML using the getJobsByTimeRange() method is:
+
This queries jobs whose creation date is after the specified start time.
  
 
* '''String getJobsByTimeRange (String accessToken, String startTime, long projectId)'''
 
* '''String getJobsByTimeRange (String accessToken, String startTime, long projectId)'''
Line 862: Line 940:
 
                   <name>2747_0218</name>
 
                   <name>2747_0218</name>
 
                   <state>DISPATCHED</state>
 
                   <state>DISPATCHED</state>
 +
                  <creator>DISPATCHED</creator>
 
                   <create_date>10-7-7 上午10时12分48秒 CST</create_date>
 
                   <create_date>10-7-7 上午10时12分48秒 CST</create_date>
 
                   <company_id>1000</company_id>
 
                   <company_id>1000</company_id>
Line 958: Line 1,037:
 
         <status>canceled</status>
 
         <status>canceled</status>
 
  </cancelStatus>
 
  </cancelStatus>
 +
 +
* '''String archiveJob (String accessToken, String jobIds)'''
 +
** accessToken – the accessToken received from login()
 +
** jobIds– job IDs comma separated like "id1,id2,id3".
 +
 +
This archive the jobs specified by job IDs. If successful, return null, otherwise return an xml string with error jobs message in it.
  
 
* '''String addComment (String accessToken, long objectId, int objectType, String userId, String comment, byte[]file, String filename, String access)'''
 
* '''String addComment (String accessToken, long objectId, int objectType, String userId, String comment, byte[]file, String filename, String access)'''
Line 1,120: Line 1,205:
 
This method is used to skip ahead in the workflow to a specified activity.  
 
This method is used to skip ahead in the workflow to a specified activity.  
  
* '''String jobsReassign(String accessToken, String workflowId, String targetLocale, String[] users)'''
+
* '''String taskReassign (String accessToken, String taskId, String[] users)'''
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
** workflowId – workflow ID to be skipped
+
** taskId– task Id to be reassigned
** targetLocale – target locale of the workflow to be reassigned
+
** users – users to be reassigned to. The element in the array is userid, a sample is "["qaadmin", "qauser"]". Return null if successful, otherwise it will throw exception or return error message.
** users – details of the users to be reassigned to. The format of this string array is "{user id,user name}"
 
  
This method is used to re-assign a workflow with a specified target locale to other users.
+
This method is used to re-assign a task to specified user(s).
  
 
* '''String jobsWorkflowCanBeAdded(String p_accessToken, long p_jobId)'''
 
* '''String jobsWorkflowCanBeAdded(String p_accessToken, long p_jobId)'''
Line 1,190: Line 1,274:
 
                 <displayState>Archived</displayState>
 
                 <displayState>Archived</displayState>
 
                 <priority>3</priority>
 
                 <priority>3</priority>
 +
                <creator>qaadmin</creator>
 
                 <createDate>10-7-15 下午04时47分06秒 CST</createDate>
 
                 <createDate>10-7-15 下午04时47分06秒 CST</createDate>
 
                 <startDate>10-7-15 下午04时47分06秒 CST</startDate>
 
                 <startDate>10-7-15 下午04时47分06秒 CST</startDate>
Line 1,201: Line 1,286:
 
                         <projectName>Project01</projectName>
 
                         <projectName>Project01</projectName>
 
                 </project>
 
                 </project>
 +
                <group>
 +
                <groupId>1001</groupId>
 +
                <groupName>job group2</groupName>
 +
                </group>
 
                 <wordcount>106</wordcount>
 
                 <wordcount>106</wordcount>
 +
                <numOfLanguages>1</numOfLanguages>
 +
                <pptxSlideNum>21</pptxSlideNum>
 +
                <docxPageNum>10</docxPageNum>
 
                 <sourceLang>en_US</sourceLang>
 
                 <sourceLang>en_US</sourceLang>
 
                 <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
 
                 <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
Line 1,213: Line 1,305:
 
                         <workflow>
 
                         <workflow>
 
                               <wfId>12</wfId>
 
                               <wfId>12</wfId>
 +
                              <workflowName>workflow_en_US-de_DE</workflowName>
 
                               <targetLang>de_DE</targetLang>
 
                               <targetLang>de_DE</targetLang>
 
                         </workflow>
 
                         </workflow>
Line 1,235: Line 1,328:
 
                 <displayState>Archived</displayState>
 
                 <displayState>Archived</displayState>
 
                 <priority>3</priority>
 
                 <priority>3</priority>
 +
                <creator>qaadmin</creator>
 
                 <createDate>10-7-15 下午04时47分06秒 CST</createDate>
 
                 <createDate>10-7-15 下午04时47分06秒 CST</createDate>
 
                 <startDate>10-7-15 下午04时47分06秒 CST</startDate>
 
                 <startDate>10-7-15 下午04时47分06秒 CST</startDate>
Line 1,246: Line 1,340:
 
                         <projectName>Project01</projectName>
 
                         <projectName>Project01</projectName>
 
                 </project>
 
                 </project>
 +
                <group>
 +
                <groupId>1001</groupId>
 +
                <groupName>job group2</groupName>
 +
                </group>
 
                 <wordcount>106</wordcount>
 
                 <wordcount>106</wordcount>
 +
                <numOfLanguages>1</numOfLanguages>
 +
                <pptxSlideNum>21</pptxSlideNum>
 +
                <docxPageNum>10</docxPageNum>
 
                 <sourceLang>en_US</sourceLang>
 
                 <sourceLang>en_US</sourceLang>
 
                 <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
 
                 <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
Line 1,258: Line 1,359:
 
                         <workflow>
 
                         <workflow>
 
                               <wfId>12</wfId>
 
                               <wfId>12</wfId>
 +
                              <workflowName>workflow_en_US-de_DE</workflowName>
 
                               <targetLang>de_DE</targetLang>
 
                               <targetLang>de_DE</targetLang>
 
                         </workflow>
 
                         </workflow>
Line 1,281: Line 1,383:
 
                 <displayState>Archived</displayState>
 
                 <displayState>Archived</displayState>
 
                 <priority>3</priority>
 
                 <priority>3</priority>
 +
                <creator>qaadmin</creator>
 
                 <createDate>10-7-15 下午04时47分06秒 CST</createDate>
 
                 <createDate>10-7-15 下午04时47分06秒 CST</createDate>
 
                 <startDate>10-7-15 下午04时47分06秒 CST</startDate>
 
                 <startDate>10-7-15 下午04时47分06秒 CST</startDate>
Line 1,292: Line 1,395:
 
                         <projectName>Project01</projectName>
 
                         <projectName>Project01</projectName>
 
                 </project>
 
                 </project>
 +
                <group>
 +
                <groupId>1001</groupId>
 +
                <groupName>job group2</groupName>
 +
                </group>
 
                 <wordcount>106</wordcount>
 
                 <wordcount>106</wordcount>
 +
                <numOfLanguages>1</numOfLanguages>
 +
                <pptxSlideNum>21</pptxSlideNum>
 +
                <docxPageNum>10</docxPageNum>
 
                 <sourceLang>en_US</sourceLang>
 
                 <sourceLang>en_US</sourceLang>
 
                 <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
 
                 <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
Line 1,304: Line 1,414:
 
                         <workflow>
 
                         <workflow>
 
                               <wfId>12</wfId>
 
                               <wfId>12</wfId>
 +
                              <workflowName>workflow_en_US-de_DE</workflowName>
 
                               <targetLang>de_DE</targetLang>
 
                               <targetLang>de_DE</targetLang>
 
                         </workflow>
 
                         </workflow>
Line 1,310: Line 1,421:
 
  </Jobs>
 
  </Jobs>
  
* '''String getCountsByJobState(String accessToken)'''
+
* '''String fetchJobsByCreator(String accessToken, String creatorUserName, int offset, int count, boolean isDescOrder)'''
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
 +
** creatorUserName– job creator's user name
 +
** offset – the first offset for records in the query result
 +
** count – number of records to be fetched at once
 +
** isDescOrder – if all records in the query are in descending order, then sort the result first and get the range of records specified
  
This method fetches job counts grouped by state for the current company. An example XML response is:  
+
This method fetches job information for the current company with the job creator, offset and count specified. The query result can be sorted in descending order. An example XML response is:  
  
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <?xml version="1.0" encoding="UTF-8" ?>
  <counts>
+
  <Jobs>
         <countByState>
+
         <Job>
                 <state>DISPATCHED</state>
+
                <id>12</id>
                 <count>3</count>
+
                <name>20100709-1646_ws_test_attribute</name>
        </countByState>
+
                 <state>CANCELLED</state>
        <countByState>
+
                 <displayState>Archived</displayState>
                 <state>LOCALIZED</state>
+
                <priority>3</priority>
                 <count>4</count>
+
                <creator>qaadmin</creator>
         </countByState>
+
                <createDate>10-7-15 下午04时47分06秒 CST</createDate>
  </counts>
+
                <startDate>10-7-15 下午04时47分06秒 CST</startDate>
 
+
                <completedDate></completedDate>
* '''String fetchWorkflowRelevantInfo(String accessToken, String workflowId)'''
+
                <localizationProfile>
 +
                        <localizationProfileId>1002</localizationProfileId>
 +
                        <localizationProfileName>LP_01</localizationProfileName>
 +
                </localizationProfile>
 +
                <project>
 +
                        <projectId>1001</projectId>
 +
                        <projectName>Project01</projectName>
 +
                </project>
 +
                <group>
 +
                <groupId>1001</groupId>
 +
                <groupName>job group2</groupName>
 +
                </group>
 +
                <wordcount>106</wordcount>
 +
                <numOfLanguages>1</numOfLanguages>
 +
                <pptxSlideNum>21</pptxSlideNum>
 +
                <docxPageNum>10</docxPageNum>
 +
                <sourceLang>en_US</sourceLang>
 +
                <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
 +
                 <sourcePages>
 +
                        <sourcePage>
 +
                              <sourcePageId>12</sourcePageId>
 +
                              <externalPageId>en_US\20100709-1646_ws_test_attribute\Demo Company\TestFiles\demo_company.html</externalPageId>
 +
                        </sourcePage>
 +
                </sourcePages>
 +
                 <workflows>
 +
                        <workflow>
 +
                              <wfId>12</wfId>
 +
                              <workflowName>workflow_en_US-de_DE</workflowName>
 +
                              <targetLang>de_DE</targetLang>
 +
                        </workflow>
 +
                </workflows>
 +
         </Job>
 +
  </Jobs>
 +
 
 +
* '''String getCountsByJobState(String accessToken)'''
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
** workflowId –  the ID of a workflow
 
  
This method is used to fetch workflow information for the specified workflowId. It returns information on the current workflow, the Wordcount Summary, job comments, and task/activity comments. An example XML response is:
+
This method fetches job counts grouped by state for the current company. An example XML response is:
 +
 
 +
<?xml version="1.0" encoding="UTF-8" ?>
 +
<counts>
 +
        <countByState>
 +
                <state>DISPATCHED</state>
 +
                <count>3</count>
 +
        </countByState>
 +
        <countByState>
 +
                <state>LOCALIZED</state>
 +
                <count>4</count>
 +
        </countByState>
 +
</counts>
 +
 
 +
* '''String fetchWorkflowRelevantInfo(String accessToken, String workflowId)'''
 +
** accessToken – the accessToken received from login()
 +
** workflowId –  the ID of a workflow
 +
 
 +
This method is used to fetch workflow information for the specified workflowId. It returns information on the current workflow, the Wordcount Summary, job comments, and task/activity comments. An example XML response is:
  
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <?xml version="1.0" encoding="UTF-8" ?>
Line 1,445: Line 1,611:
 
       </task>
 
       </task>
 
  </workflow>
 
  </workflow>
 +
 +
* '''String createJobGroup(String accessToken, String groupName, String projectName, String sourceLocale)'''
 +
** accessToken – the accessToken received from login()
 +
** groupName – group name for the new group
 +
** projectName - project name this group should belong to.
 +
** sourceLocale - source locale this group is based on.
 +
 +
This is used to create a job group object with speficied project and source locale. An example response XML is:
 +
 +
<JobGroup>
 +
    <id>1</id>
 +
    <name>job group name</name>
 +
</JobGroup>
 +
 +
* '''String addJobToGroup(String accessToken, String groupId, String jobId)'''
 +
** accessToken – the accessToken received from login()
 +
** groupId – group ID to add job to
 +
** jobId - job ID to be added to group like "126" or "126,127,128"
 +
 +
This is used to add job into group.
  
 
===Content export===
 
===Content export===
Line 1,516: Line 1,702:
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <localizedDocuments>
 
  <localizedDocuments>
 +
          <jobId>180</jobId>
 +
          <jobName>22_390630824</jobName>
 
           <urlPrefix>http://localhost:8080/globalsight/cxedocs/leo</urlPrefix>
 
           <urlPrefix>http://localhost:8080/globalsight/cxedocs/leo</urlPrefix>
 
           <targetLocale>zh_CN</targetLocale>
 
           <targetLocale>zh_CN</targetLocale>
Line 1,547: Line 1,735:
 
                 <CommentContent>008</CommentContent>
 
                 <CommentContent>008</CommentContent>
 
                 <CommentFiles>
 
                 <CommentFiles>
          <CommentFileUrl>http://10.10.211.117:80/globalsight/GlobalSight/CommentReference2/1010\General\1001.txt?companyName=york</CommentFileUrl>
+
                    <CommentFileUrl>http://10.10.211.117:80/globalsight/GlobalSight/CommentReference2/1010/General/1001.txt?companyName=york</CommentFileUrl>
          </CommentFiles>
+
                </CommentFiles>
 
           </Comment>
 
           </Comment>
 
       </Comments>
 
       </Comments>
Line 1,575: Line 1,763:
 
  </offlineFiles>
 
  </offlineFiles>
  
===Documentum support===
+
* '''String downloadXliffOfflineFile(String accessToken, String taskId, String lockedSegEditType, boolean isIncludeXmlNodeContextInformation)'''  
* '''String passDCTMAccount(String accessToken, String docBase, String dctmUserName, String dctmPassword)'''  
 
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
 +
** taskId – the ID of task
 +
** isIncludeXmlNodeContextInformation – if true, segment skeleton will be output as "extradata" of "trans-unit" element for offline reference.
 +
** lockedSegEditType - setting for "Allow Edit Locked Segments" option when offline download.
 +
  Available values: 1, 2, 3, 4.
 +
  1: Allow Edit of ICE and 100% matches
 +
  2: Allow Edit of ICE matches
 +
  3: Allow Edit of 100% matches
 +
  4: Deny Edit
  
This method is for Documentum only. The passDCTMAccount() method must be called via HTTPS to start using the web service. The login() method logs into GlobalSight first, then passes on the Documentum username/password and docbase for GlobalSight to check out and check in files to and from the Documentum server.  
+
This method is used to download work offline kit as Xliff file format with speicial task from GlobalSight server. It uses below settings as default:
 +
* File format: Xliff 1.2
 +
* Editor: Xliff Editor
 +
* Character Encoding: Default Encoding
 +
* Placeholder format: Compact
 +
* Insert resources as: Annotations
 +
* Populate 100% Target Segments: True
 +
 
 +
The package file that contains all files of the work offline kit is stored in the $Docs$/$Company$/workOfflineDownload folder on the GlobalSight server.
 +
 
 +
The URL for getting the package file as XML is returning after calling it successfully. For example:
 +
 
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<offlineFiles>
 +
    http://10.10.215.101:8080/globalsight/cxedocs/QA/workOfflineDownload/testJob_589424576_en_US_de_DE.zip
 +
</offlineFiles>
 +
 
 +
===Documentum support===
 +
* '''String passDCTMAccount(String accessToken, String docBase, String dctmUserName, String dctmPassword)'''
 +
** accessToken – the accessToken received from login()
 +
 
 +
This method is for Documentum only. The passDCTMAccount() method must be called via HTTPS to start using the web service. The login() method logs into GlobalSight first, then passes on the Documentum username/password and docbase for GlobalSight to check out and check in files to and from the Documentum server.  
  
 
The Documentum user account returned should be passed on to the subsequent web service calls, which needs user information such as the createDocumnetumJob() or cancelDocumentumJob() method.
 
The Documentum user account returned should be passed on to the subsequent web service calls, which needs user information such as the createDocumnetumJob() or cancelDocumentumJob() method.
Line 1,602: Line 1,818:
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
  
This method is for Documentum only. It returns XML containing the file profiles available for importing file-based content into GlobalSight, and this XML is used for the WebTop plug‐in. An example XML response is:
+
This method returns XML containing the file profiles available for importing file-based content into GlobalSight. An example XML response is:
  
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <?xml version="1.0" encoding="UTF-8" ?>
Line 1,609: Line 1,825:
 
                 <id>1101</id>
 
                 <id>1101</id>
 
                 <name>DCMT_XML_FP_1151289606535</name>
 
                 <name>DCMT_XML_FP_1151289606535</name>
 +
                <l10nprofile>73</l10nprofile>
 +
                <sourceFileFormat>7</sourceFileFormat>
 
                 <description>N/A</description>
 
                 <description>N/A</description>
 
                 <fileExtensionInfo>
 
                 <fileExtensionInfo>
Line 1,621: Line 1,839:
 
                 <id>1304</id>
 
                 <id>1304</id>
 
                 <name>DCMT_XML_FP_1152844879860</name>
 
                 <name>DCMT_XML_FP_1152844879860</name>
 +
                <l10nprofile>73</l10nprofile>
 +
                <sourceFileFormat>7</sourceFileFormat>
 
                 <description>N/A</description>
 
                 <description>N/A</description>
 
                 <fileExtensionInfo>
 
                 <fileExtensionInfo>
Line 1,680: Line 1,900:
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <entry>
 
  <entry>
     <sid>sid string</sid>  
+
     <sid>sid string</sid>
<source>
+
    <source>
    <locale>en_US</locale>
+
        <locale>en_US</locale>
    <segment>source</segment>
+
        <segment>source</segment>
</source>
+
    </source>
<target>
+
    <target>
    <locale>fr_FR</locale>
+
        <locale>fr_FR</locale>
    <segment>target</segment>
+
        <segment>target</segment>
</target>
+
    </target>
 
  </entry>
 
  </entry>
  
Line 1,711: Line 1,931:
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <entry>
 
  <entry>
     <sid>sid string</sid>  
+
     <sid>sid string</sid>
<source>
+
    <source>
    <locale>en_US</locale>
+
        <locale>en_US</locale>
    <segment>source</segment>
+
        <segment>source</segment>
</source>
+
    </source>
<target>
+
    <target>
    <locale>fr_FR</locale>
+
        <locale>fr_FR</locale>
    <segment>target</segment>
+
        <segment>target</segment>
</target>
+
    </target>
 
  </entry>
 
  </entry>
  
Line 1,742: Line 1,962:
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <entry>
 
  <entry>
     <sid>sid string</sid>  
+
     <sid>sid string</sid>
<source>
+
    <source>
    <locale>en_US</locale>
+
        <locale>en_US</locale>
    <segment>source</segment>
+
        <segment>source</segment>
</source>
+
    </source>
<target>
+
    <target>
    <locale>fr_FR</locale>
+
        <locale>fr_FR</locale>
    <segment>target</segment>
+
        <segment>target</segment>
</target>
+
    </target>
 
  </entry>
 
  </entry>
  
Line 1,768: Line 1,988:
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <entries>
 
  <entries>
   <entry>    
+
   <entry>
           <percentage>100%</percentage>  
+
           <percentage>100%</percentage>
 
           <sid>sid string</sid>
 
           <sid>sid string</sid>
 
           <source>
 
           <source>
          <locale>en_US</sourceLocale>
+
                <locale>en_US</locale>
 
                 <segment>source_100%</segment>
 
                 <segment>source_100%</segment>
 
           </source>
 
           </source>
 
           <target>
 
           <target>
          <locale>fr_FR</sourceLocale>
+
                <locale>fr_FR</locale>
 
                 <segment>target_fr_FR</segment>
 
                 <segment>target_fr_FR</segment>
 
           </target>
 
           </target>
 
           <target>
 
           <target>
          <locale>de_DE</sourceLocale>
+
                <locale>de_DE</locale>
 
                 <segment>target_de_DE</segment>
 
                 <segment>target_de_DE</segment>
 
           </target>
 
           </target>
   </entry>
+
   </entry>
   <entry>    
+
   <entry>
           <percentage>90%</percentage>  
+
           <percentage>90%</percentage>
 
           <source>
 
           <source>
          <locale>en_US</sourceLocale>
+
                <locale>en_US</locale>
 
                 <segment>source_90%</segment>
 
                 <segment>source_90%</segment>
           </source>  
+
           </source>
 
           <target>
 
           <target>
          <locale>fr_FR</sourceLocale>
+
                <locale>fr_FR</locale>
 
                 <segment>target_fr_FR</segment>
 
                 <segment>target_fr_FR</segment>
 
           </target>
 
           </target>
 
           <target>
 
           <target>
          <locale>de_DE</sourceLocale>
+
                <locale>de_DE</locale>
 
                 <segment>target_de_DE</segment>
 
                 <segment>target_de_DE</segment>
 
           </target>
 
           </target>
Line 1,816: Line 2,036:
 
  <entries>
 
  <entries>
 
   <entry>      
 
   <entry>      
           <percentage>100%</percentage>  
+
           <percentage>100%</percentage>
 
           <sid>sid string</sid>
 
           <sid>sid string</sid>
          <source>
+
          <source>
            <locale>en_US</sourceLocale>
+
              <locale>en_US</locale>
                  <segment>source_100%</segment>
+
              <segment>source_100%</segment>
          </source>
+
          </source>
          <target>
+
          <target>
            <locale>fr_FR</sourceLocale>
+
              <locale>fr_FR</locale>
                  <segment>target_fr_FR</segment>
+
              <segment>target_fr_FR</segment>
          </target>
+
          </target>
          <target>
+
          <target>
            <locale>de_DE</sourceLocale>
+
              <locale>de_DE</locale>
                  <segment>target_de_DE</segment>
+
              <segment>target_de_DE</segment>
          </target>
+
          </target>
   </entry>
+
   </entry>
   <entry>    
+
   <entry>
           <percentage>90%</percentage>  
+
           <percentage>90%</percentage>
          <source>
+
          <source>
            <locale>en_US</sourceLocale>
+
              <locale>en_US</locale>
                  <segment>source_90%</segment>
+
              <segment>source_90%</segment>
          </source>  
+
          </source>
          <target>
+
          <target>
            <locale>fr_FR</sourceLocale>
+
              <locale>fr_FR</locale>
                  <segment>target_fr_FR</segment>
+
              <segment>target_fr_FR</segment>
          </target>
+
          </target>
          <target>
+
          <target>
            <locale>de_DE</sourceLocale>
+
              <locale>de_DE</locale>
                  <segment>target_de_DE</segment>
+
              <segment>target_de_DE</segment>
          </target>
+
          </target>
 
   </entry>
 
   </entry>
 
  </entries>
 
  </entries>
Line 1,863: Line 2,083:
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <entries>
 
  <entries>
   <entry>    
+
   <entry>
         <percentage>100%</percentage>  
+
         <percentage>100%</percentage>
 
         <sid>sid string</sid>
 
         <sid>sid string</sid>
          <source>
+
        <source>
          <locale>en_US</sourceLocale>
+
            <locale>en_US</locale>
                <segment>source_100%</segment>
+
            <segment>source_100%</segment>
          </source>
+
        </source>
          <target>
+
        <target>
          <locale>fr_FR</sourceLocale>
+
            <locale>fr_FR</locale>
 
                 <segment>target_fr_FR</segment>
 
                 <segment>target_fr_FR</segment>
          </target>
+
        </target>
          <target>
+
        <target>
          <locale>de_DE</sourceLocale>
+
            <locale>de_DE</locale>
                <segment>target_de_DE</segment>
+
            <segment>target_de_DE</segment>
          </target>
+
        </target>
   </entry>
+
   </entry>
   <entry>    
+
   <entry>
          <percentage>90%</percentage>  
+
        <percentage>90%</percentage>
          <source>
+
        <source>
            <locale>en_US</sourceLocale>
+
            <locale>en_US</locale>
                  <segment>source_90%</segment>
+
            <segment>source_90%</segment>
          </source>  
+
        </source>
          <target>
+
        <target>
             <locale>fr_FR</sourceLocale>
+
             <locale>fr_FR</locale>
 
                   <segment>target_fr_FR</segment>
 
                   <segment>target_fr_FR</segment>
          </target>
+
        </target>
          <target>
+
        <target>
            <locale>de_DE</sourceLocale>
+
            <locale>de_DE</locale>
                  <segment>target_de_DE</segment>
+
            <segment>target_de_DE</segment>
          </target>
+
        </target>
 
   </entry>
 
   </entry>
 
  </entries>
 
  </entries>
  
 
Sid node is not be added if sid is null.  
 
Sid node is not be added if sid is null.  
 +
 +
Required Permissions: Setup >> Translation Memory (View) >> Create entries in TM
 +
 +
* '''String tmFullTextSearch(String accessToken, String string, String tmNames, String sourceLocale,String targetLocale, String dateType, String startDate, String finishDate,String companyName)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
** string– Search text,can not be empty
 +
** tmNames– TM name,can not be empty
 +
** sourceLocale – Source locale,like 'en_US',can not be empty
 +
** targetLocale – Target locale,like 'de_DE',can not be empty
 +
** dateType – The type of search by time,like 'create' or 'modify',can be empty
 +
** startDate – Start time in "yyyyMMdd" format,on this day of all time periods will be included,can be empty
 +
** finishDate – Finish time in "yyyyMMdd" format,on this day of all time periods will be included,can be empty
 +
** companyName – Company name.If super user,compay name is subsidiaries name.If not super user,company name is the login user of the company
 +
 +
This method returns XML containing the entries that are searched by different matches.  The Locale Pair you are searching for must be defined in GlobalSight. An example XML response is:
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<segments>
 +
  <sourceLocale>English (United States) [en_US]</sourceLocale>
 +
  <targetLocale>German (Germany) [de_DE]</targetLocale>
 +
  <segment>
 +
        <sourceSegment>We need to setup <bpt i="1" x="1"/>%s<ept i="1"/> with WordPress.com</sourceSegment>
 +
        <targetSegment>Wir müssen <bpt i="1" x="1"/>%s<ept i="1"/> mit WordPress.com einrichten.</targetSegment>
 +
        <sid>N/A</sid>
 +
        <tmName>tm</tmName>
 +
  </segment>
 +
  <segment>
 +
        <sourceSegment>It is really easy to setup via theme customizer.</sourceSegment>
 +
        <targetSegment>Es kann über den Theme-Customizer ganz einfach eingerichtet werden.</targetSegment>
 +
        <sid>N/A</sid>
 +
        <tmName>tm</tmName>
 +
  </segment>
 +
</segments>
 +
 +
Sid node is not be added if sid is null.
  
 
Permission limits in the permission tree: Setup >> Translation Memory (View) >> Search entries in TM
 
Permission limits in the permission tree: Setup >> Translation Memory (View) >> Search entries in TM
Line 2,017: Line 2,272:
 
Required Permissions: Setup >> Translation Memory (View) >> Search entries in TM
 
Required Permissions: Setup >> Translation Memory (View) >> Search entries in TM
  
* '''void nextTus (String accessToken, String sourceLocale, String targetLocale, String maxSize, String tuId)'''
+
* '''void nextTus (String accessToken, String tmName, String companyName, String sourceLocale, String targetLocale, String maxSize, String tuIdToStart)'''
This is available in GlobalSight version 7.1.4.0 and onwards.
+
This is available in GlobalSight version 8.5.1 and onwards to replace the old one since 7.1.4.0 version.
  
 
** accessToken – the accessToken received from login(), cannot be null
 
** accessToken – the accessToken received from login(), cannot be null
 +
** tmName – the name of the TM, cannot be null
 +
** companyName – the name of the company, cannot be null
 
** sourceLocale – the source locale, cannot be null
 
** sourceLocale – the source locale, cannot be null
 
** targetLocale  – the target locale. Searches all locales if it is set to null
 
** targetLocale  – the target locale. Searches all locales if it is set to null
 
** maxSize - The maximum size of the return TUs
 
** maxSize - The maximum size of the return TUs
** tuId - The ID of the TU cannot be null before the first TU,
+
** tuIdToStart- The ID of the TU, cannot be null before the first TU
  
This method is used to add TUs to the specified TU. An example XML response is:
+
This method is used to return next TUs. An example XML response is:
  
 
  <tu tuid="1001" datatype="plaintext">
 
  <tu tuid="1001" datatype="plaintext">
Line 2,054: Line 2,311:
 
Required Permissions: Setup >> Translation Memory (View) >> Search entries in TM
 
Required Permissions: Setup >> Translation Memory (View) >> Search entries in TM
  
* '''void editTu (String accessToken, String tmx)'''
+
* '''void editTu (String accessToken, String tmName, String companyName, String tmx)'''
This is available in GlobalSight version 7.1.4.0 and onwards.
+
This is available in GlobalSight version 8.5.1 and onwards to replace the old one since 7.1.4.0.
  
 
** accessToken – the accessToken received from login(), cannot be null
 
** accessToken – the accessToken received from login(), cannot be null
 +
** tmName – the name of the TM, cannot be null
 +
** companyName – the name of the company, cannot be null
 
** tmx – A TMX  format string including all TU information, cannot be null
 
** tmx – A TMX  format string including all TU information, cannot be null
  
Line 2,084: Line 2,343:
 
This method is used for uploading TMX files to the server.
 
This method is used for uploading TMX files to the server.
  
* void importTmxFile(String accessToken, String tmName, String syncMode)
+
* '''void importTmxFile(String accessToken, String tmName, String syncMode)'''
 
** accessToken – the accessToken received from login()
 
** accessToken – the accessToken received from login()
 
** tmName –  Project TM name to import the TMX files to
 
** tmName –  Project TM name to import the TMX files to
Line 2,090: Line 2,349:
  
 
This method is used for importing TMX files into specified project TM.
 
This method is used for importing TMX files into specified project TM.
 +
 +
* '''String exportTM(String accessToken, String tmName, String languages, String startDate, String finishDate, String exportFormat, String exportedFileName)'''
 +
** accessToken – the accessToken received from login()
 +
** tmName - TM name to export,can not be empty
 +
** languages - languages to export like "de_DE,fr_FR" or "fr_FR" or empty. If empty, export all languages.
 +
** startDate - start time in "yyyyMMdd" format,on this day of all time periods will be included, can not be empty.
 +
** finishDate - finish time in "yyyyMMdd" format,on this day of all time periods will be included, can be null, if null, use current time.
 +
** exportFormat - export file formats: "GMX" and "TMX1.4b".
 +
** exportedFileName - specified file name, if empty, use GlobalSight default name like "tm_export_n.tmx" or "tm_export_n.xml".
 +
 +
This method is used to export TM. It returns an identify key which is used to locate the exported file for downloading. Call this method first, then call "getTmExportStatus()" API in loop until exporting is finished.
 +
 +
* '''String getTmExportStatus(String accessToken, String identifyKey)'''
 +
** accessToken – the accessToken received from login()
 +
** identifyKey - identifyKey to help locate where the export file is.
 +
 +
This method is used to check TM export status. Before this, should call "exportTM()" API to start TM export progress, and receive an identify key. Available vaules for "status" are "failed", "inprogress" and "finished". The "url" has value only when "finished". When the "status" is "finished", can retrieve to get the wanted TM data file.
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<exportStatus>
 +
    <status>failed|inprogress|finished</status>
 +
    <url>http://w10.globalsight.com:8080/globalsight/DownloadTM/allie/GlobalSight/TmExport/846048690/file_name.zip</url>
 +
</exportStatus>
  
 
===Term Base management===
 
===Term Base management===
Line 2,146: Line 2,428:
 
                       <lang_name>English</lang_name>
 
                       <lang_name>English</lang_name>
 
                       <termContent>contents in English</termContent>
 
                       <termContent>contents in English</termContent>
                 </term>
+
                 </term>
         </tbEntry>
+
         </tbEntry>
         <tbEntry>
+
         <tbEntry>
                 <tbName>termbase name</tbName>
+
                 <tbName>termbase name</tbName>
                 <term>
+
                 <term>
                       <lang_name>Chinese</lang_name>
+
                       <lang_name>Chinese</lang_name>
                       <termContent>中文内容</termContent>
+
                       <termContent>中文内容</termContent>
                 </term>
+
                 </term>
         </tbEntry>
+
         </tbEntry>
  </tbEntries>
+
  </tbEntries>
 +
 
 +
Required Permissions: Setup >> Terminology (View) >> Search entries in termbase
 +
 
 +
* '''void editTBEntry(String accessToken, String termbaseName, String sourceLocale, String soureTerm, String targetLocale, String targetTerm)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
** termbaseName - the termbase name to create the entry in. Not null
 +
** sourceLocale - the source locale to be searched in. Not null
 +
** sourceTerm - the source term to be used to search the source contents. Not null. TargetLocale - the target Locale to be edited. Not null
 +
** targetTerm - the target term to replace the old term content for p_targetLocale;
 +
 
 +
This method is used to edit one term in specified TB.
 +
 
 +
Permission limits in permission tree: Setup >> Terminology (View) >> Edit entries in termbase
 +
 
 +
* '''void deleteTBEntry(String accessToken, String termbaseName, String searchString, String sourceLocale, String targetLocale)'''
 +
** accessToken – the accessToken received from login()
 +
** termbaseName - the termbase name to delete the entry from
 +
** searchString – the search string of p_sourceLocale
 +
** sourceLocale - the source locale to search for the term to be deleted. TargetLocale - the target Locale to be deleted. Can be null. If null, all terms located by searchString and sourceLocale are deleted. This method is used to delete specified term(s) from the TB
 +
 
 +
Required Permissions: Setup >> Terminology (View) >> Edit entries in termbase
 +
 
 +
===CVS support===
 +
This is available in version 7.1.2 1 and onwards.
 +
* '''String getSourceLocales (String accessToken)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
 
 +
This gets all source locales associated with the current user. An example XML response is:
 +
 
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<root>
 +
        <locale>
 +
              <id>32</id>
 +
              <name>English (United States) [en_US]</name>
 +
        </locale>
 +
 +
</root>
 +
 
 +
* '''String getTargetLocales (String accessToken, String sourceLocale)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
** sourceLocale – the source locale specified in a role
 +
 
 +
This gets the target locales that are associated with the specified source locale. An example XML response is:
 +
 
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<root>
 +
        <locale>
 +
              <id>25</id>
 +
              <name>German (Germany) [de_DE]</name>
 +
        </locale>
 +
        <locale>
 +
              <id>41</id>
 +
              <name>Spanish (Spain) [es_ES]</name>
 +
        </locale>
 +
</root>
 +
 
 +
* '''String getConnection (String accessToken)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
 
 +
This method returns the URL for connecting to the database. An example string response is:
 +
 
 +
jdbc:mysql://localhost:3306/globalsight?useUnicode=true&characterEncoding=UTF-8,globalsight,password
 +
 
 +
===Report Management===
 +
This is available in version 8.5.9 and onwards.
 +
* '''String generateTranslationEditReport(String accessToken, String jobId, String targetLocale)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
** jobId - job ID to get report
 +
** targetLocale - target locale like "zh_CN"(case insensitive).
 +
 
 +
This is used to get translation edit report for specified job and locale. An example response is: http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/TranslationsEditReport/20140219/TranslationsEditReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx
 +
 
 +
* '''String generateCharacterCountReport(String accessToken, Sring jobIds, String targetLocales)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
** jobIds - job IDs like "11,13,45".
 +
** targetLocales - target locales like "fr_FR,zh_CN"(case insensitive).
 +
 
 +
This is used to get character count report for specified jobs and locales. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/CharacterCountReport/20140219/CharacterCountReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx" or "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/CharacterCountReport/20140219/GSReports1416985676460.zip".
 +
 
 +
* '''String generateReviewersCommentReport(String accessToken, String jobIds, String targetLocales, boolean includeCompactTags)'''
 +
** accessToken – the accessToken received from login(), cannot be null
 +
** jobIds - job IDs to get report
 +
** targetLocales - target locale like "fr_FR,zh_CN"(case insensitive).
 +
** includeCompactTags - if true, source and target segments will have compact tags information. Otherwise, just pure text.
  
Required Permissions: Setup >> Terminology (View) >> Search entries in termbase
+
This is used to get Reviewers Comment Report for specified jobs and locales.  A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentReport/20140219/CharacterCountReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx" or "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentReport/20140219/GSReports1416985676460.zip".
  
* '''void editTBEntry(String accessToken, String termbaseName, String sourceLocale, String soureTerm, String targetLocale, String targetTerm)'''
+
* '''String generateReviewersCommentSimplifiedReport(String accessToken, String jobIds, String targetLocales, boolean includeCompactTags)'''
 
** accessToken – the accessToken received from login(), cannot be null
 
** accessToken – the accessToken received from login(), cannot be null
** termbaseName - the termbase name to create the entry in. Not null
+
** jobIds - job IDs to get report
** sourceLocale - the source locale to be searched in. Not null
+
** targetLocales - target locale like "fr_FR,zh_CN"(case insensitive).
** sourceTerm - the source term to be used to search the source contents. Not null. TargetLocale - the target Locale to be edited. Not null
+
** includeCompactTags - if true, source and target segments will have compact tags information. Otherwise, just pure text.
** targetTerm - the target term to replace the old term content for p_targetLocale;
 
 
 
This method is used to edit one term in specified TB.
 
  
Permission limits in permission tree: Setup >> Terminology (View) >> Edit entries in termbase
+
This is used to get Simplified Reviewers Comment Report for specified jobs and locales.  A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentSimplifiedReport/20140219/CharacterCountReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx" or "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentSimplifiedReport/20140219/GSReports1416985676460.zip".
  
* '''void deleteTBEntry(String accessToken, String termbaseName, String searchString, String sourceLocale, String targetLocale)'''
+
* '''String generateDITAQAReport(String accessToken, String taskId)'''
** accessToken – the accessToken received from login()
 
** termbaseName - the termbase name to delete the entry from
 
** searchString – the search string of p_sourceLocale
 
** sourceLocale - the source locale to search for the term to be deleted. TargetLocale - the target Locale to be deleted. Can be null. If null, all terms located by searchString and sourceLocale are deleted. This method is used to delete specified term(s) from the TB
 
 
 
Required Permissions: Setup >> Terminology (View) >> Edit entries in termbase
 
 
 
===CVS support===
 
This is available in version 7.1.2 1 and onwards.
 
* '''String getSourceLocales (String accessToken)'''
 
 
** accessToken – the accessToken received from login(), cannot be null
 
** accessToken – the accessToken received from login(), cannot be null
 +
** taskId - task ID to get DITA QA report
  
This gets all source locales associated with the current user. An example XML response is:
+
This is used to get DITA QA checks report. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/$$companyName$$/GlobalSight/Reports/DITAQAChecksReport/914/zh_CN/ditaTranslation1_6315/DITAQAChecksReport-Job Name-zh_CN-20141212 125403.xlsx".
  
<?xml version="1.0" encoding="UTF-8"?>
+
* '''String generateQAChecksReport(String accessToken, String taskId)'''
<root>
 
        <locale>
 
              <id>32</id>
 
              <name>English (United States) [en_US]</name>
 
        </locale>
 
 
</root>
 
 
 
* '''String getTargetLocales (String accessToken, String sourceLocale)'''
 
 
** accessToken – the accessToken received from login(), cannot be null
 
** accessToken – the accessToken received from login(), cannot be null
** sourceLocale – the source locale specified in a role
+
** taskId - task ID to get QA report
 
 
This gets the target locales that are associated with the specified source locale. An example XML response is:
 
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<root>
 
        <locale>
 
              <id>25</id>
 
              <name>German (Germany) [de_DE]</name>
 
        </locale>
 
        <locale>
 
              <id>41</id>
 
              <name>Spanish (Spain) [es_ES]</name>
 
        </locale>
 
</root>
 
  
* '''String getConnection (String accessToken)'''
+
This is used to get QA checks report. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/QAChecksReport/1036/de_DE/GSPM1_375/QAChecksReport_a_413186725_GSPM1-de_DE.xlsx".
** accessToken – the accessToken received from login(), cannot be null
 
  
This method returns the URL for connecting to the database. An example string response is:
+
* '''String generatePostReviewQAReport(String accessToken, String jobId, String targetLocale)'''
 +
** accessToken –  login user's token
 +
** jobId - job ID to get report
 +
** targetLocale - target locale. eg "zh_CN"(case insensitive)
  
jdbc:mysql://localhost:3306/globalsight?useUnicode=true&characterEncoding=UTF-8,globalsight,password
+
This is used to get post review QA report. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/PostReviewQAReport/20140219/PRR-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx".
  
 
==GlobalSight web service WSDL==
 
==GlobalSight web service WSDL==

Latest revision as of 03:56, 9 March 2016

Developers
Go to: Getting Started Guide
Footer-logo.gif
System requirements

Installing GlobalSight
3rd party comps: Windows | Ubuntu
GlobalSight: Windows | Ubuntu
Desktop Icon

Setting up GlobalSight
Running GlobalSight Behind an Apache Reverse Proxy

Developing GlobalSight
GlobalSight Architecture
Getting the Code
Building and Deploying GlobalSight
GlobalSight Developer’s Guide
Setting up the Development Environment
Debugging GlobalSight
Designing the GlobalSight Adapters
GlobalSight Web Services API
Using the GlobalSight Web Services API Test Tool
Using the GlobalSight CVS Connector
Connecting to a CVS with the GlobalSight Desktop Icon

Upgrading GlobalSight
Comparing GlobalSight with WorldServer

This document describes the Web services API provided by GlobalSight. This API is used to integrate external systems to GlobalSight in order to submit content to the localization/translation work-flow, and monitor its status.

The Web services API allows any client to connect and exchange data with GlobalSight, regardless of its implementation technology or operating system.

IP filter

GlobalSight has an IP filter functionality as a company-level option that can be configured at super company level to decide whether to enable or disable the function. By default, it is enabled.

When enabled, only IPs in the list of those allowed can invoke web service APIs. When disabled, any IP can do this.

To determine if this option is enabled, the GlobalSight IP filter needs to know the username and password of the invoker. These must therefore be delivered to the GS server. If they are not delivered, GlobalSight filters the IPs even when set to false.

For Java client, client codes are commonly generated via an IDE (Integrated Development Environment) such as Eclipse. Make the following other changes:

1. Add an override method to AmbassadorServiceLocator.java:

getAmbassadorWebService(java.net.URL portAddress, 
                              String userName, 
                              String password)

2. Add construct to AmbassadorWebServiceSoapBindingStub.java:

public AmbassadorWebServiceSoapBindingStub(
        java.net.URL endpointURL,
        javax.xml.rpc.Service service,
        String userName, 
        String password)
{
  this(service);
  super.cachedEndpoint = endpointURL;
  super.cachedUsername = userName;
  super.cachedPassword = password;
}

3. Obtain the proxy via getAmbassadorWebService() with the user ID and password

You can now invoke the GlobalSight Web service API.

Description of the web service

The web service exposes the methods described in this section in pseudocode. For a description of WSDL, see the GlobalSight web service WSDL section below. The WSDL can be queried from the GlobalSight server at runtime by reading the following URL:

http://<server>:<port>/globalsight/services/AmbassadorWebService?wsdl

Most Web service methods return XML documents as a result of execution. The format of the individual response XML depends on the specific method invoked.

In the case of any errors, an XML response describing the error, the method invoked, and its arguments, are returned in the following format:

<?xml version="1.0" encoding="UTF‐8" ?>
<errorXml>
  <method>login</method>
  <error>Unable to login to GlobalSight with username ‘joe’ and password ‘joepw’
  </error>
</errorXml>

Some web service APIs have permission limits. For example, the current user must have “customer.upload” permissions to use the uploadFile() method to upload files to GlobalSight. Otherwise, an error arises indicating that the current user does not have permission. For a description of the permissions required, take note of the Required Permissions references in the description of each API.

Authentication

  • String login(String username, String password)
    • username–the username of the login user
    • password – the password of the login user

The login() method must be called prior to using the web services. The login() method takes in a username and password, and returns an access token as a string. The username/password must be valid to access GlobalSight. The returned access token must then be passed to subsequent web service calls.

  • String getAllPermissionsByUser(String accessToken )
    • accessToken – the accessToken received from login()

This is available in GlobalSight version 7.1.4.0 and onwards.

This method returns XML containing all of the permissions that the current logged user has. An example XML response is:

<?xml version="1.0" encoding="UTF‐8" ?>
<Permissions>
               <PermissionGrp>			
                      <id>70</id>
                      <name>projects.edit</name>
               </PermissionGrp>
               <PermissionGrp>
                      <id>83</id>
                      <name>locprofiles.new</name>
               </PermissionGrp>
               <PermissionGrp>
                      <id>89</id>
                      <name>fileprofiles.view</name>
               </PermissionGrp>
</Permissions> 
  • String getVersion(String accessToken )
    • accessToken – the accessToken received from login()

The getVersion() method is used for getting the version scope that the Desktop Icon supports. For example, (3.1, 7.1) means that the Desktop Icon supports a minimal server version of 3.1 and a maximum version of 7.1. Use the new getGSVersion() method from 8.2.1 onwards.

This only applies to the Desktop Icon application.

  • String getGSVersion(String accessToken )
    • accessToken – the accessToken received from login()

The getGSVersion() method is used for getting the version scope that the Desktop Icon supports. For example, (3.1, 7.1) means that the Desktop Icon supports a minimal server version of 3.1 and a maximum version of 7.1. Use this method from 8.2.1 onwards.

This only applies to the Desktop Icon application.

  • String getServerVersion(String accessToken )
    • accessToken – the accessToken received from login()

This method is used for getting the Globalsight server version, for example 7.1.8.0.

  • String isExistedPermission(String accessToken, String permissionName)
    • accessToken – the accessToken received from login()

Check if the permission given exists on the target server. This is used to check if a certain feature has been deployed on the server. It returns “true” or “false” in the String.

Content import

Note: best practice for creating jobs is to use API's in order

login >> getUniqueJobName >> uploadFileForInitial >> uploadAttributeFiles >> addJobComment >> createJobOnInitial

Required steps are in bold

  • void uploadFile(HashMap args)
    • accessToken – the accessToken received from login()
    • jobName – the desired jobname to use for this job
    • filePath – the file’s local path
    • fileProfileId – file profile id, each file should select a file profile
    • Bytes – file contents in bytes[]

The uploadFile() method is used for uploading a file to the server. The contents of the file is passed to uploadFile() via the Bytes argument. If uploadFile() is called more than once with the same jobName and filePath, it will append the content (this can be used to upload files in chunks). The value of filePath is used by the server to determine the relative path to the file that will be created on the server.

Required Permissions: DataSources >> Upload Files

  • void uploadFile(String accessToken, String jobName, String filePath,String fileProfileId, String content)
    • accessToken – the accessToken received from login()
    • jobName – the desired jobname to use for this job
    • filePath - The path of the file
    • fileProfileId –The id of the file profile
    • content – Job content(String type)

The uploadFile() method is used for uploading a file to the server. The contents of the file is passed to uploadFile() via the content argument. If uploadFile() is called more than once with the same jobName and filePath, it will append the content (this can be used to upload files in chunks). The value of filePath is used by the server to determine the relative path to the file that will be created on the server.

Required Permissions: DataSources >> Upload Files

  • void uploadFile(String accessToken, String jobName, String filePath,String fileProfileId, byte [] content)
    • accessToken – the accessToken received from login()
    • jobName – the desired jobname to use for this job
    • filePath - The path of the file
    • fileProfileId –The id of the file profile
    • content – Job content(byte[] type)

The uploadFile() method is used for uploading a file to the server. The contents of the file is passed to uploadFile() via the content argument. If uploadFile() is called more than once with the same jobName and filePath, it will append the content (this can be used to upload files in chunks). The value of filePath is used by the server to determine the relative path to the file that will be created on the server.

Required Permissions: DataSources >> Upload Files

  • void uploadFileForInitial(HashMap args)
    • args -- parameters for uploading files to GlobalSight server. There are some parameters contained in the object,
      • accessToken -- Access token
      • jobName -- job name which is defined by user
      • jobId -- ID of job, if its value is null, it means that this is a new job. Otherwise, new file will be just uploaded.
      • filePath -- The path of the file
      • fileProfileId -- The id of the file profile
      • priority -- Priority of the job
      • bytes -- Content of uploaded file

The uploadFileForInitial() method is used for uploading a file to the GlobalSight server and set the process status of job as UPLOADING. The difference between this method and uploadFile() is uploadFileForInitial() will create a job instance and set its status to UPLOADING first, but uploadFile() method is just handled to upload file to GlobalSight server. The contents of the file is passed to uploadFileForInitial() via the content argument. If uploadFileForInitial() is called more than once with the same jobName and filePath, it will append the content (this can be used to upload files in chunks). The value of filePath is used by the server to determine the relative path to the file that will be created on the server.

Required Permissions: DataSources >> Upload Files

  • void uploadAttributeFiles(String accessToken, String jobName, String attInternalName, String fileName, byte[] bytes)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job
    • attInternalName – The internal name of Attribute
    • fileName – the file name
    • bytes – the content of the file

This method is used for uploading job attribute files.

  • void createJob(HashMap args)
    • jobName – the desired jobname to use for this job.
    • Comment – the comment of this job
    • filePaths - It is a Vector.Contains the file path in job,can not be empty.
    • fileProfileIds – It is a Vector.Contains the file profile id ,can not be empty.
    • targetLocales –It is a Vector.Contains the target locales which like to be translated,can not be empty.

Locales bound in the L10N profile are selected. The target locales are added to a vector. This method creates a job with the target locales selected and multiple format files that are selected with different file profiles.

  • void createJob(String accessToken, String jobName, String comment,String filePaths, String fileProfileIds, String targetLocales)
    • accessToken – the accessToken received from login()
    • jobName –the desired jobname to use for this job
    • comment –the comment of this job
    • filePaths - String Path of files which are contained in job, split by "|",sample:"Setup.docx" or "Setup.docx|Overview_Partner.docx".Can not be empty.
    • fileProfileIds – String ID of file profiles, split by "|",sample:"23" or "23|23".Can not be empty.
    • targetLocales – String Target locales which like to be translated, split by "|",sample:"it_IT,de_DE" or "it_IT,de_DE|it_IT,de_DE". If empty, all locales of current L10nProfile will be used default.

This method is used for creating a job with the selected target locales and multiple format files that are selected with different file profiles.

  • void createJobOnInitial(HashMap args)
    • args -- parameters for creating a job. There are some parameters contained in the object,
      • accessToken -- Access token
      • jobId -- ID of job
      • comment -- comment for this job
      • filePaths - It is a Vector.Contains the file path in job,can not be empty.
      • fileProfileIds – It is a Vector.Contains the file profile id ,can not be empty.
      • targetLocales – It is a Vector.Contains the target locales which like to be translated,can not be empty.
      • priority -- priority of job
      • attributes – Attributes used to create the job

This method is used for creating a job with the selected target locales and multiple format files that are selected with different file profiles. In using this method, it can apply more job status information in creating process such as IN_QUEUE. This method only can be invoked after running uploadFileForInitial() method because it needs jobId to get job instance instead of using jobName.

  • void createJob(String accessToken, String jobName, String comment,String filePaths, String fileProfileIds, String targetLocales, String attributeXml)
    • accessToken – the accessToken received from login()
    • jobName –the desired jobname to use for this job
    • comment –the comment for this job
    • filePaths - String Path of files which are contained in job, split by "|",sample:"Setup.docx" or "Setup.docx|Overview_Partner.docx".Can not be empty.
    • fileProfileIds – String ID of file profiles, split by "|",sample:"23" or "23|23".Can not be empty.
    • targetLocales –String Target locales which like to be translated, split by "|",sample:"it_IT,de_DE" or "it_IT,de_DE|it_IT,de_DE". If empty, all locales of current L10nProfile will be used default.
    • attributeXml – Attributes used to create the job

This method is used for creating a job with the selected target locales and multiple format files that are selected with different file profiles.

  • void createEditionJob(HashMap args)
    • accessToken – the accessToken received from login()
    • jobName – the desired jobname to use for this job
    • filePaths - It is a Vector.Contains the file path in job.
    • fileProfileIds – It is a Vector.Contains the file profile id.
    • targetLocales – It is a Vector.Contains the target locales which like to be translated.
    • taskId – on the original GS server
    • job comment, original activity comments
    • segment comment
    • original GS server WSDL url(String)
    • username
    • password

Make sure that all files have been uploaded to the service. The createEditionJob() is used for creating a GlobalSight Editions job.

  • void uploadOriginalSourceFile (HashMap args)
    • accessToken – the accessToken received from login()
    • jobName – the desired jobname to use for this job
    • filePath – The path of the file
    • targetLocale – the target locale like "fr_FR"
    • Bytes – the content of the file

This method is used for uploading original files to the GlobalSight Edition server.

  • void uploadCommentReferenceFiles (HashMap args)
    • args: collections of files information

This method is used for uploading files with task attached to an Edition server as job reference files.

  • void uploadEditionFileBack(String accessToken, String originalTaskId, String fileName, byte[] bytes)
    • accessToken – the accessToken received from login()
    • originalTaskId – the String of task ID from the target serve
    • filename – the name of the file
    • bytes –The contents in bytes to be uploaded

This method is used for uploading translated files to the server for the purposes of off-line uploading.

  • void importOfflineTargetFiles(String accessToken, String originalTaskId)
    • accessToken – the accessToken received from login()originalTaskId – the String of task ID from the target server

This method provides support for off-line uploading. Before invoking this, the uploadEditionFileBack() API should be invoked. After invoking this, sendSegmentCommentBack() API should also be invoked.

  • void sendSegmentCommentBack(String accessToken, HashMap segmentComments)
    • accessToken – the accessToken received from login()
    • SegementComments – Segment comments

This method is used for sending segment comments back to the original GlobalSight server. Only issues that are created in the original server are sent back with issue history added. This method should be invoked after the importOfflineTargetFiles() API.

  • void importOfflineKitFiles(String accessToken, String originalTaskId)
    • accessToken – the accessToken received from login()
    • originalTaskId – the string of the task ID from the target server

This method provides support for off-line transkit uploading. Before invoking, invoke the uploadEditionFileBack() API to upload the translation kit to the server. After invoking, you can invoke the getOfflineFileUploadStatus() API to find the upload status.

  • String getOfflineFileUploadStatus(String accessToken, String taskId, String filename)
    • accessToken – the accessToken received from login()
    • taskId – the string of the task ID from the target server
    • filename - the filename of offline kit being uploaded

This method is used to get the status of the uploading of the off-line translation kit. You can invoke this API after uploadEditionFileBack() and importOfflineKitFiles().

  • String getWorkOfflineFiles(String accessToken, Long taskId, int workOfflineFileType)
    • accessToken – the accessToken received from login()
    • taskId - the string of the task ID to offline download file from.
    • workOfflineFileType
    • 1 : Reviewer Comments Report or Translations Edit Report (this follows UI settings)
    • 2 : Offline Translation Kit
    • 3 : Translation Edit Report
    • 4 : Reviewer Comments Report
    • 5 : Reviewer Comments Report (Simplified)
    • 6 : Post Review QA Report

This method is used to get offline translation kit or report (Translation Edit Report or Reviewer Comments Report) for offline editing. If fail, it will return an xml string to tell error message; If succeed, for report downloading, it returns an URL like:

http://w10.globalsight.com:8080/globalsight/DownloadReports/yorkadmin/TranslationsEditReport/20140219/ReviewersCommentsReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx

And for offline translation kit downloading, it returns an URL like:

http://w10.globalsight.com:8080/globalsight/DownloadOfflineKit/[CompanyName]/GlobalSight/CustomerDownload/jobName_zh_CN.zip

"getWorkOfflineFiles()", "uploadWorkOfflineFiles()" and "importWorkOfflineFiles()" APIs are recommended to use together.

  • String uploadWorkOfflineFiles(String accessToken, Long taskId, int workOfflineFileType, String fileName, byte[] bytesString)
    • accessToken – the accessToken received from login()
    • taskId – task ID to upload file to
    • workOfflineFileType - 1 : For reports like "Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report"; 2 : Offline Translation Kit
    • fileName - the upload file name
    • bytes - file contents in bytes

This method is used to upload offline translation kit or report ("Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report") file to server. If succeed, return an "identifyKey" which is used to identify this uploading, a sample is "532689969". If fail, no key, return a standard error xml:

<?xml version="1.0" encoding="UTF‐8" ?>
<errorXml>
        <method>uploadWorkOfflineFiles</method>
        <error>error message</error>
</errorXml>
  • String importWorkOfflineFiles(String accessToken, Long taskId, String identifyKey, int workOfflineFileType)
    • accessToken – the accessToken received from login()
    • taskId – task ID to upload file to
    • identifyKey - this is used to locate the file which has been uploaded to server via "uploadWorkOfflineFiles()" API.
    • workOfflineFileType - 1 : For reports like "Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report"; 2 : Offline Translation Kit

This method is used to import offline translation kit or report ("Reviewer Comments Report", "Simplified Reviewer Comments Report", "Translations Edit Report" or "Post Review QA Report") file to update system. Return empty if succeed; if fail, return corresponding message.

<?xml version="1.0" encoding="UTF‐8" ?>
<errorXml>
        <method>importWorkOfflineFiles</method>
        <error>error message</error>
</errorXml>

Project management

  • String getAllL10NProfiles (String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing all L10N profiles in the company in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<l10n_profiles>
        <l10n_profile>
               <id>1001</id>
               <name>P01_LP</name>
        </l10n_profile>
        <l10n_profile>
               <id>1001</id>
               <name>P01_LP</name>
        </l10n_profile>
</l10n_profiles>
  • String getAllProjects (String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing all of the projects in the company in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<ProjectInformation>
        <Project>
               <id>1001</id>
               <name>Template</name>
               <description>Default project</description>
               <projectmanager>gsleopm</projectmanager>
        </Project>
        <Project>
               <id>1002</id>
               <name>Test Project</name>
               <description>Test project</description>
               <projectmanager>gstestcompanypm</projectmanager>
        </Project>
</ ProjectInformation>
  • String getAllProjectsByUser(String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing all of the projects managed by the user in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<ProjectInformation>
        <project>
               <id>1001</id>
               <name>Template</name>
               <description>Default project</description>
        </project>
        <project>
               <id>1002</id>
               <name>Test Project</name>
               <description>Test project</description>
        </project>
</ ProjectInformation>
  • long getProjectIdByFileProfileId(String accessToken, Long fileProfileId)
    • accessToken – the accessToken received from login()
    • fileProfileld – ID of file profile

This method is used to get the project ID with a specified file profile. It returns the long ID of the project that is associated with the file profile.

  • String getAllProjectTMs(String accessToken)
    • accessToken – the accessToken received from login()

This method is used to get all project TM information, but it does not return remote TMs. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<ProjectTMInformation>
       <ProjectTM>
              <id>1</id>
              <name>TM01</name>
              <domain>TM01</domain>
              <organization>TM01</organization>
              <description>TM01</description>
       </ProjectTM>
       <ProjectTM>
              <id>2</id>
              <name>TM02</name>
              <domain></domain>
              <organization></organization>
              <description></description>
       </ProjectTM>
</ProjectTMInformation>

Activity and task management

  • String getAllActivityTypes (String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing all of the activity types in the company in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<AcitivityInformation>
         <Activity>
                  <id>1001</id>
                  <name>Translation1</name>
                  <description>N/A</description>
         </Activity>
         <Activity>
                  <id>1002</id>
                  <name>GSPM1</name>
                  <description>GSPM1</description>
         </Activity>
         <Activity>
                  <id>1003</id>
                  <name>review_linguistc1</name>
                  <description>review activity</description>
         </Activity>
</ ActivityInformation>
  • String getAcceptedTasksInWorkflow (String accessToken, long workflowId)
    • accessToken – the accessToken received from login()
    • workflowId – the ID of a workflow

This method returns XML containing basic information on the accepted tasks in the specified workflow in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<acceptedTasks>
       <workflowId>1001</workflowId>
       <task>
              <id>1001</id>
              <name>Translation1</name>
              <state>ACCEPTED</state>
              <acceptByDate>12/8/08 5:00:00 PM CST</acceptByDate>
              <acceptedDate>12/5/08 11:08:20 AM CST</acceptedDate>
              <accepter>
                     <userid>leoanyone</userid>
                     <firstName>leoanyone</firstName>
                     <lastName>leoanyone</lastName>
                     <title>lp</title>
                     <email>leoanyone@</email>
              </accepter>
              <completeByDate>12/12/08 5:00:00 PM CST</completeByDate>
              <completedDate>12/12/08 5:00:00 PM CST</completedDate>
       </task>
</acceptedTasks>
  • String getCurrentTasksInWorkflow (String accessToken, long workflowId)
    • accessToken – the accessToken received from login()
    • workflowId – the ID of a workflow

This method returns a list of current tasks in the specified workflow, in either active or accepted state. It specifies the IDs, names, and states of the tasks. The IDs of the workflows are also included. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<tasksInWorkflow>
        <workflowId>1001</workflowId>
        <task>
                         <id>1001</id>
                         <name>Translation1_10001</name>
                         <state>ACCEPTED</state>
        </task>
</tasksInWorkflow>
  • String getTasksInJob (String accessToken, long jobId, String taskName)
    • accessToken – the accessToken received from login()
    • jobId – the ID of a job
    • taskName – the name of the task

This method returns all of the tasks with the name given in the specified job. It specifies the IDs, names, states, accept/complete dates and times of the tasks.

If the task has been accepted, then information on the accepter is included. If the task has not been accepted, then the assignee information is included. The job ID and the workflows’ IDs are also included. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<tasksInJob>
        <jobId>1001</jobId>
        <task>
               <id>1001</id>
               <workflowId>1001</workflowId>
               <name>Translation1</name>
               <state>ACCEPTED</state>
               <type>TRANS</type>
               <accepter>
                      <userid>leoanyone</userid>
                      <firstName>leoanyone</firstName>
                      <lastName>leoanyone</lastName>
                      <title>lp</title>
                      <email>leoanyone@</email>
               </accepter>
               <estimatedAcceptanceDate>12/8/08 5:00:00 PM CST</estimatedAcceptanceDate>
               <acceptedDate>12/5/08 11:08:20 AM CST</acceptedDate>
               <estimatedCompletionDate>12/12/08 5:00:00 PM CST</estimatedCompletionDate>
               <completedDate>12/11/08 5:00:00 PM CST</completedDate>
               <availableDate>12/11/08 5:00:00 PM CST</availableDate>
               <isSkipped>true/false</isSkipped>
               <outgoing>
                       <arrowName>Action3</arrowName>
                       <pointTo>review_linguistc1_1007</pointTo>
               </outgoing>
               <outgoing>
                       <arrowName>Action5</arrowName>
                       <pointTo>GSPM1_1007</pointTo>
               </outgoing>
        </task>
</tasksInJob>
  • String getTasksInJobs (String accessToken, String jobIds, String taskName)
    • accessToken – the accessToken received from login()
    • jobIds – the ID of jobs, a string split with comma such as 1005,1006...
    • taskName – the name of the task

This method returns all of the tasks with the name given in the specified job. It specifies the IDs, names, states, accept/complete dates and times of the tasks.

If the task has been accepted, then information on the accepter is included. If the task has not been accepted, then the assignee information is included. The job ID and the workflows’ IDs are also included. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<jobs>
        <job>
               <job_id>1001</job_id>
               <job_name>testjob</job_name>
               <task>
                     <id>1001</id>
                     <workflowId>1001</workflowId>
                     <name>Translation1</name>
                     <state>ACCEPTED</state>
                     <type>TRANS</type>
                     <accepter>
                             <userid>leoanyone</userid>
                             <firstName>leoanyone</firstName>
                             <lastName>leoanyone</lastName>
                             <title>lp</title>
                             <email>leoanyone@</email>
                     </accepter>
                     <estimatedAcceptanceDate>12/8/08 5:00:00 PM CST</estimatedAcceptanceDate>
                     <acceptedDate>12/5/08 11:08:20 AM CST</acceptedDate>
                     <estimatedCompletionDate>12/12/08 5:00:00 PM CST</estimatedCompletionDate>
                     <completedDate>12/11/08 5:00:00 PM CST</completedDate>
                     <availableDate>12/11/08 5:00:00 PM CST</availableDate>
                     <isSkipped>true/false</isSkipped>
                     <outgoing>
                             <arrowName>Action3</arrowName>
                             <pointTo>review_linguistc1_1007</pointTo>
                     </outgoing>
                     <outgoing>
                             <arrowName>Action5</arrowName>
                             <pointTo>GSPM1_1007</pointTo>
                     </outgoing>
               </task>
        </job>
</jobs>
  • void updateTaskState(String accessToken, String taskId, String state)
    • accessToken – the accessToken received from login()
    • taskId – the task ID
    • state – the state you want to update to

This method is used to update the status of the specified task to the specified state.

  • acceptTask(String p_accessToken, String p_taskId)
    • accessToken – the accessToken received from login()
    • p_taskId – the task ID to be accepted

This method is used to accept a task. If it succeeds, it returns as “success”.

  • String completeTask(String p_accessToken, String p_taskId, String p_destinationArrow)
    • accessToken – the access token received from the login
    • p_taskId – task Id to be completed
    • p_destinationArrow – This points to the next activity. This is null if the task has no condition node

This method is used to complete a task. If it succeeds, it returns as “success”.

  • String rejectTask(String p_accessToken, String p_taskId, String p_rejectComment)
    • accessToken –The access token received from the login
    • p_taskId – the task ID to be rejected
    • p_rejectComment– Reject comment

This method is used to reject a specified task. If it is successful, it returns as "success".

  • String getInContextReviewLink(String p_accessToken, String p_taskId)
    • accessToken –The access token received from the login
    • p_taskId – task ID

This method returns a link for in context review for specified task ID. User can open in context review window directly via this link without logging in(the logging in happens background when open this link). A sample is:

http://10.10.215.20:8080/globalsight/ControlServlet?linkName=self&pageName=inctxrvED1&secret=E127B35E1A1C1B52C742353BBA176327D7F54956B373428134DE7252182EAA0D.

User management

  • String getAllUsers (String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing all of the users in the company in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<userInformation>
        <user>
               <id>leoadmin</id>
               <name>leoadmin</name>
               <firstName>leoadmin</firstName>
               <lastName>leoadmin</lastName>
               <status>ACTIVE</status>
        </user>
        <user>
               <id>gsleopm</id>
               <name>gsleopm</name>
               <firstName>gsleopm</firstName>
               <lastName>gsleopm</lastName>
               <status>ACTIVE</status>
        </user>
        <user>
               <id>leoanyone</id>
               <name>leoanyone</name>
               <firstName>leoanyone</firstName>
               <lastName>leoanyone</lastName>
               <status>ACTIVE</status>
        </user>
</userInformation>
  • int createUser(String p_accessToken, String p_userId, String p_password, String p_firstName, String p_lastName, String p_email, String[] p_permissionGrps, String p_status, String p_companyName, String p_roles, boolean p_isInAllProject, String[] p_projectIds)
    • accessToken – the accessToken received from login(),This field cannot be null
    • p_userId – String User ID. Same as the username. This field cannot be null
    • p_password – String Password. This field cannot be null
    • p_firstName – String First name. This field cannot be null
    • p_lastName – String Last name. This field cannot be null
    • p_email – String Email address. This field cannot be null. If the email address is not valid, then the user's status will be set up as inactive
    • p_permissionGrp s– String[] Permission groups that the new user belongs to. The element in the array is the name of permission group
    • p_status String – Status
    • p_companyName – String Company name
    • p_roles – Roles String information of the user. It uses a string with an XML format to mark information on all user roles
    • p_isInAllProject– Boolean, if the user needs to be included in all projects.
    • p_projectIds– String[] Projects that the user is included in. If p_isInAllProject is true, this does not take effect
Return code:
0 – Success
1 – Invalid access token
2 – Invalid user id
3 – Cannot create super user
4 - User exists
5 - User does NOT exist
6 - User is NOT in the same company with logged user
7 - Invalid user password
8 – Invalid first name
9 – Invalid last name
10 – Invalid email address
11 – Invalid permission groups
12 – Invalid project information
13 – Invalid role information 
14 - Current login user does not have enough permission
-1 – Unknown exception

This method is used to create a user in GlobalSight.

  • int modifyUser(String p_accessToken, String p_userId, String p_password, String p_firstName, String p_lastName, String p_email, String[] p_permissionGrps, String p_status, String p_companyName, String p_roles, boolean p_isInAllProject, String[] p_projectIds)
    • p_accessToken – String Access token. This field cannot be null
    • p_userId – String User ID, same as the username. This field cannot be null
    • p_password – String Password. This field cannot be null
    • p_firstName – String First name. This field cannot be null
    • p_lastName – String Last name. This field cannot be null
    • p_email – String Email address. This field cannot be null. If the email address is not valid, then the user's status will be set up as inactive
    • p_permissionGrps – String[] Permission groups that the new user belongs to. The element in the array is the name of permission group.
    • p_status – String Status
    • p_roles – Roles String information of the user. It uses a string with an XML format to mark information on all user roles
    • p_isInAllProject – Boolean, if the user needs to be included in all projects
    • p_projectIds – String[] Projects that the user is included in. If p_isInAllProject is true, this does not take effect
Return code:
0 – Success
1 – Invalid access token
2 – Invalid user id
3 – Cannot create super user
4 - User exists
5 - User does NOT exist
6 - User is NOT in the same company with logged user
7 - Invalid user password
8 – Invalid first name
9 – Invalid last name
10 – Invalid email address
11 – Invalid permission groups
12 – Invalid project information
13 – Invalid role information 
14 - Current login user does not have enough permission
-1 – Unknown exception

This method is used to update user information.

  • String getUserInfo (String accessToken, String userId)
    • accessToken – the accessToken received from login()
    • userid – the user ID

This method returns XML containing all of the users in the company in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<userInformation>
        <userid>yorkadmin</userid>
        <userName>yorkadmin</userName>
        <firstName>yorkadmin</firstName>
        <lastName>yorkadmin</lastName>
        <status>ACTIVE</status>
        <companyName>york</companyName>
        <contactInfo>
               <email>@</email>
               <defaultUILocale>en_US</defaultUILocale>
        </contactInfo>
        <projects>
                <project>
                        <projectId>1</projectId>
                        <projectName>Template</projectName>
                        <projectCompanyId>york</projectCompanyId>
                </project>
                <project>
                        <projectId>2</projectId>
                        <projectName>project_1</projectName>
                        <projectCompanyId>york</projectCompanyId>
                </project>
        </projects>
        <roles>
                <role>en_US-zh_CN</role>
                <role>en_US-fr_FR</role>
        </roles>
        <permissionGroups>
                <group>Administrator</group>
                <group>LocalizationParticipant</group>
        </permissionGroups>
</userInformation>
  • String getUserUnavailabilityReport (String accessToken, String activityName, String sourceLocale, String targetLocale, int month, int year)
    • accessToken – the accessToken received from login()
    • activityName – the activity name that a user can be assigned to
    • sourceLocale – the source locale specified in a role
    • targetLocale – the target locale specified in a role
    • month – the month for which the report is requested
    • year – the year for which the report is generated for the given month

This method returns an XML containing all users in the container role defined by the activity name, source locale, and target locale with their unavailability for the given month of the year. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<userAvailabilityReport>
       <users>
                 <user>
                        <fullName>leoadmin leoadmin</fullName>
                        <username>leoadmin</username>
                        <events>
                               <event>
                                      <name>test</name>
                                      <type>EVENT</type>
                                      <date>12/12/08 - 12/15/08 (11:00:00 AM CST - 1:00:00 PM CST)</date>
                               </event>
                        </events>
                 </user>
      </users>
</userAvailabilityReport>
  • TimeZone getUserTimeZone(String accessToken, String userId)
    • accessToken – the accessToken received from login()
    • userId – the user’s ID.

This method is used for getting TimeZone by userId.

Locale management

  • String getAllLocalePairs (String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing all of the locale pairs in the company in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<LocalePairInformation>
       <localePair>
               <id>1001</id>
               <sourceLocale>
                     en_US
                     <displayName>English (United States) [en_US]</displayName>
               </sourceLocale>
               <targetLocale>
                     zh_CN 
                     <displayName>Chinese (China) [zh_CN]</displayName>
               </ targetLocale>
       </localePair>
       <localePair>
              <id>1002</id>
              <sourceLocale>
                     en_US
                     <displayName>English (United States) [en_US]</displayName>
              </sourceLocale>
              <targetLocale>
                     fr_FR
                     <displayName>French (France) [fr_FR]</displayName>
              </ targetLocale>
       </localePair>
       <localePair>
              <id>1003</id>
              <sourceLocale>
                     en_US
                     <displayName>English (United States) [en_US]</displayName>
              </sourceLocale>
              <targetLocale>
                     de_DE
                     <displayName>German (Germany) [de_DE]</displayName>
              </ targetLocale>
        </localePair>
</LocalePairInformation>
  • String isSupportCurrentLocalePair(String accessToken, String fileProfileId, String srcLangCountry, String trgLangCountry)
    • accessToken – the accessToken received from login().
    • fileProfileId – the ID of the file profile
    • srcLangCountry – source language
    • trgLangCountry – target language

This method judges whether there is workflow defined for specified source-target locales in a specified file profile. It returns "Yes" or "No".

Job management

  • String getStatus (String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job

This queries the status of a job. This method does not provide activity or workflow status information, only information at the job level. An example response XML is:

<?xml version="1.0" encoding="UTF-8" ?>
<jobStatus>
        <jobName>Test job</jobName>
        <jobId>1001</ jobId>
        <status>DISPATCHED</status>
        <cost>
                <currency>US Dollar (USD)</currency>
                <expense>
                      <estimatedCost>$120</estimatedCost>
                      <finalCost isOverrideCost=true>$380</finalCost>
                </expense>
        </cost>
</jobStatus>

The status field can contain the values DISPATCHED, EXPORTED, LOCALIZED, or CANCELLED. The cost field provides the value of the estimated cost.

  • String getJobStatus (String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job

This queries the status of a job. This method does not provide activity or workflow status information, only information at the job level. An example response XML is:

<?xml version="1.0" encoding="UTF-8" ?>
<job>
        <id>1001</id>
        <name>Test job</name>
        <status>DISPATCHED</status>
</job>

The status field can contain the values UPLOADING, IN_QUEUE, DISPATCHED, EXPORTED, LOCALIZED, or CANCELLED. If the job does not exist, it returns as UNKNOWN.

  • String getImportExportStatus(String accessToken)
    • accessToken – the accessToken received from login()

Returns number of jobs importing and number of workflows exporting. An example response XML is:

<?xml version="1.0" encoding="UTF-8" ?>
<ImportExportStatus>
    <jobsCreating>1</jobsCreating>
    <localesExporting>2</localesExporting>
</ImportExportStatus>
  • String getJobAndWorkflowInfo(String accessToken, long jobId)
    • accessToken – the accessToken received from login()
    • jobId – the ID of a job

This method returns general information on a job and its workflows. The information returned is mainly that which appears on the Job Details screen. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<jobInfo>
        <id>1001</id>
        <name>test job</name>
        <status>EXPORTED</status>
        <createDate>12/4/08 4:47:34 PM CST</createDate>
        <priority>3</priority>
        <sourceLocale>English (United States) [en_US]</sourceLocale>
        <state>EXPORTED</state>
        <creator>qaadmin</creator>
        <pageCount>1</pageCount>
        <sourcePages>
               <sourcePage>
                       <id>1005</id>
                       <externalPageId>en_US/testjob/GS_Test/demo_company.html</externalPageId>
                       <wordCount>115</wordCount>
               </sourcePage>
        </sourcePages>
        <sourceWordCount>115</sourceWordCount>
        <workflowInfo>
               <workflow>
                      <id>1001</id>
                      <targetLocale>Chinese (China) [zh_CN]</targetLocale>
                      <state>DISPATCHED</state>
                      <dispatchDate>12/4/08 4:47:35 PM CST</dispatchDate>
                      <currentActivity></currentActivity>
                      <estimatedTranslateCompletionDate>12/12/08 5:01:13 PM CST</estimatedTranslateCompletionDate>
                      <estimatedCompletionDate>12/12/08 5:01:13 PM CST</estimatedCompletionDate>
                      <completeDate>12/12/08 5:01:13 PM CST</completeDate>
                      <isInContextMatch>true</isInContextMatch>
                      <percentageComplete>80</percentageComplete>
                      <targetWordCount total=11>
                             <contextMatch>0</contextMatch>
                             <segmentTmMatch>18</segmentTmMatch>
                             <lowFuzzyMatch>3</lowFuzzyMatch>
                             <medFuzzyMatch>2</medFuzzyMatch>
                             <medHiFuzzyMatch>0</medHiFuzzyMatch>
                             <hiFuzzyMatch>2</hiFuzzyMatch>
                             <repetitionMatch>3</repetitionMatch>
                             <noMatch>1</noMatch>
                             <noExactMatch>1</noExactMatch>
                             <noContextMatch>1</noContextMatch>
                      </targetWordCount>
               </workflow>
       </ workflowInfo>
</jobInfo>
  • String getJobsByTimeRange (String accessToken, String startTime)
    • accessToken – the accessToken received from login()
    • startTime – Start time, it can be '2d', '8h' and '2d8h' format. 'd' means day, and 'h' means hours.

This queries jobs whose creation date is after the specified start time.

  • String getJobsByTimeRange (String accessToken, String startTime, long projectId)
    • accessToken – the accessToken received from login()
    • startTime – Start time, it can be '2d', '8h' and '2d8h' format. 'd' means day, and 'h' means hours.

This queries jobs whose creation date is after the specified start time and in the specified project. An example response XML using the getJobsByTimeRange() method is:

<?xml version="1.0" encoding="UTF-8" ?>
<jobs>
        <job>
                 <id>1005</id>
                 <name>2747_0218</name>
                 <state>DISPATCHED</state>
                 <creator>DISPATCHED</creator>
                 <create_date>10-7-7 上午10时12分48秒 CST</create_date>
                 <company_id>1000</company_id>
                 <company_name>QA</company_name>
                 <project_id>1001</project_id>
                 <project_name>Project01</project_name>
                 <priority>3</priority>
                 <source_locale>en_US</source_locale>
                 <page_count>1</page_count>
                 <word_count>115</word_count>
                 <workflows>
                          <workflow>
                                  <workflow_id>6</workflow_id>
                                  <workflow_state>DISPATCHED</workflow_state>
                                  <target_locale>de_DE</target_locale>
                                  <dispatch_date>10-7-7 上午10时12分48秒 CST</dispatch_date>
                                  <tasks>
                                           <task>
                                                    <task_id>879</task_id>
                                                    <task_name>Translation1_1000</task_name>
                                                    <task_duration_hours>0 minute</task_duration_hours>
                                                    <task_state>ACCEPTED</task_state>
                                                    <task_accept_date>10-7-7 上午10时12分48秒 CST</task_accept_date>
                                                    <task_assignees>All qualified users</task_assignees>
                                                    <task_acceptor>qaadmin</task_acceptor>
                                                    <task_expense_rate_id></task_expense_rate_id>
                                                    <task_revenue_rate_id></task_revenue_rate_id>
                                           </task>
                                  </task>
                                  <current_activity>Translation1</current_activity>
                                  <word_counts>
                                          <leverage_option>Leverage in context matches</leverage_option>
                                          <match_100_percent>18</match_100_percent>
                                          <match_95_percent-99_percent>33</match_95_percent-99_percent>
                                          <match_85_percent-94_percent>29</match_85_percent-94_percent>
                                          <match_75_percent-84_percent>0</match_75_percent-84_percent>
                                          <no_match>35</no_match>
                                          <repetition>0</repetition>
                                          <in_context_match>0</in_context_match>
                                          <total>115</total>
                                  </word_counts>
                                  <complete_date>10-7-7 上午10时12分48秒 CST</complete_date>
                          </workflow>
                 </workflows>
        </job>
</jobs>
  • String cancelJob (String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job

This cancels all workflows in the job. An example response XML is:

<?xml version="1.0" encoding="UTF-8" ?>
<cancelStatus>
       <jobName>test job</jobName>
       <workflowLocale>All Locales</workflowLocale>
       <status>canceled</status>
</cancelStatus>
  • String cancelJobById (String accessToken, long jobId)
    • accessToken – the accessToken received from login()
    • jobId – the ID of a job
<?xml version="1.0" encoding="UTF-8" ?>
<cancelStatus>
       <jobId>1001</jobId>
       <workflowLocale>All Locales</workflowLocale>
       <status>canceled</status>
</cancelStatus>
  • String cancelJobs(String accessToken, String jobIds)
    • accessToken – the accessToken received from login()
    • jobIds – Strings of one or more job IDs, using a comma to split more workflow IDs

This method is used for canceling one or several jobs all at once. jobIds is a string that contains all job IDs. An example response XML is:

<?xml version="1.0" encoding="UTF-8" ?>
<cancelStatus>
       <jobId>1001</jobId>
       <workflowLocale>All Locales</workflowLocale>
       <status>canceled</status>
</cancelStatus>
  • String cancelWorkflow (String accessToken, String jobName, String locale)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job
    • locale – the locale of the workflow to cancel

This cancels the single workflow that corresponds to the specified locale. If there is only one workflow in the job, then the job is canceled as well. The response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<cancelStatus>
       <jobName>test job</jobName>
       <workflowLocale>fr_FR</workflowLocale>
       <status>canceled</status>
</cancelStatus>
  • String archiveJob (String accessToken, String jobIds)
    • accessToken – the accessToken received from login()
    • jobIds– job IDs comma separated like "id1,id2,id3".

This archive the jobs specified by job IDs. If successful, return null, otherwise return an xml string with error jobs message in it.

  • String addComment (String accessToken, long objectId, int objectType, String userId, String comment, byte[]file, String filename, String access)
    • comment, byte[] file, String fileName, String access)
    • accessToken – the accessToken received from login()
    • objectId – the ID of the job or task
    • objectType – the type of the object that objectId refers to
    • userId – a valid user ID that adds the comment
    • comment – a comment to be added to the job or task
    • file – a file that was attached
    • fileName – the file name of an attached file
    • access – access specification of an attachment file

This method adds a comment and attachment to a job or task, and returns XML containing general information on the comment status in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<addCommentStatus>
      <objectId>1001</objectId>
      <objectType>1</objectType>
      <status<successful</status>
</addCommentStatus>
  • String addJobComment(String accessToken, String jobName, String userId, String comment, byte[] file, String fileName, String access)
    • accessToken – the accessToken received from login()
    • jobName– job name
    • userId – ID of the user that added the job comment
    • comment – job comment
    • file – an attached file
    • fileName – name of the attached file
    • access – access specification of the attached file:
      • Restricted: only the Project Manager can view the file
      • General: all participants of the task can view the file

This method adds a comment and attachment to a job. An XML is returned that contains general information on the comment status in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<addCommentStatus>
      <status<successful</status>
</addCommentStatus>
  • String getDownloadableJobs (String accessToken, String message)
    • accessToken – the accessToken received from login()
    • message – the XML of the job message.

This method checks if there are jobs that are downloadable in GlobalSight and returns XML containing the jobs that are downloadable. An example response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<jobs>
       <job>
               <name>test1</name>
               <status>unknown</status>
       </job>
</jobs>
  • String getUniqueJobName(HashMap args)
    • args – parameter collection. There are some parameters in the object
      • accessToken -- access token
      • jobName -- job name

The getUniqueJobName() gets a unique job name that is generated by the user input name and a random 9 number suffix as the real job name.

For example, if the user defines the name as 'TestJob', the job name generated is 'TestJob_002783882'. This job name is returned and used as the real job name in GlobalSight.

  • String getUniqueJobName(String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – Job name

The getUniqueJobName() getd a unique job name. The method takes in a hashmap (accessToken and jobName), and returns the job name used in the database.

  • String getPriorityByID(String accessToken, String l10nID)
    • accessToken – the accessToken received from login()
    • l10nID – ID of L10N

This method is used to get the priority by the specified L10N, and return the String priority associated with the specified L10N.

  • String getAttributesByJobId(String accessToken, long jobId)
    • accessToken – the accessToken received from login()
    • jobId – ID of the job

This method is used to get information on all attributes with a specified job ID. It returns a string with an XML description that contains all attribute information with the specified job. An example XML response is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<attributes>
  <attributes xsi:type="textJobAttributeVo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <displayName>attribute01</displayName>
     <fromSuperCompany>false</fromSuperCompany>	
     <internalName>attribute01</internalName>
     <required>true</required>
     <type>text</type>
     <length>255</length>
     <value>asdasdas</value>
  </attributes>	
</attributes>

Required Permissions: My Jobs >> Jobs(View) >> Job Details (View) >> Job Attribute (View)

  • void setJobAttribute(String accessToken, long jobId, String attInternalName, Object value)
    • accessToken – the accessToken received from login()
    • jobId – ID of the job
    • attInternalName – The internal name of Attribute
    • value : Text, Float, Integer, Date, Choice List, Files

This method is used to set a job attribute.

Required Permissions: My Jobs >> Jobs(View) >> Job Details (View) >> Job Attribute (View)>> Edit

  • String getJobAttribute(String accessToken, long jobId, String attInternalName)
    • accessToken – the accessToken received from login()
    • jobId – ID of the job
    • attInternalName – The internal name of the attribute

This method is used to get the attribute value with a specified job ID and internal attribute name. It returns an XML description that contains attribute information with the specified job and attribute name. An example XML response is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<textJobAttributeVo>
  <displayName>attribute01</displayName>
  <fromSuperCompany>false</fromSuperCompany>
  <internalName>attribute01</internalName>
  <required>true</required>
  <type>text</type>
  <length>255</length>
  <value>asdasdas</value>
</textJobAttributeVo>

Required Permissions: My Jobs >> Jobs(View) >> Job Details (View) >> Job Attribute (View)

  • String getAttributesByProjectId(String accessToken, long projectId)
    • accessToken – the accessToken received from login()
    • projectId – the ID of the project

This method is used to get information on all attributes with a specified project. It returns an XML description that contains information on all attributes with the specified project. An example XML response is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<attributes>
    <attributes xsi:type="textJobAttributeVo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <displayName>attribute01</displayName>
        <fromSuperCompany>false</fromSuperCompany>
        <internalName>attribute01</internalName>
        <required>true</required>
        <type>text</type>
        <length>255</length>
    </attributes>
</attributes>
  • HashMap getXliffFileProfile(String accessToken)
    • accessToken – the accessToken received from login()

This method is used to get the XLIFF file profiles id-name map. It returns hashmap(long:String).

  • void discardJob(String accessToken, String userIdToDiscardJob, String taskId)
    • accessToken – the accessToken received from login()
    • userIdToDiscardJob – userId that discards job(s) on the target server
    • taskId – taskId on original server that "skipped"

This method is used to discard corresponding jobs on the target server, if the activity on the source server is "Skipped". If there is more than one job created on the target server for one activity/task on the original server, they are all discarded one by one.

  • String jobsSkipActivity(String accessToken, String workflowId, String activity)
    • accessToken – the accessToken received from login()
    • workflowId– the workflow ID to be skipped
    • activity – the activity to be jumped

This method is used to skip ahead in the workflow to a specified activity.

  • String taskReassign (String accessToken, String taskId, String[] users)
    • accessToken – the accessToken received from login()
    • taskId– task Id to be reassigned
    • users – users to be reassigned to. The element in the array is userid, a sample is "["qaadmin", "qauser"]". Return null if successful, otherwise it will throw exception or return error message.

This method is used to re-assign a task to specified user(s).

  • String jobsWorkflowCanBeAdded(String p_accessToken, long p_jobId)
    • accessToken – the accessToken received from login()
    • jobId– job id

This method fetches the workflow's ID to be added to a specified job. The value returned is a string that contains the workflow IDs separated by commas. For example: 2,10,20

  • String jobsAddLanguages(String accessToken, long jobId, String wfInfos)
    • accessToken – the accessToken received from login()
    • jobId– job id
    • wfInfos – workflow IDs, separated by commas

This method adds new workflows into a specified job. The workflows can be invoked using the jobsWorkflowCanBeAdded() method.

  • String dispatchWorkflow(String accessToken, String wfIds)
    • accessToken – the accessToken received from login()
    • wfIds – String of one or more workflow IDs, separated by commas

This dispatches one or more workflows. Each workflow can be dispatched only when the state is READY_TO_BE_DISPATCHED.

  • String fetchCompanyInfo(String accessToken)
    • accessToken – the accessToken received from login()

This method is used to get the company information of which the user currently logged-in belongs to. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<Company>
        <id>1</id>
        <name>Welocalize</name>
        <description>Super company</description>
        <enableIPFilter>true</enableIPFilter>
</Company>
  • String fetchJobIdsPerCompany(String accessToken)
    • accessToken – the accessToken received from login()

This method is used to get the job IDs for current company/user. An example is:

1000,1001,1002,1003…
  • String fetchJobsPerCompany(String accessToken, String[] jobIds, boolean returnSourcePageInfo, boolean returnWorkflowInfo, boolean returnJobAttributeInfo)
    • accessToken – the accessToken received from login()
    • jobIds - the job IDs
    • returnSourcePageInfo - specify if return source page information
    • returnWorkflowInfo - specify if return workflow information
    • returnJobAttributeInfo - specify if return job attribute information.

This method is used to fetch job information for the current company. A full example XML response is the same as that for fetchJobsPerCompany(String accessToken, String[] jobIds).

  • String fetchJobsPerCompany(String accessToken, String[] jobIds)
    • accessToken – the accessToken received from login()
    • jobIds – the job Ids. The job IDs can be retrieved by fetchJobIdsPerCompany() API

This method is used to fetch job information for the current company. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<Jobs>
       <Job>
                <id>12</id>
                <name>20100709-1646_ws_test_attribute</name>
                <state>CANCELLED</state>
                <displayState>Archived</displayState>
                <priority>3</priority>
                <creator>qaadmin</creator>
                <createDate>10-7-15 下午04时47分06秒 CST</createDate>
                <startDate>10-7-15 下午04时47分06秒 CST</startDate>
                <completedDate></completedDate>
                <localizationProfile>
                        <localizationProfileId>1002</localizationProfileId>
                        <localizationProfileName>LP_01</localizationProfileName>
                </localizationProfile>
                <project>
                        <projectId>1001</projectId>
                        <projectName>Project01</projectName>
                </project>
                <group>
                	<groupId>1001</groupId>
                	<groupName>job group2</groupName>
                </group>
                <wordcount>106</wordcount>
                <numOfLanguages>1</numOfLanguages>
                <pptxSlideNum>21</pptxSlideNum>
                <docxPageNum>10</docxPageNum>
                <sourceLang>en_US</sourceLang>
                <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
                <sourcePages>
                       <sourcePage>
                              <sourcePageId>12</sourcePageId>
                              <externalPageId>en_US\20100709-1646_ws_test_attribute\Demo Company\TestFiles\demo_company.html</externalPageId>
                       </sourcePage>
                </sourcePages>
                <workflows>
                       <workflow>
                              <wfId>12</wfId>
                              <workflowName>workflow_en_US-de_DE</workflowName>
                              <targetLang>de_DE</targetLang>
                       </workflow>
               </workflows>
       </Job>
</Jobs>
  • String fetchJobsByRange(String accessToken, int offset, int count, boolean isDescOrder)
    • accessToken – the accessToken received from login()
    • offset – the first offset for records in the query result
    • count – number of records to be fetched at once
    • isDescOrder – if all records in the query result are sorted in descending order, then sort the result first and get the range of records specified

This fetches job information for the current company with the offset and count specified. The query result can be sorted in descending order. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<Jobs>
       <Job>
                <id>12</id>
                <name>20100709-1646_ws_test_attribute</name>
                <state>CANCELLED</state>
                <displayState>Archived</displayState>
                <priority>3</priority>
                <creator>qaadmin</creator>
                <createDate>10-7-15 下午04时47分06秒 CST</createDate>
                <startDate>10-7-15 下午04时47分06秒 CST</startDate>
                <completedDate></completedDate>
                <localizationProfile>
                        <localizationProfileId>1002</localizationProfileId>
                        <localizationProfileName>LP_01</localizationProfileName>
                </localizationProfile>
                <project>
                        <projectId>1001</projectId>
                        <projectName>Project01</projectName>
                </project>
                <group>
                	<groupId>1001</groupId>
                	<groupName>job group2</groupName>
                </group>
                <wordcount>106</wordcount>
                <numOfLanguages>1</numOfLanguages>
                <pptxSlideNum>21</pptxSlideNum>
                <docxPageNum>10</docxPageNum>
                <sourceLang>en_US</sourceLang>
                <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
                <sourcePages>
                       <sourcePage>
                              <sourcePageId>12</sourcePageId>
                              <externalPageId>en_US\20100709-1646_ws_test_attribute\Demo Company\TestFiles\demo_company.html</externalPageId>
                       </sourcePage>
                </sourcePages>
                <workflows>
                       <workflow>
                              <wfId>12</wfId>
                              <workflowName>workflow_en_US-de_DE</workflowName>
                              <targetLang>de_DE</targetLang>
                       </workflow>
               </workflows>
       </Job>
</Jobs>
  • String fetchJobsByState(String accessToken, String state, int offset, int count, boolean isDescOrder)
    • accessToken – the accessToken received from login()
    • state – job state
    • offset – the first offset for records in the query result
    • count – number of records to be fetched at once
    • isDescOrder – if all records in the query are in descending order, then sort the result first and get the range of records specified

This method fetches job information for the current company with the job state, offset and count specified. The query result can be sorted in descending order. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<Jobs>
       <Job>
                <id>12</id>
                <name>20100709-1646_ws_test_attribute</name>
                <state>CANCELLED</state>
                <displayState>Archived</displayState>
                <priority>3</priority>
                <creator>qaadmin</creator>
                <createDate>10-7-15 下午04时47分06秒 CST</createDate>
                <startDate>10-7-15 下午04时47分06秒 CST</startDate>
                <completedDate></completedDate>
                <localizationProfile>
                        <localizationProfileId>1002</localizationProfileId>
                        <localizationProfileName>LP_01</localizationProfileName>
                </localizationProfile>
                <project>
                        <projectId>1001</projectId>
                        <projectName>Project01</projectName>
                </project>
                <group>
                	<groupId>1001</groupId>
                	<groupName>job group2</groupName>
                </group>
                <wordcount>106</wordcount>
                <numOfLanguages>1</numOfLanguages>
                <pptxSlideNum>21</pptxSlideNum>
                <docxPageNum>10</docxPageNum>
                <sourceLang>en_US</sourceLang>
                <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
                <sourcePages>
                       <sourcePage>
                              <sourcePageId>12</sourcePageId>
                              <externalPageId>en_US\20100709-1646_ws_test_attribute\Demo Company\TestFiles\demo_company.html</externalPageId>
                       </sourcePage>
                </sourcePages>
                <workflows>
                       <workflow>
                              <wfId>12</wfId>
                              <workflowName>workflow_en_US-de_DE</workflowName>
                              <targetLang>de_DE</targetLang>
                       </workflow>
               </workflows>
       </Job>
</Jobs>
  • String fetchJobsByCreator(String accessToken, String creatorUserName, int offset, int count, boolean isDescOrder)
    • accessToken – the accessToken received from login()
    • creatorUserName– job creator's user name
    • offset – the first offset for records in the query result
    • count – number of records to be fetched at once
    • isDescOrder – if all records in the query are in descending order, then sort the result first and get the range of records specified

This method fetches job information for the current company with the job creator, offset and count specified. The query result can be sorted in descending order. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<Jobs>
       <Job>
                <id>12</id>
                <name>20100709-1646_ws_test_attribute</name>
                <state>CANCELLED</state>
                <displayState>Archived</displayState>
                <priority>3</priority>
                <creator>qaadmin</creator>
                <createDate>10-7-15 下午04时47分06秒 CST</createDate>
                <startDate>10-7-15 下午04时47分06秒 CST</startDate>
                <completedDate></completedDate>
                <localizationProfile>
                        <localizationProfileId>1002</localizationProfileId>
                        <localizationProfileName>LP_01</localizationProfileName>
                </localizationProfile>
                <project>
                        <projectId>1001</projectId>
                        <projectName>Project01</projectName>
                </project>
                <group>
                	<groupId>1001</groupId>
                	<groupName>job group2</groupName>
                </group>
                <wordcount>106</wordcount>
                <numOfLanguages>1</numOfLanguages>
                <pptxSlideNum>21</pptxSlideNum>
                <docxPageNum>10</docxPageNum>
                <sourceLang>en_US</sourceLang>
                <dueDate>10-7-15 下午04时47分06秒 CST</dueDate>
                <sourcePages>
                       <sourcePage>
                              <sourcePageId>12</sourcePageId>
                              <externalPageId>en_US\20100709-1646_ws_test_attribute\Demo Company\TestFiles\demo_company.html</externalPageId>
                       </sourcePage>
                </sourcePages>
                <workflows>
                       <workflow>
                              <wfId>12</wfId>
                              <workflowName>workflow_en_US-de_DE</workflowName>
                              <targetLang>de_DE</targetLang>
                       </workflow>
               </workflows>
       </Job>
</Jobs>
  • String getCountsByJobState(String accessToken)
    • accessToken – the accessToken received from login()

This method fetches job counts grouped by state for the current company. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<counts>
       <countByState>
                <state>DISPATCHED</state>
                <count>3</count>
       </countByState>
       <countByState>
                <state>LOCALIZED</state>
                <count>4</count>
       </countByState>
</counts>
  • String fetchWorkflowRelevantInfo(String accessToken, String workflowId)
    • accessToken – the accessToken received from login()
    • workflowId – the ID of a workflow

This method is used to fetch workflow information for the specified workflowId. It returns information on the current workflow, the Wordcount Summary, job comments, and task/activity comments. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<WorkflowInfo>
        <workflowId>1</workflowId>
        <targetLocale>de_DE</targetLocale>
        <state>EXPORTED</state>
        <percentageCompletion>100</percentageCompletion>
        <currentActivity></currentActivity>
        <estimatedTranslateCompletionDate>10-7-2 上午10时09分01秒 CST</estimatedTranslateCompletionDate>
        <estimatedCompletionDate>10-7-7 上午10时12分48秒 CST</estimatedCompletionDate>
        <workflowPriority>3</workflowPriority>
        <wordCountSummary>
                <leverageOption>Leverage in context matches</leverageOption>
                <100%>0</100%>
                <95%-99%>0</95%-99%>
                <85%-94%>0</85%-94%>
                <75%-84%>0</75%-84%>
                <noMatch>0</noMatch>
                <repetitions>0</repetitions>
                <InContextMatches>0</InContextMatches>
                <total>0</total>
        </wordCountSummary>
        <jobComments>
                <jobComment>
                        <jobCommentId>2</jobCommentId>
                        <jobCommentContent>asdasdas</jobCommentContent>
                        <jobCommentFiles>
                        </jobCommentFiles>
                </jobComment>
        </jobComments>
        <task_comments>
                <task_comment>
                        <task_comment_id>1</task_comment_id>
                        <task_comment_content>test comment</task_comment_content>
                        <task_comment_files>
                        </task_comment_files>
                </task_comment>
         </task_comments>

</WorkflowInfo>

  • String fetchWorkflowRelevantInfoByJobs(String accessToken, String jobIds)
    • accessToken – the accessToken received from login()
    • jobIds – id of jobs, split by a comma, such as 1005,1006...

This method is used to fetch workflow information from the specified jobs. It returns information on the current workflow, the Wordcount Summary, job comments, and task/activity comments. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<jobs>
        <job>
                 <job_id>1005</job_id>
                 <job_name>2747_0218</job_name>
                 <workflows>
                          <workflow>
                                  <workflow_id>6</workflow_id>
                                  <target_locale>de_DE</target_locale>
                                  <workflow_state>DISPATCHED</workflow_state>
                                  <percentage_completion>0</percentage_completion>
                                  <current_activity>Translation</current_activity>
                                  <estimated_translate_completion_date>10-7-7 上午10时12分48秒 CST</estimated_translate_completion_date>
                                  <estimated_completion_date>10-7-7 上午10时12分48秒 CST</estimated_completion_date>
                                  <workflow_priority>3</workflow_priority>
                                  <word_counts>
                                          <leverage_option>Leverage in context matches</leverage_option>
                                          <match_100_percent>18</match_100_percent>
                                          <match_95_percent-99_percent>33</match_95_percent-99_percent>
                                          <match_85_percent-94_percent>29</match_85_percent-94_percent>
                                          <match_75_percent-84_percent>0</match_75_percent-84_percent>
                                          <no_match>35</no_match>
                                          <repetition>0</repetition>
                                          <in_context_match>0</in_context_match>
                                          <total>115</total>
                                  </word_counts>
                                  <job_comments>
                                          <job_comment>
                                                   <job_comment_id>6</job_comment_id>
                                                   <job_comment_content>test comment</job_comment_content>
                                                   <job_comment_files>
                                                   </job_comment_files>
                                          </job_comment>
                                  </job_comments>
                                  <task_comments>
                                          <task_comment>
                                                   <task_comment_id>1</task_comment_id>
                                                   <task_comment_content>test comment</task_comment_content>
                                                   <task_comment_files>
                                                   </task_comment_files>
                                          </task_comment>
                                  </task_comments>
                          </workflow>
                 </workflows>
        </job>
</jobs>
  • String getWorkflowPath (String accessToken, long workflowId)
    • accessToken – the accessToken received from login()
    • workflowId – the id of workflow

This queries the workflow path with a specified id. An example response XML is:

<?xml version="1.0" encoding="UTF-8" ?>
<workflow>
      <id>5</id>
      <task>
             <id>474</id>
             <name>Translation</name>
             <state>ACTIVE</state>
      </task>
      <task>
             <id>475</id>
             <name>Review</name>
             <state>DEACTIVE</state>
      </task>
</workflow>
  • String createJobGroup(String accessToken, String groupName, String projectName, String sourceLocale)
    • accessToken – the accessToken received from login()
    • groupName – group name for the new group
    • projectName - project name this group should belong to.
    • sourceLocale - source locale this group is based on.

This is used to create a job group object with speficied project and source locale. An example response XML is:

<JobGroup>
   <id>1</id>
   <name>job group name</name>
</JobGroup>
  • String addJobToGroup(String accessToken, String groupId, String jobId)
    • accessToken – the accessToken received from login()
    • groupId – group ID to add job to
    • jobId - job ID to be added to group like "126" or "126,127,128"

This is used to add job into group.

Content export

  • String getJobExportFiles (String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job

This method is used to get the exported files with a specified job name. It returns the file path information and the user can invoke the corresponding methods to get it from GlobalSight server.

The response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<jobFiles>
       <paths>de_DE/testjob/demo/demo_company.html</paths>
       <root>http://127.0.1.1:8080/globalsight/cxedocs/QA</root>
</jobFiles>
  • String getJobExportWorkflowFiles (String accessToken, String jobName, String workflowLocale)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job
    • workflowLocale – the locale of workflow, it can be fr_FR, fr-FR, fr_fr etc. If it is null, all "EXPORTED" workflows' exported files info are returned

The response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<jobFiles>
       <paths>de_DE/testjob/demo/demo_company.html</paths>
       <root>http://127.0.1.1:8080/globalsight/cxedocs/QA</root>
</jobFiles>
  • String exportJob (String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job

This exports all pages for all target locale workflows of the specified job. If the workflows are in the LOCALIZED state, then a full export is performed and segments may be committed to the TM, depending on how the associated translation profile has been configured.

Otherwise, an interim export is performed and the latest versions of the files are simply written out. Files are exported to the default export location. The getLocalizedDocuments() method can also be used to get access to the exported files. The response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<exportStatus>
       <jobName>test job</jobName>
       <workflowLocale>All Locales</workflowLocale>
       <status>Export Request Sent</status>
</exportStatus>

Calls to exportJob() are asynchronous. The method returns quickly, but the actual export duration depends on the complexity of the export.

  • String exportWorkflow (String accessToken, String jobName, String locale)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job locale – the workflow locale to export

This exports all pages for the specified target locale workflow of the specified job. If the workflow is in the LOCALIZED state, then a full export is performed and segments may be committed to the TM, depending on how the associated translation profile has been configured.

Otherwise, an interim export is performed and the latest versions of the files are simply written out. Files are exported to the default export location. The getLocalizedDocuments() method can also be used to get access to the exported files. The response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<exportStatus>
       <jobName>test job</jobName>
       <workflowLocale>fr_FR</workflowLocale>
       <status>Export Request Sent</status>
</exportStatus>

Calls to exportWorkflow () are asynchronous. The method returns quickly, but the actual export duration depends on the complexity of the export.

  • String getLocalizedDocuments(String accessToken, String jobName)
    • accessToken – the accessToken received from login()
    • jobName – the unique name of a job

This returns an XML response containing a URL for each localized target page. These URLs are used to read back the localized versions of the documents sent into GlobalSight for localization. The response XML is in the format:

<?xml version="1.0" encoding="UTF-8" ?>
<localizedDocuments>
         <jobId>180</jobId>
         <jobName>22_390630824</jobName>
         <urlPrefix>http://localhost:8080/globalsight/cxedocs/leo</urlPrefix>
         <targetLocale>zh_CN</targetLocale>
         <targetLocale>fr_FR</targetLocale>
         <targetLocale>de_DE/targetLocale>
</localizedDocuments>
  • String fetchFileForPreview(String accessToken, String jobId, String targetLocaleId, String sourcePageId)
    • accessToken – the accessToken received from login()
    • jobId – the ID of job
    • targetLocaleId – the Id of target Locale
    • sourcePageId – the Id of source page

This method is used to download the exported file in translation for preview purposes. The exported file may be in translation, or have been finished. The file URL in the server is returned, as is the "downloadable". If the file is not downloadable, "exportWorkflow()" or "exportJob()" APIs should be invoked first.

  • String getCommentFiles(String p_accessToken, String p_commentObjectType, String p_jobOrTaskId)
    • accessToken – the accessToken received from login()
    • jobId – the Id of job
    • p_commentObjectType – Indicate job or task type. "J": job; "T": task
    • p_jobOrTaskId – job or task Id to get comment files for

This method is used to download comment files for the specified job or task. The URL of the comment files are returned, and the user can get the comment files via the URL directly without login. The sample XML format returned is:

<?xml version="1.0" encoding="UTF-8"?>
<CommentFilesInformation>
     <WorkObjectId>10</WorkObjectId>
     <ObjectType>job</ObjectType>
     <Comments>
          <Comment>
               <CommentId>1010</CommentId>
               <CommentContent>008</CommentContent>
               <CommentFiles>
                   <CommentFileUrl>http://10.10.211.117:80/globalsight/GlobalSight/CommentReference2/1010/General/1001.txt?companyName=york</CommentFileUrl>
               </CommentFiles>
          </Comment>
     </Comments>
</CommentFilesInformation>
  • String downloadXliffOfflineFile(String accessToken, String taskId)
    • accessToken – the accessToken received from login()
    • taskId – the ID of task

This method is used to download work offline kit as Xliff file format with speicial task from GlobalSight server. It uses below settings as default:

  • File format: Xliff 1.2
  • Editor: Xliff Editor
  • Character Encoding: Default Encoding
  • Placeholder format: Compact
  • Insert resources as: Annotations
  • Allow Edit of Locked Segments: YES
  • Populate 100% Target Segments: True

The package file that contains all files of the work offline kit is stored in the $Docs$/$Company$/workOfflineDownload folder on the GlobalSight server.

The URL for getting the package file as XML is returning after calling it successfully. For example:

<?xml version="1.0" encoding="UTF-8"?>
<offlineFiles>
    http://10.10.215.101:8080/globalsight/cxedocs/QA/workOfflineDownload/testJob_589424576_en_US_de_DE.zip
</offlineFiles>
  • String downloadXliffOfflineFile(String accessToken, String taskId, String lockedSegEditType, boolean isIncludeXmlNodeContextInformation)
    • accessToken – the accessToken received from login()
    • taskId – the ID of task
    • isIncludeXmlNodeContextInformation – if true, segment skeleton will be output as "extradata" of "trans-unit" element for offline reference.
    • lockedSegEditType - setting for "Allow Edit Locked Segments" option when offline download.
  Available values: 1, 2, 3, 4.
  1: Allow Edit of ICE and 100% matches
  2: Allow Edit of ICE matches
  3: Allow Edit of 100% matches
  4: Deny Edit

This method is used to download work offline kit as Xliff file format with speicial task from GlobalSight server. It uses below settings as default:

  • File format: Xliff 1.2
  • Editor: Xliff Editor
  • Character Encoding: Default Encoding
  • Placeholder format: Compact
  • Insert resources as: Annotations
  • Populate 100% Target Segments: True

The package file that contains all files of the work offline kit is stored in the $Docs$/$Company$/workOfflineDownload folder on the GlobalSight server.

The URL for getting the package file as XML is returning after calling it successfully. For example:

<?xml version="1.0" encoding="UTF-8"?>
<offlineFiles>
    http://10.10.215.101:8080/globalsight/cxedocs/QA/workOfflineDownload/testJob_589424576_en_US_de_DE.zip
</offlineFiles>

Documentum support

  • String passDCTMAccount(String accessToken, String docBase, String dctmUserName, String dctmPassword)
    • accessToken – the accessToken received from login()

This method is for Documentum only. The passDCTMAccount() method must be called via HTTPS to start using the web service. The login() method logs into GlobalSight first, then passes on the Documentum username/password and docbase for GlobalSight to check out and check in files to and from the Documentum server.

The Documentum user account returned should be passed on to the subsequent web service calls, which needs user information such as the createDocumnetumJob() or cancelDocumentumJob() method.

  • createDocumentumJob (String accessToken, String jobName, String fileProfileId, String objectId, String userId)
    • accessToken – the accessToken received from login()
    • jobName – the name of a job
    • fileProfileId – the ID of the file profile to be used
    • objectId – the Documentum object ID (a dctm file), read this object to get the translatable content
    • userId – the primary key of a table used to save the DCTM user account

This method creates a job for the Documentum CMS, one Documentum file for one job.

  • cancelDocumentumJob (String accessToken, String objectId, String jobId, String userId)
    • accessToken – the accessToken received from login()
    • objectId – the DCTM document object ID
    • jobId – the GlobalSight job ID
    • userId – the primary key of a table used to save the DCTM user account

This method cancels the Documentum job using objectId and jobId.

  • String getFileProfileInfoEx (String accessToken)
    • accessToken – the accessToken received from login()

This method returns XML containing the file profiles available for importing file-based content into GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8" ?>
<fileProfileInfo>
       <fileProfile>
               <id>1101</id>
               <name>DCMT_XML_FP_1151289606535</name>
               <l10nprofile>73</l10nprofile>
               <sourceFileFormat>7</sourceFileFormat>
               <description>N/A</description>
               <fileExtensionInfo>
                       <fileExtension>xml</fileExtension>
               </fileExtensionInfo>
               <localeInfo>
                       <sourceLocale>en_US</sourceLocale>
                       <targetLocale>zh_CN</targetLocale>
               </localeInfo>
       </fileProfile>
       <fileProfile>
               <id>1304</id>
               <name>DCMT_XML_FP_1152844879860</name>
               <l10nprofile>73</l10nprofile>
               <sourceFileFormat>7</sourceFileFormat>
               <description>N/A</description>
               <fileExtensionInfo>
                       <fileExtension>xml</fileExtension>
               </fileExtensionInfo>
               <localeInfo>
                       <sourceLocale>fr_FR</sourceLocale>
                       <targetLocale>en_US</targetLocale>
               </localeInfo>
       </fileProfile>
</fileProfileInfo>

Translation Memory management

This is available from version 7.1.2 and onwards.

  • String getAllTMProfiles(String accessToken)
    • accessToken – the accessToken received from login(), cannot be null

This method is used to get all TM profiles by current user. It returns XML containing all of the TM profile information. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<TMProfileInformation>
      <TMProfile>
             <id>1004</id>
             <name>tm_pro</name>
             <description>tm_pro des.</description>
             <storageTMName>tm</storageTMName>
             <referenceTMGrp>
                    <referenceTM id="1007">tm</referenceTM>
             </referenceTMGrp>
      </TMProfile>
      <TMProfile>
             <id>1014</id>
             <name>tmpro_york</name>
             <description>tmpro_york description</description>
             <storageTMName>tm_york</storageTMName>
             <referenceTMGrp>
                    <referenceTM id="1013">tm_new</referenceTM>
                    <referenceTM id="1027">tm_york1</referenceTM>
                    <referenceTM id="1014">tm_york2</referenceTM>
             </referenceTMGrp>
      </TMProfile>
</TMProfileInformation>

Required Permissions: Setup >> Translation Memory Profiles (View) >> Get All TM Profiles

  • String saveEntry(String accessToken, String tmProfileName, String sourceLocale, String sourceSegment, String targetLocale,

String targetSegment)

    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of tm profile, cannot be null
    • sourceLocale – the source locale
    • sourceSegment – the source string to be translated
    • targetLocale – the target locale
    • targetSegment – the target string that has been translated

This method is used to save an entry to GlobalSight TM. If the sourceSegment exists, the targetSegment will be added. If the sourceSegment does not exist, the sourceSegment and the targetSegment will be added as a new pair.

The source segment and target segment saved in the database may be different to that entered. You can get saved segments in the XML response. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<entry>
    <sid>sid string</sid>
    <source>
        <locale>en_US</locale>
        <segment>source</segment>
    </source>
    <target>
        <locale>fr_FR</locale>
        <segment>target</segment>
    </target>
</entry>

Sid node is not added if sid is null.

Required Permissions: Setup >> Translation Memory Profiles (View) >> Get All TM Profiles

  • String saveEntry(String accessToken, String tmProfileName, String sid, String sourceLocale, String sourceSegment, String targetLocale, String targetSegment, String escapeString)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • sid – the sid
    • sourceLocale – the source locale
    • sourceSegment – the source string to be translated
    • targetLocale – the target locale
    • targetSegment – the target string that has been translated
    • escapeString – converts all escapable characters into their string (escaped) equivalents or no. The value must be 'true' or 'false', cannot be null

This method is used to save an entry in the GlobalSight TM. If the sourceSegment exists, the targetSegment is added. If the sourceSegment does not exist, the sourceSegment and the targetSegment are added as a new pair.

The source segment and target segment saved in the database may differ from that entered. You can get saved segments from the XML response. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<entry>
    <sid>sid string</sid>
    <source>
        <locale>en_US</locale>
        <segment>source</segment>
    </source>
    <target>
        <locale>fr_FR</locale>
        <segment>target</segment>
    </target>
</entry>

Sid node is not added if sid is null.

Required Permissions: Setup >> Translation Memory Profiles (View) >> Get All TM Profiles

  • String saveEntry(String accessToken, String tmProfileName, String sid, String sourceLocale, String sourceSegment, String targetLocale, String targetSegment, boolean isEscape)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • sid – the sid.
    • sourceLocale – the source locale
    • sourceSegment – the source string to be translated
    • targetLocale – the target locale
    • targetSegment – the target string that has been translated
    • isEscape– converts all escapable characters into their string (escaped) equivalents, or not

This method is used to save an entry in the GlobalSight TM. If the sourceSegment exists, the targetSegment is added. If the sourceSegment does not exist, the sourceSegment and the targetSegments are added as a new pair.

The source segment and target segment saved in the database may be different from that entered. You can get saved segments from the XML response. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<entry>
    <sid>sid string</sid>
    <source>
        <locale>en_US</locale>
        <segment>source</segment>
    </source>
    <target>
        <locale>fr_FR</locale>
        <segment>target</segment>
    </target>
</entry>

Sid node is not be added if sid is null.

Required Permissions: Setup >> Translation Memory (View) >> Create entries in TM

  • String searchEntries (String accessToken, String tmProfileName, String string, String sourceLocale, String escapeString)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • string – the string used to search, cannot be null
    • sourceLocale – the source locale used to search the string.. Searches all locales if it is set to null
    • escapeString – converts all escapable characters to their string (escaped) equivalents or not, the value must be 'true' or 'false', cannot be null

This method returns XML containing the entries that are searched by different matches. The Locale Pair you are searching for must be defined in GlobalSight. The sid node can only be gotten if the sid is not null. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<entries>
  <entry>
         <percentage>100%</percentage>
         <sid>sid string</sid>
         <source>
                <locale>en_US</locale>
                <segment>source_100%</segment>
         </source>
         <target>
                <locale>fr_FR</locale>
                <segment>target_fr_FR</segment>
         </target>
         <target>
                <locale>de_DE</locale>
                <segment>target_de_DE</segment>
         </target>
  </entry>
  <entry>
         <percentage>90%</percentage>
         <source>
                <locale>en_US</locale>
                <segment>source_90%</segment>
         </source>
         <target>
                <locale>fr_FR</locale>
                <segment>target_fr_FR</segment>
         </target>
         <target>
                <locale>de_DE</locale>
                <segment>target_de_DE</segment>
         </target>
   </entry>
</entries>

Sid node is not be added if sid is null.

Required Permissions: Setup >> Translation Memory (View) >> Create entries in TM

  • String searchEntries (String accessToken, String tmProfileName, String string, String sourceLocale)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • string – the string used to search, cannot be null
    • sourceLocale – the source locale used to search the string. Searches all locales if it is set to null

This method returns XML containing the entries that are searched by different matches. The Locale Pair you are searching for must be defined in GlobalSight. The sid node can only be gotten if the sid is not null. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<entries>
  <entry>	    
         <percentage>100%</percentage>
         <sid>sid string</sid>
         <source>
             <locale>en_US</locale>
             <segment>source_100%</segment>
         </source>
         <target>
             <locale>fr_FR</locale>
             <segment>target_fr_FR</segment>
         </target>
         <target>
             <locale>de_DE</locale>
             <segment>target_de_DE</segment>
         </target>
  </entry>
  <entry>
         <percentage>90%</percentage>
         <source>
             <locale>en_US</locale>
             <segment>source_90%</segment>
         </source>
         <target>
             <locale>fr_FR</locale>
             <segment>target_fr_FR</segment>
         </target>
         <target>
             <locale>de_DE</locale>
             <segment>target_de_DE</segment>
         </target>
  </entry>
</entries>

Sid node is not added if sid is null.

Required Permissions: Setup >> Translation Memory (View) >> Create entries in TM

  • String searchEntries (String accessToken, String tmProfileName, String string, String sourceLocale, Boolean escapeString)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • string – the string used to search, cannot be null
    • sourceLocale – the source locale used to search the string. Searches all locales if it is set to null
    • escapeString –converts all escapable characters to their string (escaped) equivalents, or not

This method returns XML containing the entries that are searched by different matches. The Locale Pair you are searching for must be defined in GlobalSight. The sid node can only be gotten if the sid is not null. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<entries>
 <entry>
        <percentage>100%</percentage>
        <sid>sid string</sid>
        <source>
            <locale>en_US</locale>
            <segment>source_100%</segment>
        </source>
        <target>
            <locale>fr_FR</locale>
                <segment>target_fr_FR</segment>
        </target>
        <target>
            <locale>de_DE</locale>
            <segment>target_de_DE</segment>
        </target>
  </entry>
  <entry>
        <percentage>90%</percentage>
        <source>
            <locale>en_US</locale>
            <segment>source_90%</segment>
        </source>
        <target>
           <locale>fr_FR</locale>
                 <segment>target_fr_FR</segment>
        </target>
        <target>
            <locale>de_DE</locale>
            <segment>target_de_DE</segment>
        </target>
  </entry>
</entries>

Sid node is not be added if sid is null.

Required Permissions: Setup >> Translation Memory (View) >> Create entries in TM

  • String tmFullTextSearch(String accessToken, String string, String tmNames, String sourceLocale,String targetLocale, String dateType, String startDate, String finishDate,String companyName)
    • accessToken – the accessToken received from login(), cannot be null
    • string– Search text,can not be empty
    • tmNames– TM name,can not be empty
    • sourceLocale – Source locale,like 'en_US',can not be empty
    • targetLocale – Target locale,like 'de_DE',can not be empty
    • dateType – The type of search by time,like 'create' or 'modify',can be empty
    • startDate – Start time in "yyyyMMdd" format,on this day of all time periods will be included,can be empty
    • finishDate – Finish time in "yyyyMMdd" format,on this day of all time periods will be included,can be empty
    • companyName – Company name.If super user,compay name is subsidiaries name.If not super user,company name is the login user of the company

This method returns XML containing the entries that are searched by different matches. The Locale Pair you are searching for must be defined in GlobalSight. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<segments>
 <sourceLocale>English (United States) [en_US]</sourceLocale>
 <targetLocale>German (Germany) [de_DE]</targetLocale>
 <segment>
        <sourceSegment>We need to setup <bpt i="1" x="1"/>%s<ept i="1"/> with WordPress.com</sourceSegment>
        <targetSegment>Wir müssen <bpt i="1" x="1"/>%s<ept i="1"/> mit WordPress.com einrichten.</targetSegment>
        <sid>N/A</sid>
        <tmName>tm</tmName>
  </segment>
  <segment>
        <sourceSegment>It is really easy to setup via theme customizer.</sourceSegment>
        <targetSegment>Es kann über den Theme-Customizer ganz einfach eingerichtet werden.</targetSegment>
        <sid>N/A</sid>
        <tmName>tm</tmName>
  </segment>	
</segments>

Sid node is not be added if sid is null.

Permission limits in the permission tree: Setup >> Translation Memory (View) >> Search entries in TM

  • String searchEntriesInBatch (String accessToken, Long remoteTmProfileId, Map segmentMap, Long sourceLocaleId, Map btrgLocal2LevLocalesMap, Boolean translatable, Boolean escapeString)

accessToken –the accessToken received from login()

    • remoteTmProfileId – TM profile id on a remote server
    • segmentMap – (OriginalTuvId:Segment) map
    • sourceLocaleId – Source locale ID
    • btrgLocal2LevLocalesMap – (Target locale Id:leverage locales Ids with comma separated) map
    • translatable – True: translatable segments;False:localizable segments
    • escapeString – If escape string

This method returns XML containing the entries that are searched by different matches.

  • void editEntry (String accessToken, String tmProfileName, String orgSid, String newSid, String sourceLocale, String sourceSegment, String targetLocale, String targetSegment)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • orgSid – the original sid
    • newSid – the new sid
    • sourceLocale – the source locale
    • sourceSegment – the source string to be translated
    • targetLocale – the target locale
    • targetSegment – the target string that has been translated

This method is used to edit the specified entry in the GlobalSight TM.

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void editEntry (String accessToken, String tmProfileName, String orgSid, String newSid, String sourceLocale, String sourceSegment, String targetLocale, String targetSegment, Boolean escapeString)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • orgSid – the original sid
    • newSid – the new sid
    • sourceLocale – the source locale
    • sourceSegment – the source string to be translated
    • targetLocale – the target locale
    • targetSegment – the target string that has been translated
    • escapeString – converts all escapable characters to their string (escaped) equivalent, or not

This method is used to edit the specified entry in the GlobalSight TM.

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void editEntry (String accessToken, String tmProfileName, String orgSid, String newSid, String sourceLocale, String sourceSegment, String targetLocale, String targetSegment, String escapeString)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • orgSid – the original sid
    • newSid – the new sid
    • sourceLocale – the source locale
    • sourceSegment – the source string to be translated
    • targetLocale – the target locale
    • targetSegment – the target string that has been translated
    • escapeString – converts all escapable characters to their string (escaped) equivalents, or not. The value must be 'true' or 'false', cannot be null

This method is used to edit the specified entry in the GlobalSight TM.

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void deleteSegment (String accessToken, String tmProfileName, String string, String sourceLocale, String localeToDelete)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • string – the source string, cannot be null
    • sourceLocale – the source locale of the string, cannot be null
    • localeToDelete – the locale of the segment to be deleted. If it is set to null or the source locale, the entire entry including the source segment and all the target segments are deleted from the GlobalSight TM

This method is used to delete a segment or an entire entry from the GlobalSight TM.

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void deleteSegment (String accessToken, String tmProfileName, String string, String sourceLocale, String localeToDelete,

Boolean escapeString)

    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • string – the source string, cannot be null
    • sourceLocale – the source locale of the string, cannot be null
    • localeToDelete – the locale of the segment to be deleted. If it is set to null or the source locale, the entire entry including the source segment and all the target segments are deleted from GlobalSight TM
    • escapeString –converts all escapable characters to their string (escaped) equivalents, or not

This method is used to delete a segment or an entire entry from the GlobalSight TM.

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void deleteSegment (String accessToken, String tmProfileName, String string, String sourceLocale, String localeToDelete, String escapeString)
    • accessToken – the accessToken received from login(), cannot be null
    • tmProfileName – the name of the TM profile, cannot be null
    • string – the source string, cannot be null
    • sourceLocale – the source locale of the string, cannot be null
    • localeToDelete – the locale of the segment to be deleted. If it is set to null or the source locale, the entire entry including the source segment and all the target segments are deleted from the GlobalSight TM
    • escapeString – converts all the escapable characters to their string (escaped) equivalents, or not. The value must be 'true' or 'false', cannot be null

This method is used to delete a segment or an entire entry from the GlobalSight TM.

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void getFirstTu (String accessToken, String tmName, String companyName, String sourceLocale, String targetLocale)

This is available in GlobalSight version 7.1.4.0 and onwards.

    • accessToken – the accessToken received from login(), cannot be null
    • tmName – the name of the TM, cannot be null
    • companyName – the name of the company, cannot be null
    • sourceLocale – the source locale, cannot be null
    • targetLocale – the target locale. Searches all locales if it is set to null

This method gets the first translation unit (TU) with the source locale and the target locale in the specified TM. An example XML response is:

<tu tuid="1000" datatype="plaintext">
<prop type="x-sourcetmname">tm</prop>
<prop type="x-idiom-tm-uda-SID">sid string</prop>
<tuv xml:lang="EN-US" creationdate="20090519T092145Z" creationid="gscpm" >
<prop type="x-creationproject">Template</prop>
<seg>source tuv</seg>
</tuv>
<tuv xml:lang="FR-FR" creationdate="20090519T092653Z" creationid="canyone" >
<prop type="x-creationproject">Template</prop>
<seg>target tuv</seg>
</tuv>
</tu>

Required Permissions: Setup >> Translation Memory (View) >> Search entries in TM

  • void nextTus (String accessToken, String tmName, String companyName, String sourceLocale, String targetLocale, String maxSize, String tuIdToStart)

This is available in GlobalSight version 8.5.1 and onwards to replace the old one since 7.1.4.0 version.

    • accessToken – the accessToken received from login(), cannot be null
    • tmName – the name of the TM, cannot be null
    • companyName – the name of the company, cannot be null
    • sourceLocale – the source locale, cannot be null
    • targetLocale – the target locale. Searches all locales if it is set to null
    • maxSize - The maximum size of the return TUs
    • tuIdToStart- The ID of the TU, cannot be null before the first TU

This method is used to return next TUs. An example XML response is:

<tu tuid="1001" datatype="plaintext">
<prop type="x-sourcetmname">tm</prop>
<prop type="x-idiom-tm-uda-SID">sid string</prop>
<tuv xml:lang="EN-US" creationdate="20090519T085727Z" creationid="gscpm" >
<prop type="x-creationproject">Template</prop>
<seg>source tuv 1001</seg>
</tuv>
<tuv xml:lang="FR-FR" creationdate="20090519T102503Z" creationid="canyone" >
<prop type="x-creationproject">Template</prop>
<seg>target tuv 1001</seg>
</tuv>
</tu>
<tu tuid="1002" datatype="plaintext">
<prop type="x-sourcetmname">tm</prop>
<tuv xml:lang="EN-US" creationdate="20090519T085727Z" creationid="gscpm" >
<prop type="x-creationproject">Template</prop>
<seg>source tuv 1002</seg>
</tuv>
<tuv xml:lang="FR-FR" creationdate="20090519T102338Z" creationid="canyone" >
<prop type="x-creationproject">Template</prop>
<seg>target tuv 1001</seg>
</tuv>
</tu>

Required Permissions: Setup >> Translation Memory (View) >> Search entries in TM

  • void editTu (String accessToken, String tmName, String companyName, String tmx)

This is available in GlobalSight version 8.5.1 and onwards to replace the old one since 7.1.4.0.

    • accessToken – the accessToken received from login(), cannot be null
    • tmName – the name of the TM, cannot be null
    • companyName – the name of the company, cannot be null
    • tmx – A TMX format string including all TU information, cannot be null

This method is used to edit a TU. An example TMX is:

<tu tuid="1001" datatype="plaintext">
<prop type="x-sourcetmname">tm</prop>
<tuv xml:lang="EN-US" creationdate="20090519T085727Z" creationid="gscpm" >
<prop type="x-creationproject">Template</prop>
<seg>source tuv 1001 changed</seg>
</tuv>
<tuv xml:lang="FR-FR" creationdate="20090519T102503Z" creationid="canyone" >
<prop type="x-creationproject">Template</prop>
<seg>target tuv 1001 changed</seg>
</tuv>
</tu>

Required Permissions: Setup >> Translation Memory (View) >> Edit entries in TM

  • void uploadTmxFile(String accessToken, String fileName, String tmName, byte[] contentsInBytes)
    • accessToken – the accessToken received from login()
    • fileName – File name uploaded to the server
    • tmName – project TM name to upload to
    • contentsInBytes – TMX file contents in byte[]

This method is used for uploading TMX files to the server.

  • void importTmxFile(String accessToken, String tmName, String syncMode)
    • accessToken – the accessToken received from login()
    • tmName – Project TM name to import the TMX files to
    • syncMode – Synchronization options : merge, overwrite, and discard. The default is merge

This method is used for importing TMX files into specified project TM.

  • String exportTM(String accessToken, String tmName, String languages, String startDate, String finishDate, String exportFormat, String exportedFileName)
    • accessToken – the accessToken received from login()
    • tmName - TM name to export,can not be empty
    • languages - languages to export like "de_DE,fr_FR" or "fr_FR" or empty. If empty, export all languages.
    • startDate - start time in "yyyyMMdd" format,on this day of all time periods will be included, can not be empty.
    • finishDate - finish time in "yyyyMMdd" format,on this day of all time periods will be included, can be null, if null, use current time.
    • exportFormat - export file formats: "GMX" and "TMX1.4b".
    • exportedFileName - specified file name, if empty, use GlobalSight default name like "tm_export_n.tmx" or "tm_export_n.xml".

This method is used to export TM. It returns an identify key which is used to locate the exported file for downloading. Call this method first, then call "getTmExportStatus()" API in loop until exporting is finished.

  • String getTmExportStatus(String accessToken, String identifyKey)
    • accessToken – the accessToken received from login()
    • identifyKey - identifyKey to help locate where the export file is.

This method is used to check TM export status. Before this, should call "exportTM()" API to start TM export progress, and receive an identify key. Available vaules for "status" are "failed", "inprogress" and "finished". The "url" has value only when "finished". When the "status" is "finished", can retrieve to get the wanted TM data file.

<?xml version="1.0" encoding="UTF-8"?>
<exportStatus>
    <status>failed|inprogress|finished</status>
    <url>http://w10.globalsight.com:8080/globalsight/DownloadTM/allie/GlobalSight/TmExport/846048690/file_name.zip</url>
</exportStatus>

Term Base management

This is available in version 7.1.2 1 and onwards.

  • String getAllTermbases(String accessToken)
    • accessToken – the accessToken received from login(), cannot be null

This method is used to get all TBs from GlobalSight. It returns XML containing all TB information. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<TermbaseInformation>
      <Termbase>
            <id>termbase id 1</id>
            <name>termbase name 1</name>
            <description>termbase description</description>
            <companyName>company name</companyName>
      </Termbase>
      <Termbase>
            <id>termbase id 2</id>
            <name>termbase name 2</name>
            <description>termbase description</description>
            <companyName>company name</companyName>
      </Termbase>
</TermbaseInformation>

Required Permissions: Setup >> Terminology (View) >> Get all termbases

  • void saveTBEntry(String accessToken, String termbaseName, String sourceLocale, String sourceTerm, String targetLocale, String targetTerm)
    • accessToken – the accessToken received from login(), cannot be null
    • termbaseName - The name of the termbase, cannot be null
    • sourceLocale - The source locale to save, cannot be null
    • soureTerm - The source term content to be added, cannot be null
    • targetLocale - The target locale to save, cannot be null
    • targetTerm - The target term content to be added

This method is used to one entry to the TB. All parameters cannot be null. If the TB entry to be saved exists, then edit the target term according to the source term.

Required Permissions: Setup >> Terminology (View) >> Create entries in termbase

  • String searchTBEntries(String accessToken, String termbaseName, String searchString, String sourceLocale, String targetLocale, double matchType)
    • accessToken – the accessToken received from login()
    • termbaseName - the termbase name to search in. Can be null, which searches all termbases
    • searchString - the string to be to sear search with
    • sourceLocale - the source locale that the search string will be searched in
    • targetLocale - search for this locale, can be null. If null, all matching language/terms are returned
    • matchType - 1:exact matching search; 2:fuzzy matching search, return LIKE search results

This method is used to search terms in specified termbase or in all termbases. An XML example response is:

<?xml version="1.0" encoding="UTF-8"?>
<tbEntries>
        <tbEntry>
                <tbName>termbase name</tbName>
                <term>
                      <lang_name>English</lang_name>
                      <termContent>contents in English</termContent>
                </term>
        </tbEntry>
        <tbEntry>
                <tbName>termbase name</tbName>
                <term>
                      <lang_name>Chinese</lang_name>
                      <termContent>中文内容</termContent>
                </term>
        </tbEntry>
</tbEntries>

Required Permissions: Setup >> Terminology (View) >> Search entries in termbase

  • void editTBEntry(String accessToken, String termbaseName, String sourceLocale, String soureTerm, String targetLocale, String targetTerm)
    • accessToken – the accessToken received from login(), cannot be null
    • termbaseName - the termbase name to create the entry in. Not null
    • sourceLocale - the source locale to be searched in. Not null
    • sourceTerm - the source term to be used to search the source contents. Not null. TargetLocale - the target Locale to be edited. Not null
    • targetTerm - the target term to replace the old term content for p_targetLocale;

This method is used to edit one term in specified TB.

Permission limits in permission tree: Setup >> Terminology (View) >> Edit entries in termbase

  • void deleteTBEntry(String accessToken, String termbaseName, String searchString, String sourceLocale, String targetLocale)
    • accessToken – the accessToken received from login()
    • termbaseName - the termbase name to delete the entry from
    • searchString – the search string of p_sourceLocale
    • sourceLocale - the source locale to search for the term to be deleted. TargetLocale - the target Locale to be deleted. Can be null. If null, all terms located by searchString and sourceLocale are deleted. This method is used to delete specified term(s) from the TB

Required Permissions: Setup >> Terminology (View) >> Edit entries in termbase

CVS support

This is available in version 7.1.2 1 and onwards.

  • String getSourceLocales (String accessToken)
    • accessToken – the accessToken received from login(), cannot be null

This gets all source locales associated with the current user. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<root>
       <locale>
              <id>32</id>
              <name>English (United States) [en_US]</name>
       </locale>
…
</root>
  • String getTargetLocales (String accessToken, String sourceLocale)
    • accessToken – the accessToken received from login(), cannot be null
    • sourceLocale – the source locale specified in a role

This gets the target locales that are associated with the specified source locale. An example XML response is:

<?xml version="1.0" encoding="UTF-8"?>
<root>
       <locale>
              <id>25</id>
              <name>German (Germany) [de_DE]</name>
       </locale>
       <locale>
              <id>41</id>
              <name>Spanish (Spain) [es_ES]</name>
       </locale>
</root>
  • String getConnection (String accessToken)
    • accessToken – the accessToken received from login(), cannot be null

This method returns the URL for connecting to the database. An example string response is:

jdbc:mysql://localhost:3306/globalsight?useUnicode=true&characterEncoding=UTF-8,globalsight,password

Report Management

This is available in version 8.5.9 and onwards.

  • String generateTranslationEditReport(String accessToken, String jobId, String targetLocale)
    • accessToken – the accessToken received from login(), cannot be null
    • jobId - job ID to get report
    • targetLocale - target locale like "zh_CN"(case insensitive).

This is used to get translation edit report for specified job and locale. An example response is: http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/TranslationsEditReport/20140219/TranslationsEditReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx

  • String generateCharacterCountReport(String accessToken, Sring jobIds, String targetLocales)
    • accessToken – the accessToken received from login(), cannot be null
    • jobIds - job IDs like "11,13,45".
    • targetLocales - target locales like "fr_FR,zh_CN"(case insensitive).

This is used to get character count report for specified jobs and locales. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/CharacterCountReport/20140219/CharacterCountReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx" or "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/CharacterCountReport/20140219/GSReports1416985676460.zip".

  • String generateReviewersCommentReport(String accessToken, String jobIds, String targetLocales, boolean includeCompactTags)
    • accessToken – the accessToken received from login(), cannot be null
    • jobIds - job IDs to get report
    • targetLocales - target locale like "fr_FR,zh_CN"(case insensitive).
    • includeCompactTags - if true, source and target segments will have compact tags information. Otherwise, just pure text.

This is used to get Reviewers Comment Report for specified jobs and locales. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentReport/20140219/CharacterCountReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx" or "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentReport/20140219/GSReports1416985676460.zip".

  • String generateReviewersCommentSimplifiedReport(String accessToken, String jobIds, String targetLocales, boolean includeCompactTags)
    • accessToken – the accessToken received from login(), cannot be null
    • jobIds - job IDs to get report
    • targetLocales - target locale like "fr_FR,zh_CN"(case insensitive).
    • includeCompactTags - if true, source and target segments will have compact tags information. Otherwise, just pure text.

This is used to get Simplified Reviewers Comment Report for specified jobs and locales. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentSimplifiedReport/20140219/CharacterCountReport-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx" or "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/ReviewersCommentSimplifiedReport/20140219/GSReports1416985676460.zip".

  • String generateDITAQAReport(String accessToken, String taskId)
    • accessToken – the accessToken received from login(), cannot be null
    • taskId - task ID to get DITA QA report

This is used to get DITA QA checks report. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/$$companyName$$/GlobalSight/Reports/DITAQAChecksReport/914/zh_CN/ditaTranslation1_6315/DITAQAChecksReport-Job Name-zh_CN-20141212 125403.xlsx".

  • String generateQAChecksReport(String accessToken, String taskId)
    • accessToken – the accessToken received from login(), cannot be null
    • taskId - task ID to get QA report

This is used to get QA checks report. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/QAChecksReport/1036/de_DE/GSPM1_375/QAChecksReport_a_413186725_GSPM1-de_DE.xlsx".

  • String generatePostReviewQAReport(String accessToken, String jobId, String targetLocale)
    • accessToken – login user's token
    • jobId - job ID to get report
    • targetLocale - target locale. eg "zh_CN"(case insensitive)

This is used to get post review QA report. A sample response is like "http://10.10.215.21:8080/globalsight/DownloadReports/yorkadmin/PostReviewQAReport/20140219/PRR-(jobname_492637643)(337)-en_US_zh_CN-20140218_162543.xlsx".

GlobalSight web service WSDL

The GlobalSight Web Service WSDL (Web Services Description Language) is too long to display in this document. To see the WSDL in full, go to the following URL on your GlobalSight server:

  • http://<server>:<port>/globalsight/services/AmbassadorWebService?wsdl

References

For more information, see: