Azure AD Graph group member oData result limitations - select

Following is the url to get the members of a group
baseUrl/groups/{groupId}/members?$select=objectId,signInNames,surname,givenName
So how many number of records will be return with this request?
does it return all the members of group or does it return limited number of record and next link for the next records?

It depends on how many members are in your group.
Different APIs might have different default and maximum page sizes.
There should be a limited number(which is not exposed) for /members endpoint. If the number of members exceeds this limit, a #odata.nextLink will be returned for accessing more data.
You can specify the page size by using $top query parameter. See details here.

Related

Retrieve all of a user's playlist from SoundCloud limited to 50?

I'm trying to retrieve all the playlists from my account via
http://api.soundcloud.com/users/145295911/playlists?client_id=xxxxxx, as the API reference shows.
However, I can only retrieve recent 50 playlists instead of all of my playlists. I've been looking for this but it seems like no one has had this issue before. Is there a way to get all of them?
Check out the section of their API on pagination.
Most results from our API are returned as a collection. The number of items in the collection returned is limited to 50 by default with a maximum value of 200. Most endpoints support a linked_partitioning parameter that will allow you to page through collections. When this parameter is passed, the response will contain a next_href property if there are additional results. To fetch the next page of results, simply follow that URI. If the response does not contain a next_href property, you have reached the end of the results.

facebook marketing api - results and cost per result

I want to retrieve via API the values for cost per result and results columns of the facebook business manager. Is this possible?
Yes its possible through the Insight API.
Request insights for a campaign and the cost_per_action_type field. The cost_per_action_type field will be an array containing the cost per result of various action types.
In a traffic campaign the action type of interest is link_click. The value for link_clicks is what you would see under results in the fb ad manager.
https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights/

Possible to specify date_preset with insights edge in Facebook Ads API?

For the Marketing API, I know that I'm able to make one call to retrieve all of the adsets from a certain account along with their insights, but am I able to specify the date_preset for the insights edge in that same call?
For example, the following gives me lifetime insights stats:
/v2.4/{accountID}/adcampaigns?fields=insights
To be clear - I know this is possible to retrieve by making separate calls for each adset id (where I know I can specify the date_preset); instead, I'd like to do this via the call where I get a long list of the ad sets plus their insights details in one go.
Yes this is possible using query expansion, however you probably should not do it in this anyway.
Using query expansion results in multiple requests being executed in one HTTP call, in this case one to get all the adcampaigns, and then N requests where N is the number of adcampaigns returned. This will in turn affect your rate limiting.
The most efficient way to request all insights for all adcampaigns (ad sets) is instead to request them at the account level, specifying aggregation level:
/v2.4/act_{ADACCOUNT_ID}/insights?date_preset=last_7_days&level=campaign
This requires just 1 request, or the number of requests to retrieve the total number of pages.
If you really want to achieve this with query expansion, you can do the following for example:
/v2.4/act_{ADACCOUNT_ID}/adcampaigns?fields=insights.date_preset(last_30_days).time_increment(all_days)
You can see the parameters to insights that would normally be query parameters of the form param_name=param_value are now in the form of param_name(param_value).
To specify the date_preset , here is the correct format . Its important to use insights as edge to get the date_preset filtering .
/v2.10/act_{ADACCOUNT_ID}/insights?fields=impressions,clicks,ctr,unique_clicks,unique_ctr,spend,cpc&date_preset=last_3d
The above one is tested with latest Graph Api version(2.10) as of now . FOr more info related to the date_preset values refer to there api docs .
https://developers.facebook.com/docs/marketing-api/insights/parameters

Facebook API not giving me complete list of members of Facebook groups

I am trying a very simple FQL :
SELECT uid FROM group_member WHERE gid=<foo>
If my group has 3-4 members it works fine; but if it has thousands of members it returns me approx 33% of the members ! How can I get complete list
Unfortunately, this too has some limitations. You can't get more than 500 group members using an API call. Your query will only return you a max of 500 random members from that group.
Workaround: You can use Facebook Graph API and make use of pagination feature. For example: To retrieve 400 group members, you can simply make a request using -
https://graph.facebook.com/[Group ID]/members?limit=400&offset=0
This will return a list of 400 members of that group. You can then retrieve the next 400 members by increasing the offset to 400 and so on.
I tried this example using the API explorer and it worked fine for me.

Get total number of items via QuickBooks API

The QuickBooks Online api supports paging and sorting results with special query parameters. Paging requires two parameters: PageNumber and ResultsPerPage. However, there doesn't seem to be any way of figuring out how many pages are available at a given number of results per page, or how many objects there are. The response only includes the current page and how many things are on it.
Is it possible to get either a total count of items for a given search? Or at least a total number of pages?
In QBO there is no direct api to get the total count or the total number of pages.
You need to use paging only for this use case.
To use paging use the findAll method(with page no and chunk size attributes) of the corresponding entity.
ex - Ref doc for Customer(QBO)
http://developer-static.intuit.com/SDKDocs/QBV2Doc/ipp-java-devkit-2.0.10-SNAPSHOT-javadoc/
(QBOEmployeeService).
Ref example -https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0200_ipp_java_devkit/0800_crud_examples