WSAPI - Can you get the User Profile Image? - rally

It looks like the User object contains most of the information found on the user detail page within Rally (with the rest seeming to be on UserProfile). - However in Rally I can see the users "Profile Image", but I don't see a way of querying this using the API.
Is there a way to query the user profile image for each user (in particular for all users where the profile image has not been set)?

In WS API object model neither User nor UserProfile object has an attribute that points to the profile image.
You may however access it via a URL that follows this syntax:
https://rally1.rallydev.com/slm/profile/viewThumbnailImage.sp?tSize=150&uid=12345
Where 12345 is the OID of the user.
This is not officially supported.This URL endpoint may change without notice.

Related

Issues with retrieving profile image from Google Admin SDK/Directory API

I am trying to retrieve a user's profile picture in Python using either the users.get method or the users.photos.get method from the Google Directory API. I have set up my service account with the proper scope, and I get a 200 response when calling both endpoints, and can view actual data for every field, but when trying to access the profile image, I get a generic silhouette image. The methods I have used to try and access the profile images are:
With the users.get method, I have tried making a get call on the thumbnailPhotoUrl field using AuthorizedHttp under google.auth.transport.urllib3 from the Python google-auth package. The AuthorizedHttp object is created using the google service account credentials.
With the users.photos.get method I have tried decoding the photoData field with web-safe base64.
Most likely their photo is only linked to their Gmail account profile, which is inaccessible via the Admin API. You need to upload their photo directly through the admin.google.com GUI. Then your request will return that photo.

Advice on implementing secure page with a list returned from REST API

I'm new to Piranha CMS and just trying to get my head around it. I'm using the MVC implementation and I need to do the following:
I need to extend the User with a property that stores an account number.
I need a page that is only accessible once the user logs in
On this page, I need to call a REST API on another server, using the account number a parameter, to retrieve a list of documents that the user has stored on this server.
When the user clicks the document, it will be downloaded as a PDF using the REST API once again
I just need general guidance on how to do this. How do I store the account number against the user (and manage this) and do I need to create a new Region that will show the list of documents from the remote server. Is there an example of creating a new Region anywhere and maybe returning a list from SQL that I can adapt?
Any help gratefully received.
Thanks in advance
Mike
The easiest way is to implement an extension with your custom fields that you attach to the user where you store this information.
When editing a page, go in under "settings" and select which groups should have access to your page. For this purpose I suggest creating a new group for site users that are not admins.
This should be easily implemented in either the controller or model for your page. When the user is logged in "User.Identity.Name" is the user id. Get the user, load the extensions & use the account number.
See number three.
Regards

wso2 show all api list without login

I have created 3 api, one with
owner=apicreator
visibility=public
and the others two with
owner=admin
visibility="restricted by role".
Once I opened the store home page the only api visible is the one created with apicreator, then when I logged in as admin I can see the other two apis (final count of 3).
Is it possible to show all the api (doesn't matter by the owner or creator) in the store home page, without login?
Is there any configuration change to apply or any change in the jaggery code(I don't want to change the visibility)?
Thank you in advance
Claudio
Is it possible to show all the api (doesn't matter by the owner or
creator) in the store home page, without login?
If an API's visibility is based on roles, how do you expect API Store to show it to public?
Once a user logged in to the API Store only, we can identify their roles and based on that, API will be visible to him

OpenGraph API User Object Sometimes Returns Link that 404s

In my application I allow users to connect their Facebook accounts via oauth for the purpose of posting via our interface. We support both page accounts and regular accounts that simply manage pages.
We also inspect the result of the opengraph API call to get a valid URL to their profile, or page. The primary endpoint we use is https://graph.facebook.com/me (with oauth credentials). For some page-only accounts, the returned object has a 'link' value that, when entered into a web browser, 404s.
The bad URLs I have seen fall into two distinct cases:
The URL can be of the form 'www.facebook.com/{page_id}' which 404s on some pages, but not others.
The URL can be of the form 'www.facebook.com/profile.php?id={user_id}' which more often than not 404s.
The only URL format I have seen that works for all accounts is www.facebook.com/profile.php?id={page_id}. In the first case, we detect that the 'link' field isn't of the proper form (using profile.php?id=...), and construct a URL with the proper structure, and it works.
My next heuristic I'm considering adding is to see if the URL is of the proper form....but uses the {user_id} as the id argument to profile.php, and just construct the URL using the {page_id}. Obviously, this is getting ridiculous.
So, is there a good way to know if an account will give back a link that is invalid? Is this a bug in the API? What is the most reliable way to, given a User on the open graph API, to get a working link to their profile/page?
Using 'www.facebook.com/{page_id}' or 'www.facebook.com/profile.php?id={user_id}' will always work - they are both the same. The only reason you'll see a 404 is if the Page has been unpublished / deleted or if the user has deactivated their account.

Programmatically retrieve a list of a user's Facebook pages

Greetings,
Using the Facebook API, I have obtained an OAuth access token for a user. I can use it to retrieve information about the user and post to their wall, etc. I'm trying to figure out how to (or if there is a way to) programmatically get a list of pages a user owns (so that they can be presented in a drop-down list on a third-party site). I have been unable to find such a method in the Facebook API, but I'm hoping I've missed something.
Thanks!
Since this question was asked, Facebook has added a new connection on the "User" Graph API object: accounts.
The Facebook pages owned by the
current user. If the manage_pages
permission has been granted, this
connection also yields access_tokens
that can be used to query the Graph
API on behalf of the page. Graph API Reference: User