Retrieving extended property values and attributes

To request the value of a specific extended property, you need to include the xProperty name in a $select request:

GET http://host/server/odata/Part(‘048…3BC’)?$select=xp-cost

AML:
<Item type="Part” action="get” id="048…3BC” select="xp-cost($value)” />
Response:
HTTP/1.1 200 OK
{
"@odata.context": “http://host/server/odata/$metadata#Part(xp-cost)/$entity”,
"@odata.id": “Part(‘0486…23BC’)”,
“xp-cost": "{defined xp-cost value}",
“itemtype": “4F1AC04A2B484F3ABA4E20DB63808A88"
}

Use OData annotations to request an attribute associated with an extended property as shown in the following example:

GET http://host/server/odata/Part(‘048…3BC’)?$select=xp-cost@aras.permission_id

AML:

<Item type="Part” action="get” id="048…3BC” select="xp-cost(@permission_id)” />
Response:
HTTP/1.1 200 OK
{

"@odata.context": “http://host/server/odata/$metadata#Part(xp-*@aras.permission_id)/$entity”,

"@odata.id": “Part(‘0486…23BC’)”,

“xp-text@aras.permission_id": "{Permission_PropertyValue ID}",

“itemtype": “4F1AC04A2B484F3ABA4E20DB63808A88"

}

If you request both a value and/or more than one attribute associated with the same property, you must combine them into one selection list element in the resulting AML:

GET http://host/server/odata/Part(‘048…3BC’)?$select=xp-cost,xp-cost@aras.permission_id

AML: <Item type="Part” action="get” id="048…3BC” select="xp-cost($value,@permission_id)” />

Response:

HTTP/1.1 200 OK "@odata.context": “http://host/server/odata/$metadata#Part(xp-*@aras.permission_id)/$entity”,

"@odata.id": “Part(‘0486…23BC’)”, “xp-cost": "{defined xp-cost value}",

“xp-text@aras.permission_id": "{Permission_PropertyValue ID}",

“itemtype": “4F1AC04A2B484F3ABA4E20DB63808A88"

}

Use xp- as the property name to request all of the extended properties that are defined for an item:

GET http://host/server/odata/Part(‘048…3BC’)?$select=xp-*

AML:

<Item type="Part” action="get” id="048…3BC” select="xp-*($value)” />

Response:

HTTP/1.1 200 OK

{

"@odata.context": “http://host/server/odata/$metadata#Part(xp-cost)/$entity”,

"@odata.id": “Part(‘0486…23BC’)”,

“xp-cost": "{defined xp-cost value}",

“itemtype": “4F1AC04A2B484F3ABA4E20DB63808A88"

… other Part item extended properties

}