I have read the document of office 365 about onedrive. I have send two http requests:
1)https://graph.microsoft.com/v1.0/me/drive/root/children?$orderby=name&$top=5&$skip=0
2)https://graph.microsoft.com/v1.0/me/drive/root/children?$orderby=name&$top=5&$skip=5
but I have received the same result,anyone could tell me whether office 365 onedrive supports paging?
OneDrive's paging model is a little different to skip+take. Essentially you'll make a query like:
GET https://graph.microsoft.com/v1.0/me/drive/root/children?$top=5
and in the response you should see the usual array of values, along with a property called #odata.nextLink. You'll want to take that URL use it request the next page:
"#odata.nextLink": "https://graph.microsoft.com/v1.0/me/drive/root/children?$skiptoken=ASDGASGSD"
GET https://graph.microsoft.com/v1.0/me/drive/root/children?$skiptoken=ASDGASGSD
You keep doing this until you don't get an #odata.nextLink returned.
Related
I am trying to make a call to the edamam API to just get 1 item, right now when I call it I get a lot of results which I don't need, is there a query I can use to limit the results?
I have tried to put maxResults at the end but id doesn't change my response
https://api.edamam.com/api/food-database/v2/parser?session=40&app_id=$id&app_key=$appKey&ingr=rice&maxResults=1
The official documentation does not name any means to actively influence the result set / page size of the result.
There is an OpenAPI specification available as well.
There seems to be basic support for pagination, however that is solely based on a session and only supports iteration instead of full control of which page to request and of which size a page should be.
To obtain the next page, the API user should follow the “next” link from the “_links” section in the result JSON ...
The /auto-complete endpoint allows to provide a limit parameter. However, that does not seem to be supported by the /api/food-database/v2/parser endpoint you're interested in.
I have a list in "SharePoint in Microsoft 365" and am looking to extend its usefulness. I would like to create a button or something that can take a row of data and send it to an external site via API (another tool that we have created).
To be clear:
SharePoint initiates a GET or POST request
the request must have row or field data attached
the destination is outside of Microsoft/SharePoint
Can it be done?
(Apologies if this is a repeat question, I could only find answers that pertained to older versions of SharePoint and focused on hitting external APIs to retrieve data, not send it.)
OK, i think the best choice to send Data from a selected row, is to use the ListView Command Set here you can do anything with #pnp/nodejs.
Otherwise...
PowerAutomate can help send data.
Twitter has private endpoints like this one:
http://urls.api.twitter.com/1/urls/count.json
Tweet counts can be fetched from here, but this is not recommended by Twitter. Besides, they keep saying they gonna shut down these endpoints in the near future.
The Site Streams API is now in closed beta, they don't accept applications.
https://dev.twitter.com/streaming/sitestreams
So that leaves is with only one option, the REST API, but I don't see any endpoint there which could return the number of tweets for a given URL.
What's the best way to get this data? Is there an "official" endpoint for this?
Or the only way is to use something like the Public stream API or the REST API search endpoints and filter the results?
The private endpoint will be shut down by 20 Nov and there'll be nothing to replace it. This blog post from Twitter explains the background: apparently it's to do with their move to their new "real-time, multi-tenant distributed database" system codenamed Manhattan.
The REST API will be of limited use for this purpose. You'd have to do a search for your URL, collect each page of results and add up the total number of tweets yourself. For example this request
https://api.twitter.com/1.1/search/tweets.json?q=metro.co.uk&count=100
will get tweets associated with http://metro.co.uk. (It won't work if you just paste this into your browser - you have to authenticate first. You can try this on the Twitter API console tool.) But the Search API returns a max of 100 tweets per page of results, and it only returns tweets from the last 7 days.
It seems the only solution (explained here) is an elaborate one using a Twitter Streaming API. Basically you'd have to create your own app to count relevant tweets. It would open a connection to stream.twitter.com passing your URL as a track parameter. Twitter will return a tweet every time anyone tweets the address, and your app will have to count them. The example given in that post is:
curl -u user:password "https://stream.twitter.com/1/statuses/filter.json" -d "track=https%3A%2F%2Fdev.twitter.com%2Fdiscussions%2F5653"
I'm not sure how you would deal with shortened URLs in this scenario.
This change has meant that third-party services like SharedCount that report a count of Twitter shares are having to stop offering that data. Sorry to give you bad news - I'm really disappointed with this situation myself. It seems crazy that we can't just get a total of tweets for a given URL.
You can find a little bit more about this in this thread.
I'm using the OneNote REST API (documented here). According to the documentation, calling the 'pages' endpoint returns "all the OneNote pages across all notebooks ..."
The endpoint I'm calling: https://www.onenote.com/api/beta/me/notes/pages
This seems to work in most / some cases, but pages which are part of sections which are themselves placed in section groups aren't returned.
Does anyone know if I'm doing something wrong on my side? Could it be a bug in the API or its documentation?
The OneNote API returns, by default, only 20 pages at a time. Using OData operators like $top and $skip, you can walk through all of the results of the API. We believe that the pages you're not seeing may be the result of not walking through all of the page results. The page result will also have a "next link" included to make this easier.
I've been using Google Plus HTTP API for several weeks now and I'm experiencing a strange issue.
When I try to retrieve public activities from this community: https://plus.google.com/communities/115653528125420367824, I always get 4 results, no more. I've tried increasing the maxResult parameter of the request but it doesn't change anything...
And when I use the nextPageToken to retrieve the missing activities, the "items" field of the response is empty.
You can try it yourself with the Google APIs Explorer here: https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.list?userId=115653528125420367824&collection=public you will see that only 4 activites are returned and the next page of result is empty.
This is really strange and happened recently, it used to work fine. Maybe it is caused by the fact that the content of some activities of this community contains a stringified JSON object. What do you think?
The activities methods are only supported for retrieving posts by users and Google+ Pages. They are not supported for use with Communities and should not be expected to work correctly. There is definitely no guarantee that this behavior while it might have worked or currently works in some cases today will continue to work in the future.