cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
379
Views
12
Helpful
2
Replies
Highlighted
Beginner

/InventoryDetails - sort by "sub"-element

Hey!

I'd like to sort a /InventoryDetails call by the product family element.

As the product family element is part of the summary element, a ".sort=productFamily" or "sort=summary.productFamily" does not work.

The documentation on sorting is very short and does not cover this case - any idea on this?

Thanks in advance!

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

Re: /InventoryDetails - sort by "sub"-element

Thanks for the hint.

It wasn't the missing dot (that was a copy&paste error), but a capital S in Summary - didn't think of that.

Thanks a lot for the help

I suggest adding the info on how to query sub-elements to the API docs. Not everybody might guess that right.

View solution in original post

2 REPLIES 2
Highlighted
Cisco Employee

Re: /InventoryDetails - sort by "sub"-element

Could this be a typo?  It looks like you don't have the preceding dot in front of sort.  "summary.productFamily" is the correct way to reference the product family parameter of InventoryDetails.  The API query should look something like "InventoryDetails?.sort=summary.productFamily".

Highlighted
Beginner

Re: /InventoryDetails - sort by "sub"-element

Thanks for the hint.

It wasn't the missing dot (that was a copy&paste error), but a capital S in Summary - didn't think of that.

Thanks a lot for the help

I suggest adding the info on how to query sub-elements to the API docs. Not everybody might guess that right.

View solution in original post