We recommend using Personal Access Tokens (PATs) for authentication.
PATs provide stronger security, easier token management, and better compatibility with modern systems.
This tutorial shows how to log in to the web client and generate PAT to use in the RESTful API.
1.1. How to Generate a PAT
In the 12d Synergy Administration application, select the System Settings tab > General tab.
Search for the Creation and Authentication of Personal Access Tokens setting and set its value to Yes.
Log in to the 12d Synergy Web application and click the Profile
icon and select the Profile option.
Click the Personal Access Tokens tab.
Click the Create New PAT
button.
The Create new Personal Access Token prompt is displayed.Enter a name for the token you are about to generate in the Token Name field.
Enter the number of days after which the token would expire in the Expire in days field.
The Generate button is now activated.
Click the Generate button.
A token is generated and is displayed below the details you have entered.You can access this token only from this window. Hence, ensure to copy it using the Copy
button and save it to a safe place before you close this window.
1.2. How to use the PAT
The PAT should be added in the Authorization of each request sent as a Bearer token.
Sample Request (Finding jobs by name)
curl --location 'https://{your-server-here}/api/v1/jobs/?name=test&page=1&page_size=20' \
--header 'Authorization: Bearer {your-personal-access-token-here}' \
--header 'Content-Type: application/json'
Click in the line below to see the code.
Sample Response
{
"PageNumber": 1,
"PageSize": 20,
"TotalRows": 1,
"TotalPages": 1,
"Result": [
{
"ID": {
"_id": 1,
"_server_id": 1,
"_server_guid": "b993c729-bf98-490c-989d-5621e332229",
"IDString": "1_1"
},
"Name": "Test",
"Description": "",
"JobCreatorName": "",
"CreatedDate": "2024-12-17T22:51:58.097",
"NoOfChildren": 0,
"NoOfFolders": 28,
"NoOfTDJobs": 0,
"InheritPermissions": true,
"InheritFileNamingRules": false,
"AlwaysDisplayParent": false,
"DeleteLocked": false,
"Type": "Normal",
"CreatorID": {
"_id": 1,
"_server_id": 1,
"_server_guid": "b993c729-bf98-490c-989d-5621e3b48149",
"IDString": "1_1"
},
"ParentJobID": null,
"Attributes": [],
"JobItems": null,
"NoOfNotes": 0,
"Path": "Test",
"EntityObject": {
"parent_project_id": null,
"creator_name": "",
"num_children": 0,
"num_folders": 28,
"num_td_projects": 0,
"inherit_permissions": true,
"always_display_parent": false,
"rule_set": null,
"inherits_file_naming_rules": false,
"delete_locked": false,
"cad_publish_output_path": null,
"customisation_info": null,
"id": {
"_id": 1,
"_server_id": 1,
"_server_guid": "b993c729-bf98-490c-989d-5621e3b41139",
"IDString": "1_1"
},
"name": "Test",
"create_date": "2024-12-17T22:51:58.097",
"creator_id": {
"_id": 1,
"_server_id": 1,
"_server_guid": "b993hm29-bf98-490c-949d-5621e3b48139",
"IDString": "1_1"
},
"attributes": [],
"description": "<HTML><HEAD>\r\n<META name=GENERATOR content=\"MSHTML 11.00.10570.1001\"></HEAD>\r\n<BODY></BODY></HTML>",
"type": 0
}
}
]
}
Once the sample request above is sent with the proper token, it will receive a response similar to the one above.
For v6 clients
You can create, delete, and view tokens in the 12d Synergy Client application also. Select the Window menu option > My Profile option > Personal Access Tokens tab.