<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Rest API: End of artifact's history (Thread)</title><description> Hi All,  If I run:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history?start_row=1&amp; number_rows=20 &amp;sort_property=HistoryChangeId&amp;sort_direction=desc   Spira returns 8 history items. So, we know that in reality there are 8 such history records.  But If I run:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history? start_row=21 &amp;number_rows=20&amp;sort_property=HistoryChangeId&amp;sort_direction=desc   It returns again 8 records.  Expected behaviour  to return nothing as start_row is out of available array of records.     Why does it matters? Lets imagine that my goal is to receive all the history. So, I dont know number of rows what to set for  number_rows  attribute. Lets Imagine that I am using windowing of 8 records per request. So, sending:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history? start_row=1 &amp;number_rows=8&amp;sort_property=HistoryChangeId&amp;sort_direction=desc   I will receive 8 records. But I dont know are there any other records, so will send again:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history? start_row=9 &amp;number_rows=8&amp;sort_property=HistoryChangeId&amp;sort_direction=desc   But will receive  again  8 records   so I wont get a signal that there are no more records in a history and will request Spira again and again.       As a manager, I dont like messages without proposals, so will try to do the same here. Possible ways to solve it:   Add another POST API to receive amount of records that might be returned if I call original one request later.  Change the logic of the original one API to send nothing as soon as I get to the end and after the end.  Add attribute  &amp;stop=true  to the original one API to apply such logic only for those clients, when it is needed.   Proposals doesnt contradict each other, so 1 and 3 (or 2) could be implemented in parallel to fix it. </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/issues-questions/2578.aspx</link><item><guid isPermaLink="false">threadId=2578</guid><author>Ilia Poliakov (ilya.polyakov@edetek.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">restapi</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> post</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> start_row</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> number_rows</category><title>Rest API: End of artifact's history</title><description> Hi All,  If I run:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history?start_row=1&amp; number_rows=20 &amp;sort_property=HistoryChangeId&amp;sort_direction=desc   Spira returns 8 history items. So, we know that in reality there are 8 such history records.  But If I run:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history? start_row=21 &amp;number_rows=20&amp;sort_property=HistoryChangeId&amp;sort_direction=desc   It returns again 8 records.  Expected behaviour  to return nothing as start_row is out of available array of records.     Why does it matters? Lets imagine that my goal is to receive all the history. So, I dont know number of rows what to set for  number_rows  attribute. Lets Imagine that I am using windowing of 8 records per request. So, sending:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history? start_row=1 &amp;number_rows=8&amp;sort_property=HistoryChangeId&amp;sort_direction=desc   I will receive 8 records. But I dont know are there any other records, so will send again:   https://eti.spiraservice.net/Services/v6_0/RestService.svc/projects/43/artifact-types/6/artifacts/27000/history? start_row=9 &amp;number_rows=8&amp;sort_property=HistoryChangeId&amp;sort_direction=desc   But will receive  again  8 records   so I wont get a signal that there are no more records in a history and will request Spira again and again.       As a manager, I dont like messages without proposals, so will try to do the same here. Possible ways to solve it:   Add another POST API to receive amount of records that might be returned if I call original one request later.  Change the logic of the original one API to send nothing as soon as I get to the end and after the end.  Add attribute  &amp;stop=true  to the original one API to apply such logic only for those clients, when it is needed.   Proposals doesnt contradict each other, so 1 and 3 (or 2) could be implemented in parallel to fix it. </description><pubDate>Tue, 22 Feb 2022 05:13:58 -0500</pubDate><a10:updated>2022-02-22T11:11:06-05:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/2578.aspx</link></item><item><guid isPermaLink="false">messageId=4276</guid><author>David J (adam.sandman+support@inflectra.com)</author><title> Please could you  log a support ticket  so your request can be added to our backlog.  Regards  Davi</title><description> Please could you  log a support ticket  so your request can be added to our backlog.  Regards  David </description><pubDate>Tue, 22 Feb 2022 11:11:06 -0500</pubDate><a10:updated>2022-02-22T11:11:06-05:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/2578.aspx#reply4276</link></item></channel></rss>