P-TMS REST API

About #

This is the reference for the P-TMS Cloud REST API. This API is the primary way to access your projects and files in P-TMS, whether you are developing an app or any other integration. Use it to interact with P-TMS entities, like Projects, Files, Translation Memory, Users and more.

Authentication and authorization

Authentication: P-TMS REST API supports basic auth.

See Security overview for more details on authentication and authorization.

Status codes

The Confluence REST API uses the standard HTTP status codes.

Responses that return an error status code will also return a response body, similar to the following:

                                
                                    { "statusCode": 404, 
                                    "data": { "authorized": false, 
                                              "valid": false, 
                                              "errors": [ 
                                                 { "message": { "translation": "This is an example error message.", 
                                                                 "args": [] 
                                                             } 
                                                 } ], 
                                              "successful": false 
                                         }, 
                                     "message": "This is an example error message." 
                                 }
                                
                             
                            
Using the REST API

Expansion: The P-TMS REST API uses resource expansion: some parts of a resource are not returned unless explicitly specified. This simplifies responses and minimizes network traffic.

                            
                                GET /wiki/rest/api/content/{id}?expand=space,metadata.labels
                            
                         
                        

Project#

Get Projects

GET /api/v1/project

Returns all projects accessible to user. This contains information about projects like name, created date, target date, status, progress percentage and individual task status.

Create Project

POST /api/v1/project

Returns all projects accessible to user. This contains information about projects like name, created date, target date, status, progress percentage and individual task status.

Get Project by ID

GET /api/v1/project/{id}

Return a single project detail object for the given id.

Get Project by ID

GET /api/v1/project/{id}

Return a single project detail object for the given id.

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the project to be returned. If you don't know the project ID, use GET PROJECT and filter the results.

Update Project

PUT /api/v1/project/{id}

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the project to be updated. If you don't know the project ID, use GET PROJECT and filter the results.

Delete Project

DELETE /api/v1/project/{id}

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the project to be deleted. If you don't know the project ID, use GET PROJECT and filter the results.


FILE#

Get File

GET /api/v1/file

Returns all files accessible to user. This contains information about file like name, created date, target date, status, progress percentage, individual task status, project id, Source and target language, no of words and more.

Create Project

POST /api/v1/project

Creates a new file in P-TMS project

Get Project by ID

GET /api/v1/project/{id}

Return a single file detail object for the given id.

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the file to be returned. If you don't know the file ID, use GET FILE and filter the results.

Delete Project

DELETE /api/v1/project/{id}

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the file to be deleted. If you don't know the file ID, use GET FILE and filter the results.


TM (Translation Memory)#

Get TM

GET /api/v1/TM

Returns all TMs accessible to user. This contains information about TM like name, created date, Source and target language, no of words and more.

Create TM

POST /api/v1/TM

Creates a new TM in P-TMS.

Get TM by ID

GET /api/v1/TM/{id}

Return a single TM detail object for the given id.

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the TM to be returned. If you don't know the TM ID, use GET TM and filter the results.

Delete TM

DELETE /api/v1/TM/{id}

Request

PATH PARAMETERS

id - REQUIRED

string

The ID of the TM to be deleted. If you don't know the TM ID, use GET TM and filter the results.


Translate#

GET translation for string

GET api/v1/translation

Request

PATH PARAMETERS

sourceLang - REQUIRED

string

Language code for source Language.

targetLang - REQUIRED

string

Language code for target Language.

text - REQUIRED

string

Text to be translated.