Difference between revisions of "GlobalSight Web Services API"

From Globalsight
Jump to navigation Jump to search
(References)
 
m (1 revision)
(No difference)

Revision as of 04:39, 14 October 2014

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

  • String getFileProfileInformation(String accessToken)
    • 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:

<?xml version="1.0" encoding="UTF‐8" ?>
<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)
    • 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 - 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.
    • fileProfileIds – each file may select a file profile. The ids of the file profiles are added to a vector
    • targetLocales –the target locales to be created when creating this job. The default is all target

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 - 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.
    • fileProfileIds – each file may select a file profile. The IDs of the file profiles are added to a vector
    • targetLocales –the target locales to be created when creating this job. The default is all targets

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 - 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.
      • fileProfileIds – each file may select a file profile. The IDs of the file profiles are added to a vector
      • targetLocales –the target locales to be created when creating this job. The default is all targets
      • 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 - 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.
    • fileProfileIds – each file may select a file profile. The IDs of the file profiles are added to a vector
    • targetLocales –the target locales to be created when creating this job. The default is all targets
    • 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 - this job may include more than one file. The paths of the files are added to a vector
    • fileProfileIds – each file may select a file profile. The ids of the file profiles are added to a vector
    • targetLocales – the target locales to be created when creating this job. The default is all targets
    • 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().

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>
        </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>
               </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, String p_taskAcceptor)
    • 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_rejectorUserId, 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".

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 – Invalid user password
4 – Invalid first name
5 – Invalid last name
6 – Invalid email address
7 – Invalid permission groups
8 – Invalid company name
9 – Invalid project information 
10 – Invalid role information 
-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 or user is not exist.
3 – Invalid user password
4 – Invalid first name
5 – Invalid last name
6 – Invalid email address
7 – Invalid permission groups
8 – Invalid company name
9 – Invalid project information 
10 – Invalid role information 
11 – User does not exist
-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 IN_QUEUE.

  • 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>
        <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>
                      <subLevRepetition>0</subLevRepetition>
                      <subLevMatch>100</subLevMatch>
                      <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. An example response XML using the getJobsByTimeRange() method is:

  • 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>
                 <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 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 jobsReassign(String accessToken, String workflowId, String targetLocale, String[] users)
    • accessToken – the accessToken received from login()
    • workflowId – workflow ID to be skipped
    • targetLocale – target locale of the workflow to be reassigned
    • 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.

  • 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>
                <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>
                <wordcount>106</wordcount>
                <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>
                              <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>
                <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>
                <wordcount>106</wordcount>
                <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>
                              <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>
                <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>
                <wordcount>106</wordcount>
                <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>
                              <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>

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

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 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:

<?xml version="1.0" encoding="UTF-8" ?>
<fileProfileInfo>
       <fileProfile>
               <id>1101</id>
               <name>DCMT_XML_FP_1151289606535</name>
               <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>
               <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</sourceLocale>
                <segment>source_100%</segment>
         </source>
         <target>
          <locale>fr_FR</sourceLocale>
                <segment>target_fr_FR</segment>
         </target>
         <target>
          <locale>de_DE</sourceLocale>
                <segment>target_de_DE</segment>
         </target>
  </entry>	
  <entry>	    
         <percentage>90%</percentage> 
         <source>
          <locale>en_US</sourceLocale>
                <segment>source_90%</segment>
         </source>	  
         <target>
          <locale>fr_FR</sourceLocale>
                <segment>target_fr_FR</segment>
         </target>
         <target>
          <locale>de_DE</sourceLocale>
                <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</sourceLocale>
                 <segment>source_100%</segment>
          </source>
          <target>
           <locale>fr_FR</sourceLocale>
                 <segment>target_fr_FR</segment>
          </target>
          <target>
           <locale>de_DE</sourceLocale>
                 <segment>target_de_DE</segment>
          </target>
  </entry>	
  <entry>	    
         <percentage>90%</percentage> 
          <source>
            <locale>en_US</sourceLocale>
                 <segment>source_90%</segment>
          </source>	  
          <target>
            <locale>fr_FR</sourceLocale>
                 <segment>target_fr_FR</segment>
          </target>
          <target>
            <locale>de_DE</sourceLocale>
                 <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</sourceLocale>
                <segment>source_100%</segment>
         </source>
         <target>
          <locale>fr_FR</sourceLocale>
                <segment>target_fr_FR</segment>
         </target>
         <target>
          <locale>de_DE</sourceLocale>
                <segment>target_de_DE</segment>
         </target>
  </entry>	
  <entry>	    
         <percentage>90%</percentage> 
          <source>
           <locale>en_US</sourceLocale>
                 <segment>source_90%</segment>
          </source>	  
          <target>
           <locale>fr_FR</sourceLocale>
                 <segment>target_fr_FR</segment>
          </target>
          <target>
           <locale>de_DE</sourceLocale>
                 <segment>target_de_DE</segment>
          </target>
  </entry>
</entries>

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 sourceLocale, String targetLocale, String maxSize, String tuId)

This is available in GlobalSight version 7.1.4.0 and onwards.

    • accessToken – the accessToken received from login(), 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
    • tuId - 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:

<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 tmx)

This is available in GlobalSight version 7.1.4.0 and onwards.

    • accessToken – the accessToken received from login(), 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.

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

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: