简体   繁体   中英

Jama REST Api - Injecting a where clause to GET

I'm using the REST API of Jama, detailed here:

https://dev.jamasoftware.com/rest#operation_getItems

Using this allows me to get a JSON object of all the items in a given project.

However what is returned is limited to just 20 results, to get all the results I need to loop through using pagination.

There is a field in the returned data which is itemType. Is there anyway of injecting a 'where' clause into the GET request so that only items of certain type is returned?

All I'm after is the total number of matching items, seems unnecssary to have to grab everything and then loop through to extract the items of a certain type?

Not sure which version of Jama you are using but in 8.25 we have the abstractitems endpoint, which optionally takes an itemType [array] parameter in the query. See https://dev.jamasoftware.com/rest#operation_getAbstractItems

the GET request looks like this: https://myjamahost.com/rest/latest/abstractitems?project=23&itemType=60&itemType=67&...&maxResults=50 unfortunately the response size here is also default 20 and max. 50

Hope that helps
S.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM