unable to extract all users using ranger rest api user query - apache-ranger

I am able to get specific user details using following query string
/service/xusers/secure/users/305
but not able to see same user when extracted all users using
/service/xusers/users
any specific reason? I checked that there is no API call to get all users using /secure

looks like a bug in ranger however i was able to download entire user list using following query
/service/xusers/users?page=0&pageSize=1000&userRoleList%5B%5D=ROLE_SYS_ADMIN&userRoleList%5B%5D=ROLE_USER&userRoleList%5B%5D=ROLE_ADMIN_AUDITOR'

please use the following API : /service/xusers/users/305 instead of /service/xusers/secure/users/305

Related

Add Last Login to Users api call

Our customer wants to see a report of all their current users' last login dates, but I couldn't find a way to get that information from the current API:
http://docs.valence.desire2learn.com/res/user.html
It's a little frustrating, because it's so easy to get this data in the UI itself:
Is there any way we can get that data through the API? Thanks!
Currently, there is no way to get this information via an API call; however, you are not the first person to inquire about this, and I suspect it's on D2L's list of improvement items for their developer platform.

how to tag a facebook profile from graph api

I want to post to a facebook page through API. I created a access token in the graph api explorer. I am able to successfully post to a page. I am trying to mention a person I am not able to. The old #[id:name] is not working. But there seems to be a way with this. But the issue is I am not able to tag because it wants me to enable tagging in actiontypes.
After enabliing Tags in the Action Types section of the App Dashboard, add a tags parameter to your action publishing call, where tags is a comma separated list of tagging tokens for each person. These tagging tokens are retrieved using the /user/taggable_friends Graph API edge.
When I click the link for action types it asks me for a app but it is not showing graph api. Is there something fundamentally wrong with what I am trying. How to proceed? I am using the Koala gem.
Not sure if I understood you correctly, but if you want to tag some friends within a post, you should use the /me/taggable_friends endpoint to get a list of friends:
https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends/
Then, you can use those to fill the message_tags of the respective post:
https://developers.facebook.com/docs/graph-api/reference/v2.3/post

How to get JIRA issues assigned to the current user using the JIRA REST API?

I'm trying to get a list of issues assigned to the current logged in user using the JIRA REST API, but I can't find any documentation on how to do that.
What do I need to do in order to get the issues assigned to the current user?
You can specify the issues you want to receive by using jql.
In your case rest/api/2/search?jql=assignee=currentuser() should do the trick.
Here is the relevant part of the documentation of the REST api and here is the description of the used jql-function.

How do I get the retweet_count of a given tweet WITHOUT user interaction?

I have a list of tweets that are using a hashtag I made. I'm getting these tweets using the search api. All I want is to get the number of retweets. I DO NOT need to post on their behalf. It seams ridiculous that I would need to have every single user login to my site, login to twitter and approve my application via OAUTH for EVERY TWEET IN MY LIST. There's gotta be a way to get that number without the need for oauth.
I tried getting it directly from the search api, but that's not consistently there. I've tried https://api.twitter.com/1/statuses/show/275729088709283840.json but that doesn't work, for some reason. Is there anyway to do this extremely simple task without going down the asinine road of user-interaction?
You have to create a background-process that uses the stream API. Phirehose is a php library that is set up to do this: https://github.com/fennb/phirehose

How to automatically post a tweet on twitter

I am working on a site where users can submit data. Is it possible to set up an automated system such that a tweet goes out every time a new data set is received?
I believe it's possible through their own API: http://apiwiki.twitter.com/w/page/22554648/FrontPage
A good place to start is the Twitter API.
Using Abraham's Oauth library in your application and once you have verified/cleaned user import use the variables in an if statement and then call the library and post a tweet. i have a similar set up for adding films i've seen into a database and it tweets a rating everytime.
I can provide coding example (PHP) later if you need further help.

Resources