Changes to Retrieve Bitlinks By Group
We are introducing a new iteration token to use for the Retrieve Bitlinks By Group endpoint called search_after
. This token appears in the pagination struct returned by calling GET /v4/groups/{group_guid}/bitlinks
, which will look like
"pagination": {
"prev": string,
"next": string,
"search_after": string,
"size": integer,
"page": integer,
"total": integer
}
Note: prev
will only be returned when it is not empty (i.e. will not be returned on the first batch of links). prev
, page
, and total
fields will be removed in the near future. See Future Changes for more details and How to Make Requests for information on how to continue retrieving this data.
How to Make Requests
To use the search_after
parameter, you can append ?search_after={string}
to your request url.
https://api-ssl.bitly.com/v4/groups/{group_guid}/bitlinks?search_after={string}
From there, you can add desired parameters (a complete list found in our API Documentation). A request returning an empty search_after
indicates that the last batch of links has been returned. By appending the empty parameter, the first batch of links will be returned again.
Future Changes
As we make the switch from pagination to iteration, certain fields and parameters are no longer applicable.
- Removal of
total
from pagination struct- To get the total number of links, retrieve all links and count them
- Removal of
prev
from pagination struct- Moving from pagination to iteration, going backwards does not work the same. To view the previous batch of links, save the previous request and reuse it
- Removal of
page
from pagination struct and from available parameters- As we move to iteration, page no longer has meaning and will be removed
- Removal of
modified_after
filter from available parameters- This filter is not supported by iteration. Users can retrieve all links and filter themselves if desired
Why?
As we grow to supporting more links, we need to make certain system upgrades to ensure appropriate response times for users.