cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Retrieve Attributes values from REST API

Retrieve Attributes values from REST API

Hello,

 I think would be nice having a REST API for Retrieve attributes of a Windchill Type (ex EPMDocument or WTPart)

Thank you

3 Comments
amarsingh
9-Granite

@gfontana Starting Windchill REST Services 1.5, for Windchill Type and subtypes that are exposed as an entity you can get the exposed attributes.

Example 1:

to get exposed attributes of EPMDocument try REST call 

GET <windchill server>:<port>/Windchill/servlet/odata/CADDocumentMgmt/GetWindchillMetaInfo(EntityName='PTC.CADDocumentMgmt.CADDocument')

this will return something like:

{
    "@odata.context": "http://amarsingh2v2k16.ptcnet.ptc.com/Windchill/servlet/odata/v2/PTC/$metadata#EntityMetaInfo",
    "EntityType": "PTC.CADDocumentMgmt.CADDocument",
    "BaseType": "PTC.WindchillEntity",
    "HasWindchillType": true,
    "DisplayName": "CAD Document",
    "InternalName": "com.ptc.ptcnet.DefaultEPMDocument",
    "PropertyInfo": [
        {
            "PropertyName": "Name",
            "DisplayName": "Name",
            "InternalName": "name"
        },
        {
            "PropertyName": "Number",
            "DisplayName": "Number",
            "InternalName": "number"
        },
        {
            "PropertyName": "ObjectType",
            "DisplayName": "Type",
            "InternalName": "displayType"
        }
....<and more> ] }

Example 2:

to get exposed attributes of WTPart try REST call

GET <windchill server>:<port>/Windchill/servlet/odata/ProdMgmt/GetWindchillMetaInfo(EntityName='PTC.ProdMgmt.Part')

this will return something like:

{
    "@odata.context": "http://amarsingh2v2k16.ptcnet.ptc.com/Windchill/servlet/odata/v2/PTC/$metadata#EntityMetaInfo",
    "EntityType": "PTC.ProdMgmt.Part",
    "BaseType": "PTC.WindchillEntity",
    "HasWindchillType": true,
    "DisplayName": "Part",
    "InternalName": "wt.part.WTPart",
    "PropertyInfo": [
        {
            "PropertyName": "Name",
            "DisplayName": "Name",
            "InternalName": "name"
        },
        {
            "PropertyName": "Number",
            "DisplayName": "Number",
            "InternalName": "number"
        }
....<and more> ] }

 

  • What Windchill type is exposed as REST entity can be configured.
  • You can also get the entity meta info in specific supported locale by specifying "Accept-Language: <locale" (e.g. Accept-Language: ko)

 

gfontana
8-Gravel
Wonderfull !!!!
olivierlp
Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.