Windchill REST Services > Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC Document Management Domain > Retrieving the Document Structure
  
Retrieving the Document Structure
This example shows you how to retrieve the structure for a document with the root document OID specified in the request URI. Use the following GET URI:
URI
GET /Windchill/servlet/odata/DocMgmt/Documents('OR:wt.doc.WTDocument:181420')/DocUsageLinks
To get information about the parent and child documents in each document usage link in the document structure, expand DocUsedBy and DocUses:
URI with Expand
GET /Windchill/servlet/odata/DocMgmt/Documents('OR:wt.doc.WTDocument:181420')/DocUsageLinks?$expand=DocUsedBy,DocUses
You can expand the child documents up to the leaf nodes in the document structure using the following expansion:
URI with Expand
GET /Windchill/servlet/odata/DocMgmt/Documents('OR:wt.doc.WTDocument:181420')/DocUsageLinks?$expand=DocUses($expand=DocUsageLinks($expand=DocUses))
Example: Retrieving Information for a Specific Document Usage Link
This example shows you how to retrieve information for a specific document usage link in a document structure with the root document OID and document usage link OID specified in the request URI. Use the following GET URI:
URI
GET /Windchill/servlet/odata/DocMgmt/Documents('OR:wt.doc.WTDocument:181420')/DocUsageLinks('OR:wt.doc.WTDocumentUsageLink:179680')