How to get all the assignee for a particular project using JIRA Rest api? - api

I am developing an iOS application and i have search functionality where in users can search for issues by selecting fields like project , version , assignee and i have all the rest api's for other functionalities except for assignee , i tried to find but i didn't get any Api. i was using the below Api - /rest/api/2/user/assignable/multiProjectSearch?username&projectKeys&startAt&maxResults
and it doesn't give me the exact results , can anybody point me in the right direction like how can i get assignee's for a particular project when i select a project in the search field.

I guess that by assignees of the project you mean assigness from the issues that belong to the project. You can use search method:
https://docs.atlassian.com/jira/REST/latest/#d2e4863
/rest/api/2/search?jql=project=PROJ_KEY&fields=assignee
Please take into account "startAt", "maxResults" parameters and returned "total" value that are used to support pagination. You may need to check the jira.search.view.default.max property in your JIRA: https://confluence.atlassian.com/display/CLOUDKB/Changing+maxResults+Parameter+for+JIRA+REST+API

Related

How to set/get custom Employee metadata?

We run an events data based system and a customer needs to integrate with us via their QuickBooks. Using Node JS we've managed to build a basic API where they can OAuth, and we can start querying their API. They have a "Job Title" field which is integral for us to read in order to split users into the correct groups for our business logic, but we cannot seem to find or query this field at all.
Is there a specific place we can instruct them to store the "Job Title" of an employee so that we can pull it via the API? Or does anyone have any other clues/ideas as to how to integrate with this? The QB API seems like it's really falling out of support...

Jira REST API - Why there is specialized API for updating status and assignee fields of issue?

I'm learning Jira REST API.
Table for issue:
I noticed that there are specialized API for updating assignee (PUT /rest/issue/{issueIdOrKey}/assignee) and status (POST /rest/issue/{issueIdOrKey}/transitions) while anoher fields updated by PUT /rest/issue/{issueIdOrKey}.
Could you please explain why this happens the way it described above? May be because for assignee and status fields some validation being performed?
There is no specific 'reason' for it, that's just the way Atlassian have chosen to utilise either PUT versus POST requests to achieve a desired result.
Google "REST API PUT vs POST" for more information about the two methods.

How to retrieve listing price data for specific event using ticketmaster's developer API?

I made a Ticketmaster developer account and I would like to pull listing price data for specific events. I am able to retrieve this type of listing data for specific events using Stubhub's API, but looking through Ticketmaster's API documentation, I don't see any specific API requests that will return listing data, such as section, row and listing_price.
Am I missing something, or is it not possible to retrieve this type of listing data using Ticketmaster's API?
For anyone who stumbles upon this in the future, TicketMaster does offer this functionality through their availability endpoint. However you have to be a TM nexus partner to use it, and getting approved as a partner depends on what your business/software does and income etc...

Pull list of campaigns from Google Adwords API?

The Google Adwords API documentation is super difficult to navigate.
I know I am missing something. How can I pull a list of the campaigns under a certain account? Is there a report that includes it or API call? I can use a list of IDs or names but I can't find either.
Take a look at Google's googleads github repo.
https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201506/reporting/download_criteria_report.py
This is an example of downloading a criteria performance report.
Change reportType to CAMPAIGN_PERFORMANCE_REPORT.
In the selector object, change fields to the fields you want out of the list - https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report
If you want to add an id filter then you need to add a predicates object to the selector that looks like:
{'field': 'CampaignId', 'operator': 'IN', 'values': campaign_ids}
Not all fields in the campaign are available in the reporting section. In this case I would suggest to use the campaign service to download the campaigns. Keep in mind that this operation is slower than reporting.
Take a look at this example from the googleads repo - https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201506/basic_operations/get_campaigns.py

Get a list of Sprints using YouTrack REST API

I am creating a C# tool that pulls information from YouTrack using the REST API. I am looking for a way to get a list of the sprints that have been created. Is there a way to easily get this information through the REST API? Worst case I could get the list of issues and parse through all of them to collect all of the available sprints, but there has to be an easier way.
Version 5 changed the agile method. The new agile method is returned with the following command:
{baseUrl}/rest/agile/{agileID}/sprints
I had to get the list of the Agile ID's to use in the above url using the following command:
{baseUrl}/rest/agile/agiles
This now gives a list of all the agile boards and using the 'id' element in the first command above will return the list of sprints for that agile board. The AgileID's are returned something like 'myprojectname-99'. I found that if you just use the numeric number at the end of the ID, that will also work instead of using the full agile name.
I found a much simpler way to get the sprints:
{baseUrl}/rest/agile/{projectName}/sprints?"
This gives an XML with all of the sprints for that project and their start/end dates.
What you request can be obtained by GET {youtrac.base.url}/rest/admin/customfield/versionBundle/{bundleName}. To find out {bundleName}, go to agile settings and have a look at 'Field to identify sprints:' setting which gives you the field name. For this field, in Administration you can locate the name of the bundle.
{baseUrl}/rest/agile/{projectName}/sprints? is only working if the name of the agile board is the same as the projectName!!!
The API is: {baseUrl}/rest/agile/{agileName}/sprints?