Salesforce

WorldServer - How to search projects using the REST API - endpoints.

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer 11.6.x,11.7.x
Symptoms/Context
This article points particularly searching for projects using REST API - endpoints
Resolution
Here the Postman API client has been used as an API tool that you have to download and Install.

Postman API Client - Send Requests and View Responses, Create and execute any REST queries from within Postman.

Send any type of request in Postman. Create and save custom methods and send requests with the following body types:

Below is the link where you can get the details of endpoints available in WorldServer.

Rest API Endpoints

The collection contains the following operations:
1.    Login
2.    Info
3.    Get Project Type
4.    Get Locales By Client Id
5.    Get Project Group Details
6.    Get Project Group Scoping
7.    Get Project Details
8.    Get Project Scoping
9.    Get Project Task Details
10.    Get Project Type Attributes
11.    Get Client Details
12.    Get Users
13.    Get Project Types
14.    Upload File
15.    Create Project Group
16.    Complete Task
17.    Download File


In order to run this operation, you need the WorldServer API collection and Postman.

--> /Login

With this operation, you can validate that the connection details are correct.

If this operation doesn’t work, depending on the error message you need to check again the connection details (username, password).

For Login operation you need the following details:

-    Username – this can be your account or customer account
-    Password
-    URL can be for staging(https://worldserver-URL/ws-api/v1/login)
-    the URL can be added in the collection following the next steps:

1. Right-click on the collection -> Edit

2. Select Tab Variables and replace the URL in tab apiUrl

After adding the URL here you will see in the operations {{apiUrl}} and if you highlight that you will observe your URL.

When you press Send it will generate a sessionId which will be used for the rest of the operations.

For WorldServer 11.6.x version you have to use v1 in the URL https://worldserver-URL/ws-api/v1/login

Also, if v1 doesn't work you have to use v2

Note: For WorldServer 11.7 version you have to use v2 in the URL https://worldserver-URL/ws-api/v2/login
To know more: Please click here

Login

Body
Type: application/json
 
{
  "username":"your-username",
  "password":"your-password"
}



Password Json body

Response : "sessionId": "40578836"

For running this operation you need the sessionId from the login operation which need to be added on Headers tab under Token value.

-->/projectGroups

Under the project groups, we can see the search endpoint where we can search for a particular word in the project by sending the below JSON response in the body.

https://worldserver-URL/ws-api/v1/projectGroups/search

Body

Type: application/json

 
[
    {
        "field": "translatedProgress",
        "type": "PERCENTAGE",
        "criterion": {
            "max": "0.5"
        }
    },
    {
        "field": "name",
        "type": "TEXT",
        "criterion": {
            "value": "test"
        }
    }
]

 
Root Cause
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by