How to retrieve User Management Report? - smartsheet-api

I have been using Python to explore smartsheet api in order to retrieve information for Power BI and/or user management.
Some of the reports I will like to retrieve are the ones from Account Administration tab. For example the report from "Download User List (csv)" or "Download Sheet Access Report (csv)".
Is there a report id for these, or a direct link?

The API documentation has all the details and code examples you may need.
First, list the reports the user has access to, to find the name of the report you're looking for.
response = ss_client.Reports.list_reports(include_all=True)
reports = response.data
Then once you've identified the corresponding report, use the report's id to then request a csv export.
ss_client.Reports.get_report_as_csv(
3882962191181700, # report_id
download_folder_path
)

Related

Fetch the data from Power BI related to username/emailId by whom Azure Pipeline was ran

"https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/PipelineRuns?"
Using this url I am able to fetch RunNumber, RunReason but unable to fetch RunBy which user.
You could get the user that requested the run using predefined variables.
$(Build.RequestedFor)
And additionally you can also use
echo $(Build.RequestedForEmail)
echo $(Build.RequestedForId)
https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#identity_values
There are some predefined variable for RunReason and BuildID as well.
$(Build.Reason)
$(Build.BuildId)
According to your description, I tried to get the odata feed "https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/PipelineRuns" in Power BI, currently there is no option to fetch who trigger the pipeline. And check the REST API is also without this.
You could use "Request a feature" on the left side of Developer Community to open a new suggestion ticket.
For more information about who trigger the pipeline, you could refer to this.

How to: Get Report Definition using SSRS RESTful API?

I have been working with the RESTful SSRS endpoint documentation at https://app.swaggerhub.com/apis/microsoft-rs/SSRS/2.0 and It states that I can retrieve the Report defintiion for my reports, however I cannot find any of the endpoints to do such?
From Microsoft docs:
The REST API can also be used to provide more advanced functionality,
such as:
Navigate the folder hierarchy Discover the contents of a folder
Download a report definition
Modify default report parameters Change
or execute a refresh plan A whole lot more
The REST API is a RESTful successor to the legacy SOAP API.
Maybe I am missing something?
I am able to get the Parameter Definitions, the report by ID,
however passing in any parameters such as
https://{myreportserver}/reports/api/v2.0/reports({id})?paramter1=somevalue
does not return any definition. I am trying to get a definition return so maybe I can render the report on a web application (or at minimum provide a pdf download of the report?)
Late to the game, but in case anyone else is looking for this answer, use this URL:
https://{myreportserver}/reports/api/v2.0/reports({id})?Content/$value

How to get name of report used by different user in jasperserver

I am using jasper server enterprise version 7.0. Multiple users login to the server I can get the user name by using parameter - LoggedInUsername. But how can i get which report is used by the Logged in user. Is there any method to do so or is there any workaround for this?
Inside a report template (JRXML), you can get its own name calling $P{JASPER_REPORT}.getName():
And this is what you see when it's published to the server (6.4.2 in my case):
As you can see from the screenshot, the report file name and report name do not necessarily have to match.
For further details, see: http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/JRParameter.html#JASPER_REPORT

how to get all the Task in a Workitem in Json form by postman for TFS API

i am currently using TFS API who's link is
https://www.visualstudio.com/en-us/docs/integrate/api/wit/work-items#byids
currently in my project i want to accees the following workitem 61092 all the task
http://apactfs.cbre.com:8080/tfs/CBRE.APAC.Applications/MRI_SCRUM_GIT/_workitems?_a=edit&id=61092
for that i am using this link in postman GET
http://apactfs.cbre.com:8080/tfs/cbre.apac.applications/_apis/wit/workitems/61092?$expand=all&api-version=1.0
i am getting all the task related to it but not getting all the field such as number of hours in the task,user of the task which i wanted.
and in Postman i am hitting the id by this Link By GET
http://apactfs.cbre.com:8080/tfs/cbre.apac.applications/MRI_SCRUM_GIT/_workitems?_a=edit&id=61092&api-version=1.0
According to your screenshot, 61092 is a Product Backlog Item. The Rest API URL you use can only get the detailed information of the work item 61092 itself, it cannot get the detailed information about the work items that linked to 61092.
You have to use One-hop Query to get all the tasks related to it and then get the detailed data for each task returned. Refer to this link for details: Get Work Items.
$expand=all has already expand all fields, but it doesn't show the empty fields in response. If you type a value for the field you want to get, you will see it as expect in response.

github users API Paging not work

when using github users api to return users data through
https://api.github.com/users?page=6&per_page=2
return the same data every one although change page parameter value and per_page
why this and how to fix to change different data
i try to edit header request and add this header
Name Link
Value <https://api.github.com/users?page=1&per_page=2>; rel="next",<https://api.github.com/users?page=50&per_page=2>; rel="last"
But Still not working
After my search
now Github use API V3 and if you want return users with paging you can use this
https://api.github.com/users?since=1&per_page=100
Instead of using "page" and "per_page", that endpoint uses "since" and "per_page".
The since parameter says from which user ID the API should start listing users. For example:
https://api.github.com/users?since=1&per_page=100
will start listing users from the user with ID 1, and
https://api.github.com/users?since=10001&per_page=100
will start listing users from the user with ID 10001.