How much data can I retrieve and store from the Jawbone UP API? - jawbone

Re-posting from a direct API support contact.
I would like to know how many days of data can I get access to per API call? If limited, how far can we go back in time?
Are you limiting the number of API calls.
I know you don't allow storing data on my side, that's why I would like to query every data in one time to analyze it.

Each endpoint has it's own methods and parameters for retrieving data over time, but in general, the UP API does not place limits on the amount of data you can request in a single call.
If the amount of data you have requested exceeds a certain limit, the API response will automatically page the requested data and provide you with a next URL that you can use to retrieve the next page of data.
The only limitation is how much historical data a particular UP user has.
Here's an example request/response from the moves endpoint.
Request
GET https://jawbone.com/nudge/api/v.1.1/users/#me/moves?start_time=1383289200 HTTP/1.1
Host: jawbone.com
Response
(Scroll to the bottom to see the next link)
HTTP 200 OK
{
“meta”:
{
“user_xid”: “6xl39CsoVp2KirfHwVq_Fx”,
“message”: “OK”,
“code”: 200
"time": 1386122022
},
“data”:
{
"items":
[{
"xid": "40F7_htRRnQwoMjIFucJ2g",
"title": "16,804 steps",
"type": "move",
"time_created": 1384963500,
"time_updated": 1385049599,
"time_completed": 1385099220,
"date": 20131121
"snapshot_image": "/nudge/image/e/1385107737/40F7_htRRnQwoMjIFucJ2g/grEGutn_XYZ.png"
"details":
{
"distance": 14745,
"km": 14.745,
"steps": 16804,
"active_time": 11927,
"longest_active": 2516,
"inactive_time": 32760,
"longest_idle": 27180,
"calories": 1760.30480012,
"bmr_day": 1697.47946931,
"bmr": 1697.47946931,
"bg_calories": 1099.9439497,
"wo_calories": 388.506116077,
"wo_time": 11484,
"wo_active_time": 3902,
"wo_count": 2,
"wo_longest": 2516,
"sunrise": 1409578680,
"sunset": 1409625420,
"tz": "America/Los Angeles",
"tzs":
[
[1384963500, "America/Phoenix"],
[1385055720, "America/Los_Angeles"]
],
"hourly_totals":
{
"2013112101":
{
"distance": 1324,
"calories": 90.0120018125,
"steps": 1603,
"active_time": 793,
"inactive_time": 220,
"longest_active_time": 302,
"longest_idle_time": 780
},
"2013112101":
{
"distance": 626,
"calories": 47.0120018125,
"steps": 455,
"active_time": 246,
"inactive_time": 260,
"longest_active_time": 203,
"longest_idle_time": 650
},
... more hours ...
}
}
},
{
... more items ....
}],
"links":
{
"next": "/nudge/api/v.1.1/users/6xl39CsoVp2KirfHwVq_Fx/moves?page_token=1384390680"
},
“size”: 10
}
}
The UP API will not limit the number of calls you can make. However, the API does have Rate Limiting, which could keep you from issuing a large amount of requests over a short period of time. Here's the details from the FAQ:
What is the rate limit for your API?
The API includes very high rate-limiting safety valves that should be
more than enough for the standard application. If you find that your
application is exceeding these limits, please let us know your
intended use and call volume, so we can review the provisions.
And finally, there is no rule preventing you from storing data that you have retrieved from the API. The only requirement is that you comply with the privacy and data removal policies outlined in the UP API terms.

Related

Twitter API v2 - Making a loop that collect an ID from a response, and insert on the next request

I'm having trouble looping a group of requests on the "Full Archive Search" on Twitter API v2.
I need to get all the responses from a determined subject, but there is a limit of tweets per page. To cover this, a "next_token" is generated on the body response. I need to make lots of requests using the "next_token" as a parameter to the subsequent request.
The thing is, I have no idea how can i make a loop, and collect all the responses.
There are more than 500.000 tweets in the period that I am searching for. And the limit of tweets per page is 500.
I'm using the default request from the "Full Archive Search", on Twitter API, using "query", "start_time" and "end_time"
The response that I got has a limit of tweets per page. At the bottom of each page, have the following lines:
"meta": {
"newest_id": "1321965025809059840",
"oldest_id": "1321964960956768256",
"result_count": 8,
**"next_token": "b26v89c19zqg8o3fosbski4ttnan7ven9iyr8gbrdfiwt"**}
I need to get that "next_token" and add it to the subsequent request.
Does anyone have an idea how can i collect all this data?
Edit: I tried to use the code below to get the "next_token":
pm.test("Set Next Token", function () {
var jsonData = pm.response.json();
console.log(jsonData.next_token)
pm.collectionVariables.set("next_token", jsonData.next_token);
});
But it returns to this error:
{
"errors": [
{
"parameters": {
"next_token": [
"null"
]
},
"message": "Invalid 'next_token':'null'."
}
],
"title": "Invalid Request",
"detail": "One or more parameters to your request was invalid.",
"type": "https://api.twitter.com/2/problems/invalid-request"
}

Linkedin endpoint adAnalyticsV2

I am having an issue in getting the data from LinkedIn API , I have got the permissions and trying postman to test endpoint to get data mention below is my get request , every time the response is an empty elements list with 200 ok. any help in this regard will be highly appreciated. I am sure that their is data its not that there is no activity but cant retrieve via api request.
https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&dateRange.start.year=2019&dateRange.start.month=5&dateRange.start.day=28&dateRange.end.year=2021&dateRange.end.month=9&dateRange.end.day=30&timeGranularity=DAILY&pivot=MEMBER_COMPANY&projection=(*,elements*(externalWebsiteConversions,dateRange(*),impressions,landingPageClicks,likes,shares,costInLocalCurrency,pivot,pivotValue~(localizedName)))&fields=externalWebsiteConversions,dateRange,impressions,landingPageClicks,likes,shares,costInLocalCurrency,pivot,pivotValue&accounts[0]=urn:li:sponsoredAccount:123456789
and this is the response every time
{
"paging": {
"count": 10,
"start": 0,
"links": []
},
"elements": []
}

Social Tables API: Event field values for Industry and Type are lost in browser UI

I create an event using the POST /4.0/legacyvm3/teams/{team}/events function with the following data:
{
"name": "My Event",
"category": "event",
"type": "Conference",
"industry": "Corporate",
"start_time": "2017-05-10T10:00:00.000Z",
"end_time" : "2017-05-10T11:00:00.000Z",
"spaces": [
{
"name": "My Room"
}
]
}
and get the following response:
{"id":2474582,"user_id":138947,"team_id":"49992","name":"My Event","category":"event","venue_mapper_version":2,"start_time":"2017-05-10T10:00:00.000Z","end_time":"2017-05-10T11:00:00.000Z","uses_metric":false,"public":false,"attendee_management":true,"spaces":[{"id":4696516,"name":"My Room","event_id":2474582,"space_order":0}]}
All good. But when editing the event in my browser using the URL:
https://app.socialtables.com/?event=2474582
I am prompted to select a value for Industry and Type. Also, the start and end times are both appear as 11:00. Why is this?
Start and end times look correct given that our API assumes you're using UTC (I see 6 and 7am EDT) when I open your event. It also was 10 and 11 in the response you posted.
Probably more importantly, you're using our legacy API and are therefore being pushed to our legacy product. There is a 4.0/events endpoint available to use. If you're writing your integration now I strongly recommend using these endpoints: https://developer.socialtables.com/api-console#!/Events/post_4_0_events

Yodlee AddSiteAccount1 issues

I am trying to verify various MFA based accounts Yodlee API by performing following steps:
Successful call to addSiteAccount1
In response, it does return siteAccountId
In response, it also provides site refresh status that REFRESH_TRIGGERED
if resp['siteRefreshInfo']['siteRefreshMode']['refreshMode'] == 'MFA' and
resp['siteRefreshInfo']['isMFAInputRequired'] == True and
resp['siteRefreshInfo']['siteRefreshStatus']['siteRefreshStatus'] ==
'REFRESH_TRIGGERED'
Now, calling getMFAResponseForSite repeatedly together with getSiteRefreshInfo results into initially code 801 and than 508 eventually timeout.
Eventually, I come out of the loop with result isMessageAvailable: True
{u'itemId': 0,
u'retry': False, u'timeOutTime': 99880, u'memSiteAccId': 10144098,
u'errorCode': 0, u'isMessageAvailable': True, u'fieldInfo':
{u'questionAndAnswerValues': [], u'numOfMandatoryQuestions': -1,
u'mfaFieldInfoType': u'SECURITY_QUESTION'}}
The only concern I have is that it provides mfaFieldInfoType, but it doesn't provide the actual question.
Couple questions:
a. How do I retrieve proper MFA question(s) for the site?
b. If user is initially coming into system and would like to link account more than couple second wait for user will kill the experience - so what's the recommended time period to be allowed to get MFA question?
c. Is this due to development vs. production environment difference?
d. I can retrieve account and holdings details for account, however than the account results in NON_REFRESHABLE state.
After calling addSiteAccount1 API, you get siteAccountId for an account.
Pass the siteAccountId to getMFAResponseForSite API and keep polling until you get the MFA form. then pass the MFA form with valid values to putMFARequestForSite API.
Please refer to our API flow- https://developer.yodlee.com/Aggregation_API/Aggregation_Services_Guide/API_Flow/Add_Site_Account
Blockquote
Sample response-
{ "isMessageAvailable": true, "fieldInfo": {
"questionAndAnswerValues": [
{
"question": "What is the name of your state?",
"questionFieldType": "label",
"responseFieldType": "text",
"isRequired": "true",
"sequence": 1,
"metaData": "QUESTION_1"
},
{
"question": "What is the name of your first school",
"questionFieldType": "label",
"responseFieldType": "text",
"isRequired": "true",
"sequence": 2,
"metaData": "QUESTION_2"
}
],
"numOfMandatoryQuestions": 2,
"mfaFieldInfoType": "SECURITY_QUESTION" }, "timeOutTime": 97340, "itemId": 0, "memSiteAccId": 10003775, "retry": false }

Unable to retrieve page insights using Graph API explorer

I have the 'Insights Analyst' permission to my facebook page, and I try to use Graph API Explorer to get the metric page_fans
I "Get Access Token" with 'read_insights' and 'manage_pages', and "Submit" a graph API call that looks something like
GET /<page_id>/insights/page_fans
But then I get an empty response. (This occurs for all metrics except page_story_adds_unique, page_storytellers, and page_admin_num_posts)
{
"data": [
],
"paging": {
"previous": "https://graph.facebook.com/<page_id>/insights/post_storytellers/?since=1369004893&until=1369264093",
"next": "https://graph.facebook.com/<page_id>/insights/post_storytellers/?since=1369523293&until=1369782493"
}
}
What permissions am I missing? What am I doing wrong?
There seems to be a larger than usual backlog of data missing in the insights at the moment. Use values for since and until to see where the data is.
/<page_id>/insights/page_fans?since=1369008000&until=1371686400
The numbers are unix timestamps to specify the date range you want. If the range is too large then you will get
"error": {
"message": "Unsupported operation",
"type": "FacebookApiException",
"code": 100
}
I know it's very frustrating and Facebook seems to not have any proper way of checking that the data is backlogged.