Table of Contents

SOLIDWORKS Manage connector

Available in PDMShell 4.1.60 and newer.

Use manage to call the Manage API from a PDMShell script, including scripts triggered by a PDM workflow event. Supported operations include license lookup, authentication, record and related-file queries, record-field updates, and JSON file uploads. Use the endpoint examples for the documented method, query parameters and body.

For a method, request template and example for each operation, see the complete 97-endpoint reference, including related-file and document uploads.

Configure the connection

  1. Connect PDMShell to the vault used by the automation.
  2. Open Settings > Connectors > Configure Manage…, or run manage -configure in the desktop console.
  3. Enter the API base URL, including its API prefix, such as https://manage.example.com/api/.
  4. Enter the Manage username, password and license ID, or an existing Authorization token. An entered token overrides username/password authentication. The optional PDM access token is sent as Pdm-Access-Token.
  5. Choose Save to vault.

Configuration requires the PDM administrative permission to Edit add-ins. The server URL and license ID are shared in the vault. Credentials are encrypted for the Windows user and machine, and bound to the vault and server URL. Configure credentials using the Windows account that will run the script; another user's saved credentials cannot be reused by a task host. Executing requests uses the Manage account's server permissions.

You can save just the URL first, then discover available license IDs:

manage -endpoint Authentication/License -select "$[*].id" -variable LicenseIds -many

License lookup needs no authentication. For other endpoints, the connector calls Authentication/Authenticate when no Authorization token is configured. Authentication uses a POST with URL-encoded username, password and licenseId query parameters; use HTTPS and configure server/proxy logs to omit credential-bearing query strings. Tokens are sent exactly as returned or entered, without automatically adding Bearer.

Read records and select response values

Save this as C:\Scripts\records-query.json, replacing the sample object ID with the customer's object ID:

{
  "Object_ID": 42,
  "show_all": true
}
manage -endpoint Objects/ObjectRecords -queryFile "C:\Scripts\records-query.json" -select "records[0].record_guid" -variable RecordGuid

-select is a JSONPath into the response. Use ${global.RecordGuid} in later commands or JSON template string values. Without -select, the complete response is returned. The endpoint is relative to the configured API base URL; put query parameters in a JSON object passed through -queryFile.

Selection Result
records[0].record_guid First record's GUID as a string.
records[*].record_id All matching IDs; one match is scalar, multiple matches form a JSON array.
records[*].record_id -many Always a JSON array, including one match.
$[*].id -many IDs from a response whose root is an array, such as license lookup.
records The entire records array, including an empty array.
manage -endpoint Objects/ObjectRecords -queryFile "C:\Scripts\records-query.json" -select "records[*].record_id" -variable RecordIds -many

RecordIds contains JSON text such as [11,12]; it is not an implicit loop. A selection with no matches fails. A selected empty array remains []. The destination variable is removed before execution and stays unset on failure, so later script steps cannot accidentally use an older result. Stop or branch on command failure before continuing a workflow.

Update record fields

Save this as C:\Scripts\update-record.json:

{
  "object_id": 42,
  "record_guid": "${global.RecordGuid}",
  "fields": [
    { "key": "CustomerFieldSystemName", "value": "${global.ReleaseNote}" }
  ]
}
setglobal -name ReleaseNote -value "Released from PDM"
manage -endpoint PropertyCard/UpdateRecord -method POST -bodyFile "C:\Scripts\update-record.json"

Use actual Manage field system names and the value types required by that endpoint. A template is parsed as JSON before string values are expanded, so quotes and line breaks in a value remain data. Numbers and booleans written in the template retain their JSON types; a placeholder inside a JSON string remains a string. For file-specific PDM values, first capture the value in a session global in the script's file context, then reference that global in the template. JSON keys are not expanded.

Updating a record field is not necessarily a Manage workflow/status transition. Obtain the documented status-change endpoint, required fields and permitted transition for the customer's Manage version before automating that action. The connector does not guess a transition endpoint or treat a display status field as a workflow action.

For Objects/RelatedFiles, use a query file containing object_id and record_id. The response can be a root array with nested related arrays; folder entries have is_folder: true and their own file_id.

Save the target metadata as C:\Scripts\upload-target.json:

{
  "object_id": 42,
  "record_id": 11,
  "file_structure_id": -42
}
manage -endpoint File/AddRelatedFileToFolder -method POST -bodyFile "C:\Scripts\upload-target.json" -upload "C:\Exports\released.pdf"

Use the actual related-folder ID from Manage. The connector adds file_name and a base64 file value, then sends application/json. Sending a raw PDF as application/pdf is a different request format and can be rejected by this endpoint. The upload limit is 16 MiB; request and response limits are 32 MiB.

Allowed endpoints and failures

Next installer build: the connector allows only the 97 endpoints listed in the endpoint reference, using each endpoint’s documented GET or POST method. Unknown paths and mismatched methods are rejected before authentication or any HTTP request. Endpoint names and methods are case-insensitive; paths must otherwise match exactly. Authentication remains internal. The six binary endpoints still require the documented PowerShell alternatives; being listed does not add binary-response support. This restriction is not in the already published 4.1.60 installer.

Use GET (default) or an explicit POST as documented for the endpoint. The next build rejects PUT, PATCH and DELETE because none of the documented examples use them. GET cannot contain a body. Use -bodyFile for JSON payloads and -queryFile for scalar query parameters; relative file paths resolve against the current vault folder. Files must already be locally available. The connector does not download, check out or check in template/upload files.

The command does not accept an absolute endpoint URL, follow redirects, or retry requests automatically. HTTP errors, invalid JSON, success: false, and Message-only error responses fail the command. Server response messages are not echoed on failure, to avoid exposing server diagnostics or credentials; inspect server logs for details. A cancellation or 120-second timeout may happen after Manage has applied a write. Verify the record before retrying.

MCP clients can discover the command with pdmshell_describe_command for manage. Configure the connection in the desktop app first. The same command can then execute through MCP under the configured Windows account. Confirm the intended customer changes before executing write endpoints.