is it possible to get the list of users in Box using api calls?
i'm currently using "https://api.box.com/2.0/users" to get all users but what i want to achieve is that i want to get list of users filtered by date created? is there any way how to do that?
here's a sample screenshot for api call using postman
You can get a list of users filtered by date created using the Enterprise Events endpoint.
When you query the Enterprise Events endpoint, you can filter for specific event types using the event_type parameter. The API event name for new user creation is "NEW_USER". The created_after and created_before parameters let you specify a time range for the events needed.
Is there a way to get transactions for all container accounts that belong to a specific site aggregated using Yodle APIs?
For example, the American Express Cards (siteId: 12) have bank, credits, loans and etc enabled containers.
So, can we get the transactions for all enabled container accounts for a single site?
If you mean to ask this- "Is there a way to get transactions for all the accounts(all containers) belongs to a particular site?" Then.
Yodlee provides two ways to get the transactions.
Getting transactions for a specific account i.e., you need to provide itemAccountId for each account to get the transactions for the specific account using executeUserSearchRequest API.
Getting transactions for all the accounts i.e., you need not to provide itemAccountId for any of the particular account while provide rest of the input parameters to get transactions using executeUserSearchRequest but this will return you transactions for all the accounts. Using your example, it will give you transactions for all the container present under SiteID-12 as well as other sites added by the consumer. Though you can use the second approach to get the transactions for all accounts and then filter it out for all containers belongs to a specific site. You can use the sumInfoId(ContentServiceID) present in the response for each transaction.
Scope:
I am starting an application that will need a very rich database of venues within a certain city right on it's start so i thought that scraping foursquare's database would be a great idea, but seems like scraping volumes over 1000 venues is considered forbidden according to it's usage / data retention policy
My Needs:
Basically, what i want to achieve is a way to allow users to search their favorite venues and receive notifications from them, so having all the venues of this city would be perfect for me, allowing me to store the relationship USER XXX FOLLOWS YYY VENUE
Problem:
Since i can't "copy" / "transfer" all the foursquare venues of a given city to my own database, what can i do to actually "store" the data i need for my own use ?
Is there any workaround for this ? (I don't mean ilegal actions, but some clever use of the API instead).
You can force your users to connect with 4sq (with oauth), then retrieve the data you need using oauth tokenwith 4sq api, which does not violate the rules and put any limits to the amount of data.
You can store user's 4sq id and the venue ids they follow in your own db and retrieve the details as needed. Am I missing sth with this flow?
I have an MVC 4 based web app. Where I provide 2 login types, 1. Employee and 2. Customer. With Customer login, I present a dashboard and other stuff, about his orders, etc. With Employee login, I allow the employee to search for his customers and provide the ability to carry out certain customer specific tasks.
It is possible that, an employee after login can seach for a number of customers and fetch each of their details in multiple browser tab(s).
I am having difficulty in maintaining state for each tab, if I put the unique identifier of the customer in session, as the next subsequent request will overwrite the session!
To solve this, I have relied on a (dirty) viewbag based solution, where I set the customer number in viewbag in every view.
Is there an elegant solution to solve this? a known design pattern?
Assume there's a mobile app and a server.
I have question about rate limiting and hoping someone can give some advice on a design as I'm banging my head on how to navigate around rate limit. There must be something I"m missing because the 150 unauthenticated rate limit per IP per hour is extremely low.
Imagine the scenario I want to build is the following (simplified into a trivial example for this discusion). Assume user is signed into Twitter for this entire discussion to remove discussion about oAuth.
Mobile talks to our service to show users twitter friends list. Every time the mobile app is loaded, it will show the entire friends list, and highlighting the new friends that were added within the last 2 days.
That's it. But the trick is that I want to ensure that the friends list is always up to date in the client, which means our server has to have the most recent up to date friends list.
Periodically, I want my server to automatically scan the Twitter friends list for every user of my app to see if new friends have been added.
Our initial design was getting our server to do all the work with this flow:
New User signs in on client, gives access token to server
Server makes call to Twitter REST APIs to get initial friends lists
Server stores the Twitter Friends IDs and shows responds to the client with that list.
Periodically (e.g. every 48 hours), server checks Twitter REST APIs for friends list for each user and compares it to our cached Twitter friends list we have for them to see who is new and to highlight in the mobile app.
The good thing about this is that all the interaction with twitter to get friends list, compare and peridiocally refresh is on the server. Mobile client just makes a single call to my server and gets friends list.
The problem with this design is that it will work for a single user, but since the rate limit is 150 per hour on un-authenticated calls, I will hit my limit as soon as 151 users user my service (which has a fixed IP).
The only solution I can see is to have the client do the work for each user, then send me the friends list which my server caches. This takes care of Step #2 above. However, for Step #4, I'd have to build something into the client to auto refresh twitter friends and send back to the server.
This is super clumsy to have the client involved at all in this Twitter friends list operation.
At first I thought I was crazy and the public unauthenticated APIs like getting friends lists wouldn't be subject to rate limiting. However, according to their docs, it is.
Am I missing something obvious or is the only way to solve this is to put heavy logic into the client?
With whitelisting gone for those that aren't grandfathered or Twitter business partners, I don't think you have any alternative but to have your mobile app do the Twitter API calls from the handset.
Having the handset call Twitter isn't a bad thing by any means. Pretty much every Twitter client in the world does it. One benefit will be that the user will be authenticated to Twitter, and thus her full 350 calls per hour will be available to you. Keep in mind, however, that you should minimize your calls since the user may have other Twitter-aware applications installed on her handset eating into your call allotment, and vice versa.
Now to the solution. The way I would implement your use case would be to first fetch the complete list of friends for your user by calling the friends/ids method.
http://api.twitter.com/1/friends/ids.json?screen_name=yourUsersName
The above call will return the most recent 5,000 friend IDs, in order followed, for #yourUsersName. If you want to fetch more friend IDs than the first 5,000, you'll need to specify the cursor parameter to initiate paging.
Next, I would check the latest list of friends we just fetched against the list on the handset, syncing them by removing any IDs that are no longer present, while adding any that are new.
If we only need the friend IDs, then we're done at a cost of one API call per 5,000 friend IDs. If, however, we need to get user info for these new friends as well, then I would call users/lookup and pass in the list of all new users that we discovered while syncing friend IDs. You can request up to 100 user objects at a time.
http://api.twitter.com/1/users/lookup.json?user_id=123123,5235235,456243,4534563
You user must be authenticated in order to make the above request, but the call can fetch any Twitter user profiles you wish -- not just those that are friends of the authenticated user.
So, let's say for example that a user has 2,500 friends and has never used your app before. In that case, she would burn one call to fetch all of the friend IDs, and 25 calls for her friends' information. That's not too bad to get the app populated with data.
Subsequent calls should be more streamlined with probably only two calls burned (one for the IDs, and one to get the new friends).
Finally, once the data has been updated on the handset, the deltas for the IDs and user data can be gathered up and pushed to your server.
It may even be possible that your server application won't even have to interface with Twitter at all, and that should alleviate the 150 user limit you are encountering.
Some final notes:
Be sure to note in your app's privacy policy that you sync your user's friend list with your server.
I recommend specifying JSON as the return format for all Twitter API calls. It is a much more lightweight document format than XML, and you will typically transfer only about 1/3 to 1/2 as much data over the wire.
Pick a Twitter framework appropriate for your mobile device and your programming language. Twitter access is a commodity these days, and there's little to no reason to reinvent how to access the Twitter API.
I answered a similar question about an approach for efficiently fetching followers here.
Since you are making request on behalf of users you should make those requests be authenticated as those users. Then requests will count against each users own pool of 350 requests/hour.