I'm currently working on requesting a list of events between 2 dates via Microsoft Live's REST API. I am able to pull back a list of events through the following request URL:
https://apis.live.net/v5.0/me/events
However, this returns a list of events that does not have any specific date frame. For example, I'd want to call a request similar to this:
https://apis.live.net/v5.0/me/events?startDate=2015-02-15&endDate=2015-03-15
I haven't been able to find any useful Microsoft documentation in their disorganized mess of "documentation", so my questions are:
1 - What changes need to be made to the first endpoint above for something like this to work?
2 - What time format does Microsoft use for this kind of request?
Thanks!
I finally found the answer in the middle of a Microsoft documentation page.
Get a limited number of events based on their starting and ending times in Coordinated Universal Time (UTC) format by using the start_time and end_time parameters
To answer my own questions:
#1 - The following endpoint works:
https://apis.live.net/v5.0/me/events?start_time=2015-02-15T00:00:00Z&end_time=2015-03-15T00:00:00Z
#2 - The time format is as follows:
yyyy-MM-dd'T'HH:mm:ss'Z'
Related
I am trying to get historical USD prices for BTC from the Coinbase API. The relevant section of the documentation is here. I've never interacted directly with an API before, so at the moment I'm just trying to figure out how to format the request.
To get the current price, this works:
https://api.coinbase.com/v2/prices/BTC-USD/spot
However, if I want to get historical prices I need to specify a date as indicated in the docs, but I can't seem to get the format right. I'm sure this is a standard format of which I am just unaware, so hopefully someone can point me in the right direction.
I've tried:
https://api.coinbase.com/v2/prices/BTC-USD/2018-01-01
https://api.coinbase.com/v2/prices/BTC-USD/date/2018-01-01
https://api.coinbase.com/v2/prices/BTC-USD/resource?date=2018-01-01
https://api.coinbase.com/v2/prices/BTC-USD/resource/date=2018-01-01
(something along the lines suggested here)
What is the correct formatting for the API request?
You should format the request as
https://api.coinbase.com/v2/prices/BTC-USD/spot?date=2018-05-21
And you should include a CB-VERSION
CB-VERSION: 2017-08-07
if you want to avoid an API warning
When retrieving data from the /videos API endpoint using the SINCE and UNTIL parameters, what are the time-based data fields that the API is using to filter the result set?
In the example below, I am retrieving videos from July 28th through July 30th, but a video in the result set was created and last updated on August 2nd and there is a video published on July 29th that is excluded:
https://graph.facebook.com/v2.9/8429246183/videos?since=2017-07-28&until=2017-07-30&fields=created_time,updated_time&access_token=[token]
This is the only documentation I have found that discusses the SINCE and UNTIL parameters and that only says that they represent "a Unix timestamp or strtotime data value that points to the [start/end] of the range of time-based data."
https://developers.facebook.com/docs/graph-api/using-graph-api
Facebook has stated in the bug report submitted on this issue that the SINCE and UNTIL parameters filter on an unpublished field based on the time that a video draft was originally created or scheduled. While this is not the ideal behavior, they have said that they do not currently have plans to correct this in the immediate future.
I am new to this stuff, I am trying to use Facebook api Graph to get the data for the last 30 days and link it to Klipfolio.
I am able to pull all the data but no matter what i try I can not seam to get FB to only return all of the data not just last 30 days or 7days.
am I able to a time frame parameters?
Any help would be appreciated, this is what I have to pull all the data,
/adaccounts?fields=amount_spent
Thanks
i don't use facebook adds so i can't exactly test with data . but facebook graph api supports time based pagination of the data . read the time based pagination section at the graph api v2.2 docs page. .
it provides with until and since parameters.
A time-paginated edge supports the following parameters:
until : A Unix timestamp or strtotime data value that points to the
end of the range of time-based data.
since : A Unix timestamp or
strtotime data value that points to the start of the range of
time-based data.
i checked it with end points like
me/feed?until=10/11/2011
and it works as expected . so test the parameter for your required data .
Explanation:
I am able to query the Google Core reporting APIv3 using the client library to get data on pageviews for specific URLs of a website I am working on. I want to get data(pageviews) for each day within a specified range. So far I am simply looping through the range, sending individual request to the API. in each request I am setting the same value for the start date and the end date.
Problem:
Obviously this gets the job done, BUT it is certainly not the best way to go about it. Because, assumming I want to get data for the past 3 months for each of about 2000 URIs. Then I will need 360000 number of requests and that value is well over the limit quota defined by Google.
Potential solution: So one way I thought of solving this issue is probably to send a request setting start-date and end-date to be a week apart but the API will return a sum of the values rather than the individual values.
main question: So is there a way to insist that these values should not be added up and returned as a sum but rather returned (as associative array or something like that) separately for each.
I hope the question is clear and that there is a solution! Thank you!
Very straightforward:
Metric: ga:pageview, Dimension: ga:date, Set a filter for your pagepath, and set a start-date and end-date.
Example:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3Axxyyzz&dimensions=ga%3Adate&metrics=ga%3Apageviews&filters=ga%3Apagepath%3D%3D%2Ffaq.html&start-date=2013-06-27&end-date=2013-07-11&max-results=50
This will return the pageviews for that the faq.html& page for each day in the time-frame.
You should check out the QueryExplorer. Great tool to find out how to structure queries.
Right now I am working on a project to fetch data from a SharePoint list using SOAP API. I tried and successfully fetches the complete list, but now I want to fetch some specific data that is updated after a specific date.
Is this possible to fetch such data using SOAP query. I can see last update filed when I view single item at the bottom. Is this some how possible to use that filed?
Yes you can use the Web Services to do lot of things just like filtering a list result. I don't know which language you use, but with JavaScript you can look at these two frameworks that should help you:
http://aymkdn.github.io/SharepointPlus/ : easy way to create your queries (I created it)
http://spservices.codeplex.com/ : the most popular framework but less easy to use (it's my point of view)
You can also look at the documentation on MSDN (the param to use is query): http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
At last found the answer,
The last update date and time can be retrieved from the list column "Modified".
The soap response will have the value in the attribute "ows_Modified".
Muhammad Usman