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 12d Synergy Client and generate a PAT to use in the RESTful API.
1.1. How to Create a Personal Access Token (PAT)
To be able to create a PAT, your 12d Synergy Administrator must have the following system setting set to Yes.
12d Synergy Administration application > System Settings tab > Web section in the table (or Search for PAT) > Creation and Authentication of Personal Access Tokens setting.
If this setting is set to No, then the Personal Access Tokens tab is not displayed in the Profile window of the 12d Synergy Client and Web applications.
In the 12d Synergy Client application > Window menu option > My Profile option.
The My Profile window is displayed.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.Note that you can access this token only from this window. Hence, ensure to copy it using the Copy
button and save it a safe place before you close this window.
The token is created and you can view it in the Personal Access Tokens tab. However, you cannot view the token values in this tab.
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.