feat(windchill): add document integration (#6577)

* feat(windchill): add document integration

* fix(windchill): align tool contracts and docs

* fix(windchill): use official integration icon

* fix(windchill): correct response and paging semantics

* fix(windchill): align execution and API contracts

* refactor(windchill): inline route authentication

* fix(windchill): correct OData query encoding, content download, and cleared-field handling

Validated the integration end to end against PTC Windchill REST Services 2.7
documentation and fixed every divergence found.

Protocol correctness:
- Encode OData query spaces as %20 rather than the form-encoded `+` that
  URLSearchParams emits. Every multi-token $filter and $orderby reached
  Windchill as a literal `+` and could not match.
- Download content through the documented typed navigation
  `<content>/PTC.ApplicationData/Content/URL`, which returns a signed vault
  URL, instead of a `$value` segment that WRS does not implement. The
  resolved URL is pinned to the configured HTTPS origin.
- Terminate every Stage 2 CacheDescriptor_array entry with `;` to match the
  documented grammar.
- Raise the $top bound to Windchill's documented 2000 maximum, keeping 200 as
  the default page size.

Cleared-field handling:
- The executor merges raw block inputs before the block's param transform, so
  omitting a key could not clear it. A cleared numeric or boolean field
  reached the URL builder as '' and threw, and cleared optional strings failed
  contract validation. Coercions now emit an explicit undefined, and the
  internal-route body strips blanks centrally.

Robustness and contracts:
- Bound the document-structure walk to the depth actually requested.
- Loosen response schemas that re-applied request-side bounds to
  provider-returned values, which turned committed mutations into opaque
  parse failures.
- Return contract-shaped bodies for oversized, malformed, and unhandled
  request failures.
- Normalize downloaded content types and drop charset parameters.

Presentation and docs:
- Square the icon to a centred tile on white.
- Replace WT.Document and PATCH-compatible jargon with plain language.
- Fix canvas sentence noun stutters on the bulk operations.
- Correct the revision skill's unverified working-copy claim to read the OID
  back rather than assume it, and add retirement and stale-checkout skills.
- Add a manual intro section to the integration docs page.

* fix(windchill): align tool copy with the docs page and rebase the route baseline

Tool descriptions feed both the integration catalog and the generated docs page,
so the plain-language pass had to reach them too: drop WT.Document and
PATCH-compatible from the operation copy, and correct the $top bound the
descriptions still advertised as 200.

Correct the docs intro's attachment wording, gloss OData on first use, and
attribute the bulk-atomicity claim to PTC's documented behavior.

Raise the API route-count baseline, which staging advanced while this branch
was behind.

* feat(windchill): add update common properties

Name, Number, and Organization are rejected by the PATCH-based update
operation, and the rejection message told users to reach for Windchill's
UpdateCommonProperties action that the integration did not expose. Add it.

PTC documents UpdateCommonProperties as a bound DocMgmt action taking an
Updates wrapper, available when hasCommonProperties is set on the Documents
entity, and refused while the document is checked out. The subblock and param
descriptions carry that constraint, and the rejection message now names the
operation that does the job.

* test(windchill): assert block and tool params stay aligned for every operation

Validating the new operation surfaced that nothing enforced the block-to-tool
alignment the review process had been checking by hand. Assert it for all 27
operations instead: every required tool param has a required, non-advanced
input under that operation's condition, and no operation shows an input its
tool cannot accept.

Both fail on a deliberately broken condition or a dropped required flag.

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>
This commit is contained in:
Bill Leoutsakos
2026-08-12 13:18:31 -07:00
committed by GitHub
co-authored by Bill Leoutsakos Waleed Latif
parent 9aa16e381c
commit 2805a8def9
50 changed files with 8309 additions and 6 deletions
+26
View File
@@ -2494,6 +2494,32 @@ export function DocumentIcon(props: SVGProps<SVGSVGElement>) {
)
}
export function WindchillIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
viewBox='79 57 88 88'
role='img'
aria-label='Windchill icon'
xmlns='http://www.w3.org/2000/svg'
{...props}
>
<rect x='79' y='57' width='88' height='88' fill='#FFFFFF' />
<g fill='#3D4647'>
<polygon points='137.2,86.6 137.2,68.5 122.8,60.2 107.1,69.2' />
<polygon points='142.7,106.4 158.4,97.3 158.4,80.7 142.7,71.6' />
<polygon points='108.5,115.8 108.5,133.9 122.8,142.2 138.5,133.2' />
<polygon points='128.2,121 143.9,130.1 158.4,121.7 158.4,103.6' />
<polygon points='117.4,81.4 101.7,72.4 87.3,80.7 87.3,98.8' />
<polygon points='103,96 87.3,105.1 87.3,121.7 103,130.8' />
</g>
<polygon
fill='#40AA1D'
points='137.2,109.5 122.8,117.8 108.4,109.5 108.4,92.9 122.8,84.6 137.2,92.9'
/>
</svg>
)
}
export function MintlifyIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 19' fill='none'>
+2
View File
@@ -245,6 +245,7 @@ import {
WebhookIcon,
WhatsAppIcon,
WikipediaIcon,
WindchillIcon,
WizaIcon,
WordpressIcon,
WorkdayIcon,
@@ -538,6 +539,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
webflow: WebflowIcon,
whatsapp: WhatsAppIcon,
wikipedia: WikipediaIcon,
windchill: WindchillIcon,
wiza: WizaIcon,
wordpress: WordpressIcon,
workday: WorkdayIcon,
@@ -259,6 +259,7 @@
"webflow-service-account",
"whatsapp",
"wikipedia",
"windchill",
"wiza",
"wordpress",
"workday",
@@ -0,0 +1,937 @@
---
title: Windchill
description: Manage documents, revisions, and content in PTC Windchill
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="windchill"
color="#FFFFFF"
/>
{/* MANUAL-CONTENT-START:intro */}
[PTC Windchill](https://www.ptc.com/en/products/windchill) is the product lifecycle management system manufacturers use as the system of record for engineering data. Documents in Windchill are controlled objects: each one carries a number, a revision and iteration, a lifecycle state, folder placement, security labels, and a checkout status that decides who is allowed to change it right now.
This integration talks to Windchill REST Services (WRS) 2.7 over OData — the query protocol Windchill exposes its data through — using a Basic-authenticated service account. Point it at a complete versioned service root — `https://your-host/Windchill/servlet/odata/v6` — and your agents can:
- **Find and read documents**: list documents with an OData filter, sort order, field selection, page size, and a latest-version-only switch; fetch a single document by its object identifier (OID); and walk a document's structure through its usage links to see child documents with their versions and states.
- **Create and update**: create one document or a batch of them in a container and optional folder, and patch editable attributes on one or many documents. Name, Number, and Organization are rejected here and have their own operation, because Windchill changes those through a separate action and refuses it while a document is checked out.
- **Run the version and lifecycle cycle**: check documents out and back in with notes, undo a checkout, revise to the next revision, read the lifecycle states a document is actually allowed to move to, and transition it to one of them.
- **Move files**: download a document's primary content, or a specific attachment by its OID, into a Sim file — and upload files as primary content or attachments. Sim handles Windchill's CSRF token and its multi-step upload handshake for you.
Bulk actions are atomic on Windchill's side: PTC documents that if the action fails for any object in the collection, the entire action is rolled back and nothing changes.
Two limits are worth knowing before you build. Windchill identifies everything by OID (`OR:wt.doc.WTDocument:48796581`), so most operations need an OID you got from a list or get call rather than a document number. And this integration supports Basic authentication only — Windchill deployments fronted by OAuth are not currently supported.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate PTC Windchill REST Services 2.7 document management into your workflow using Basic authentication. Read and update document metadata, perform version and lifecycle actions, and transfer primary content and attachments. Windchill OAuth deployments are not currently supported.
## Actions
### Windchill List Documents
List documents with an OData query, sorting, and pagination
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `select` | string | No | Comma-separated normalized document properties to return |
| `filter` | string | No | OData $filter expression |
| `orderBy` | string | No | OData $orderby expression |
| `top` | number | No | Maximum documents in the OData result set \($top\), from 1 to 2000 |
| `skip` | number | No | Documents to skip |
| `count` | boolean | No | Ask Windchill to include the total matching count |
| `latestVersion` | boolean | No | Return only the latest version of matching documents |
| `nextLink` | string | No | Verified @odata.nextLink from a previous list response |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `documents` | array | Windchill documents |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
| `pageInfo` | object | OData pagination information |
| ↳ `count` | number | Number of items returned in this page |
| ↳ `totalCount` | number | Total matching items |
| ↳ `nextLink` | string | URL returned by Windchill for the next page |
### Windchill Get Document
Get a WT.Document by OID
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `select` | string | No | Comma-separated normalized document properties to return |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `document` | object | Windchill document |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Get Document Structure
Retrieve recursive document usage links and their parent and child documents
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `structureDepth` | number | No | Document structure expansion depth, from 1 to 3 |
| `nextLink` | string | No | Verified @odata.nextLink from a previous structure response |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `structure` | array | Document usage links, including recursively expanded child links |
| ↳ `id` | string | Document usage link OID |
| ↳ `parent` | object | Parent document |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
| ↳ `child` | object | Child document |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
| ↳ `children` | array | Nested child usage links with the same recursive shape |
| `pageInfo` | object | OData pagination information |
| ↳ `count` | number | Number of items returned in this page |
| ↳ `totalCount` | number | Total matching items |
| ↳ `nextLink` | string | URL returned by Windchill for the next page |
### Windchill Get Valid State Transitions
Get lifecycle states a document can transition to from its current state
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `states` | array | Valid lifecycle transitions |
| ↳ `value` | string | Internal state value |
| ↳ `display` | string | Displayed state value |
### Windchill Get Primary Content
Get primary-content metadata for a document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `content` | object | Primary-content metadata |
| ↳ `id` | string | Content object identifier |
| ↳ `fileName` | string | Content file name |
| ↳ `description` | string | Content description |
| ↳ `format` | string | Windchill content format |
| ↳ `mimeType` | string | Content MIME type |
| ↳ `fileSize` | number | Content size in bytes |
| ↳ `contentType` | string | Windchill OData content entity type |
| ↳ `displayName` | string | Displayed content name |
| ↳ `urlLocation` | string | URL-data location |
| ↳ `externalLocation` | string | External-storage location |
### Windchill List Attachments
List attachment metadata for a document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `nextLink` | string | No | Verified @odata.nextLink from a previous attachment response |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `attachments` | array | Document attachments |
| ↳ `id` | string | Content object identifier |
| ↳ `fileName` | string | Content file name |
| ↳ `description` | string | Content description |
| ↳ `format` | string | Windchill content format |
| ↳ `mimeType` | string | Content MIME type |
| ↳ `fileSize` | number | Content size in bytes |
| ↳ `contentType` | string | Windchill OData content entity type |
| ↳ `displayName` | string | Displayed content name |
| ↳ `urlLocation` | string | URL-data location |
| ↳ `externalLocation` | string | External-storage location |
| `pageInfo` | object | OData pagination information |
| ↳ `count` | number | Number of items returned in this page |
| ↳ `totalCount` | number | Total matching items |
| ↳ `nextLink` | string | URL returned by Windchill for the next page |
### Windchill Create Document
Create one WT.Document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `name` | string | Yes | Document name |
| `containerOid` | string | Yes | Container OID in which to create the document |
| `number` | string | No | Optional document number when manual numbering is enabled |
| `title` | string | No | Document title |
| `description` | string | No | Document description |
| `folderOid` | string | No | Optional folder OID for the new document |
| `attributes` | json | No | Optional installed Windchill document attributes as a JSON object |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Create Documents
Create several documents in one atomic Windchill request
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documents` | array | Yes | Document inputs as a JSON array; each item requires name and containerOid |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Update Document
Update one document's editable attributes
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `attributes` | json | Yes | Editable attributes as a JSON object. Name, Number, and Organization require the Update Common Properties operation and are not supported here. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Update Common Properties
Update a document's Name, Number, and other common properties
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581. The document must not be checked out. |
| `commonProperties` | json | Yes | Common properties as a JSON object, for example \{"Name":"New name","Number":"NEW-001"\}. Enumerated properties take a value/display pair. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Update Documents
Update several documents' editable attributes in one atomic request
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documents` | array | Yes | Document updates as a JSON array; each item requires id and the editable attributes to set. Name, Number, and Organization are not supported. |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Delete Document
Delete one document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
### Windchill Delete Documents
Delete multiple documents atomically
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOids` | array | Yes | WT.Document OIDs to process atomically |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
### Windchill Check Out Document
Check out one document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `checkOutNote` | string | No | Checkout note |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Check Out Documents
Check out multiple documents atomically
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOids` | array | Yes | WT.Document OIDs to process atomically |
| `checkOutNote` | string | No | Checkout note |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Check In Document
Check in one document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `checkInNote` | string | No | Check-in note |
| `keepCheckedOut` | boolean | No | Keep the document checked out after checking it in |
| `checkOutNote` | string | No | Checkout note |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Check In Documents
Check in multiple documents atomically
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOids` | array | Yes | WT.Document OIDs to process atomically |
| `checkInNote` | string | No | Check-in note |
| `keepCheckedOut` | boolean | No | Keep the document checked out after checking it in |
| `checkOutNote` | string | No | Checkout note |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Undo Check Out Document
Undo checkout for one document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Undo Check Out Documents
Undo checkout for multiple documents atomically
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOids` | array | Yes | WT.Document OIDs to process atomically |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Revise Document
Create a new revision of one document
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `versionId` | string | No | Optional target revision identifier when override-on-revise is enabled |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Revise Documents
Create new revisions of multiple documents atomically
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOids` | array | Yes | WT.Document OIDs to process atomically |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Set Lifecycle State
Transition a document to a valid lifecycle state
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `stateValue` | string | Yes | Internal value of the target lifecycle state |
| `stateDisplay` | string | Yes | Display value of the target lifecycle state |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `document` | object | Document returned by Windchill when the operation returns one |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Update Document Security Labels
Update installed security-label attributes for one or more documents
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `securityLabelUpdates` | array | Yes | Array of document IDs and installed security-label values |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the operation |
| `documents` | array | Documents returned by Windchill when the operation returns them |
| ↳ `id` | string | Windchill object identifier |
| ↳ `name` | string | Document name |
| ↳ `number` | string | Document number |
| ↳ `title` | string | Document title |
| ↳ `description` | string | Document description |
| ↳ `state` | string | Internal life cycle state value |
| ↳ `stateDisplay` | string | Displayed life cycle state value |
| ↳ `versionId` | string | Version identifier |
| ↳ `revision` | string | Revision identifier |
| ↳ `version` | string | Version and iteration |
| ↳ `latest` | boolean | Whether this is the latest version |
| ↳ `checkoutState` | string | Checkout state |
| ↳ `folderName` | string | Folder name |
| ↳ `folderLocation` | string | Folder path |
### Windchill Download Primary Content
Download primary content into a canonical UserFile
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `fileName` | string | No | Optional downloaded file name override |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `file` | file | Downloaded content stored as a canonical UserFile |
| `fileName` | string | Downloaded file name |
| `mimeType` | string | Downloaded content MIME type |
### Windchill Upload Primary Content
Upload a primary-content file to a document that has none
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `primaryFile` | file | Yes | Primary content file to upload |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the upload |
| `uploadedFileNames` | array | Names of files accepted by Windchill |
### Windchill Download Attachment
Download a document attachment into a canonical UserFile
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `attachmentOid` | string | Yes | Windchill attachment content OID |
| `fileName` | string | No | Optional downloaded file name override |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `file` | file | Downloaded content stored as a canonical UserFile |
| `fileName` | string | Downloaded file name |
| `mimeType` | string | Downloaded content MIME type |
### Windchill Upload Attachments
Upload one or more files as document attachments
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `baseUrl` | string | Yes | Complete WRS 2.7 versioned service root using Basic authentication, for example https://host/Windchill/servlet/odata/v6 |
| `username` | string | Yes | Windchill service-account username |
| `password` | string | Yes | Windchill service-account password |
| `documentOid` | string | Yes | WT.Document OID, for example OR:wt.doc.WTDocument:48796581 |
| `attachmentFiles` | file[] | Yes | Attachment files to upload |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `operation` | string | Windchill operation that was executed |
| `affectedIds` | array | Document identifiers affected by the upload |
| `uploadedFileNames` | array | Names of files accepted by Windchill |