text
stringlengths
81
112k
Export page as standard pdf exporter :param page_id: Page ID :return: PDF File def get_page_as_pdf(self, page_id): """ Export page as standard pdf exporter :param page_id: Page ID :return: PDF File """ headers = self.form_token_headers url = 'spac...
Provide space, parent_id and title of the descendant page, it will return the descendant page_id :param space: str :param parent_id: int :param title: str :return: page_id of the page whose title is passed in argument def get_descendant_page_id(self, space, parent_id, title): "...
Get health status https://confluence.atlassian.com/jirakb/how-to-retrieve-health-check-results-using-rest-api-867195158.html :return: def health_check(self): """ Get health status https://confluence.atlassian.com/jirakb/how-to-retrieve-health-check-results-using-rest-api-8671951...
Reindex the Jira instance Kicks off a reindex. Need Admin permissions to perform this reindex. :param comments: Indicates that comments should also be reindexed. Not relevant for foreground reindex, where comments are always reindexed. :param change_history: Indicates that changeHistory ...
Get issues from jql search result with all related fields :param jql: :param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007'] :param start: OPTIONAL: The start point of the collection to return. Default: 0. :param limit: OPTIONAL: The limit of the number ...
Get issues from jql search result with all related fields :param jql: JQL query :param limit: max results in the output file :return: CSV file def csv(self, jql, limit=1000): """ Get issues from jql search result with all related fields :param jql: JQL query :par...
Update user attributes based on json :param username: :param data: :return: def user_update(self, username, data): """ Update user attributes based on json :param username: :param data: :return: """ url = 'rest/api/2/user?username={0}'.for...
Update user email for new domain changes :param username: :param email: :return: def user_update_email(self, username, email): """ Update user email for new domain changes :param username: :param email: :return: """ data = {'name': usernam...
Disable user :param username: :return: def user_deactivate(self, username): """ Disable user :param username: :return: """ url = 'secure/admin/user/EditUser.jspa' headers = self.form_token_headers user = self.user(username) user_up...
The disable method throw own rest enpoint def user_disable_throw_rest_endpoint(self, username, url='rest/scriptrunner/latest/custom/disableUser', param='userName'): """The disable method throw own rest enpoint""" url = "{}?{}={}".format(url, param, username) ...
Get web sudo cookies using normal http request def user_get_websudo(self): """ Get web sudo cookies using normal http request""" url = 'secure/admin/WebSudoAuthenticate.jspa' headers = self.form_token_headers data = { 'webSudoPassword': self.password, } retur...
Fuzzy search using username and display name :param username: Use '.' to find all users :param start: OPTIONAL: The start point of the collection to return. Default: 0. :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by fixed system limi...
Contains a full representation of a the specified project's versions. :param key: :param expand: the parameters to expand :return: def get_project_versions(self, key, expand=None): """ Contains a full representation of a the specified project's versions. :param key: ...
Returns all versions for the specified project. Results are paginated. Results can be ordered by the following fields: sequence name startDate releaseDate :param key: the project key or id :param start: the page offset, if not specified then defaul...
Returns the details for a given project role in a project. :param project_key: :param role_id: :return: def get_project_actors_for_role_project(self, project_key, role_id): """ Returns the details for a given project role in a project. :param project_key: :param ...
Deletes actors (users or groups) from a project role. Delete a user from the role: /rest/api/2/project/{projectIdOrKey}/role/{roleId}?user={username} Delete a group from the role: /rest/api/2/project/{projectIdOrKey}/role/{roleId}?group={groupname} :param project_key: :param role_id: ...
Updates a project. Update project: /rest/api/2/project/{projectIdOrKey} :param project_key: project key of project that needs to be updated :param data: dictionary containing the data to be updated :param expand: the parameters to expand def update_project(self, project_key, data, expa...
Get custom fields. Evaluated on 7.12 :param search: str :param start: long Default: 1 :param limit: int Default: 50 :return: def get_custom_fields(self, search=None, start=1, limit=50): """ Get custom fields. Evaluated on 7.12 :param search: str :param st...
Get issue labels. :param issue_key: :return: def get_issue_labels(self, issue_key): """ Get issue labels. :param issue_key: :return: """ url = 'rest/api/2/issue/{issue_key}?fields=labels'.format(issue_key=issue_key) return (self.get(url) or {}).ge...
Provide assignable users for project :param project_key: :param start: OPTIONAL: The start point of the collection to return. Default: 0. :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by fixed system limits. Default by built-in method:...
REST endpoint for searching groups in a group picker Returns groups with substrings matching a given query. This is mainly for use with the group picker, so the returned groups contain html to be used as picker suggestions. The groups are also wrapped in a single response object that also contai...
Create a group by given group parameter :param name: str :return: New group params def create_group(self, name): """ Create a group by given group parameter :param name: str :return: New group params """ url = 'rest/api/2/group' data = {'name': ...
Delete a group by given group parameter If you delete a group and content is restricted to that group, the content will be hidden from all users To prevent this, use this parameter to specify a different group to transfer the restrictions (comments and worklogs only) to :param name: str...
Just wrapping method user group members :param group: :param include_inactive_users: :param start: OPTIONAL: The start point of the collection to return. Default: 0. :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by fixed system...
Add given user to a group :param username: str :param group_name: str :return: Current state of the group def add_user_to_group(self, username, group_name): """ Add given user to a group :param username: str :param group_name: str :return: Current state...
Remove given user from a group :param username: str :param group_name: str :return: def remove_user_from_group(self, username, group_name): """ Remove given user from a group :param username: str :param group_name: str :return: """ log.w...
Add comment into Jira issue :param issue_key: :param comment: :param visibility: OPTIONAL :return: def issue_add_comment(self, issue_key, comment, visibility=None): """ Add comment into Jira issue :param issue_key: :param comment: :param visibilit...
Add attachment to Issue :param issue_key: str :param filename: str, name, if file in current directory or full path to file def add_attachment(self, issue_key, filename): """ Add attachment to Issue :param issue_key: str :param filename: str, name, if file in current d...
Compatibility naming method with get_issue_remote_links() def get_issue_remotelinks(self, issue_key, global_id=None, internal_id=None): """ Compatibility naming method with get_issue_remote_links() """ return self.get_issue_remote_links(issue_key, global_id, internal_id)
Finding all Remote Links on an issue, also with filtering by Global ID and internal ID :param issue_key: :param global_id: str :param internal_id: str :return: def get_issue_remote_links(self, issue_key, global_id=None, internal_id=None): """ Finding all Remote Links on ...
Add Remote Link to Issue, update url if global_id is passed :param issue_key: str :param link_url: str :param title: str :param global_id: str, OPTIONAL: :param relationship: str, OPTIONAL: Default by built-in method: 'Web Link' def create_or_update_issue_remote_links(self, issu...
Update existing Remote Link on Issue :param issue_key: str :param link_id: str :param url: str :param title: str :param global_id: str, OPTIONAL: :param relationship: str, Optional. Default by built-in method: 'Web Link' def update_issue_remote_link_by_id(self, issue_key...
Deletes Remote Link on Issue :param issue_key: str :param link_id: str def delete_issue_remote_link_by_id(self, issue_key, link_id): """ Deletes Remote Link on Issue :param issue_key: str :param link_id: str """ url = 'rest/api/2/issue/{issue_key}/remotel...
Create a new issue link type. :param outward: :param inward: :param link_type_name: :return: def create_issue_link_type(self, link_type_name, inward, outward): """Create a new issue link type. :param outward: :param inward: :param link_type_name: ...
Returns for a given issue link type id all information about this issue link type. def get_issue_link_type(self, issue_link_type_id): """Returns for a given issue link type id all information about this issue link type. """ url = 'rest/api/2/issueLinkType/{issueLinkTypeId}'.format(issueLinkType...
Delete the specified issue link type. def delete_issue_link_type(self, issue_link_type_id): """Delete the specified issue link type.""" url = 'rest/api/2/issueLinkType/{issueLinkTypeId}'.format(issueLinkTypeId=issue_link_type_id) return self.delete(url)
Update the specified issue link type. :param issue_link_type_id: :param data: { "name": "Duplicate", "inward": "Duplicated by", "outward": "Duplicates" } :return: def update_issue_link_type(self, iss...
Returns counts of issues related to this component. :param component_id: :return: def get_component_related_issues(self, component_id): """ Returns counts of issues related to this component. :param component_id: :return: """ url = 'rest/api/2/component/{...
Provide plugin path for upload into Jira e.g. useful for auto deploy :param plugin_path: :return: def upload_plugin(self, plugin_path): """ Provide plugin path for upload into Jira e.g. useful for auto deploy :param plugin_path: :return: """ files = { ...
Returns a list of all permission schemes. By default only shortened beans are returned. If you want to include permissions of all the schemes, then specify the permissions expand parameter. Permissions will be included also if you specify any other expand parameter. :param expand...
Returns a list of all permission schemes. By default only shortened beans are returned. If you want to include permissions of all the schemes, then specify the permissions expand parameter. Permissions will be included also if you specify any other expand parameter. :param permis...
Creates a permission grant in a permission scheme. Example: { "holder": { "type": "group", "parameter": "jira-developers" }, "permission": "ADMINISTER_PROJECTS" } :param permission_id :param new_permission ...
Get all Accounts that the logged in user has permission to browse. :param skip_archived: bool OPTIONAL: skip archived Accounts, either true or false, default value true. :param expand: bool OPTIONAL: With expanded data or not :return: def tempo_account_get_accounts(self, skip_archived=None, exp...
The AccountLinkBean for associate Account with project Adds a link to an Account. { scopeType:PROJECT defaultAccount:boolean linkType:IMPORTED | MANUAL name:string key:string accountId:number scope:number id:...
Creates Account, adding new Account requires the Manage Accounts Permission. :param data: String then it will convert to json :return: def tempo_account_add_account(self, data=None): """ Creates Account, adding new Account requires the Manage Accounts Permission. :param data: St...
Delete an Account by id. Caller must have the Manage Account Permission for the Account. The Account can not be deleted if it has an AccountLinkBean. :param account_id: the id of the Account to be deleted. :return: def tempo_account_delete_account_by_id(self, account_id): """ De...
Get un-archived Accounts by customer. The Caller must have the Browse Account permission for the Account. :param customer_id: the Customer id. :return: def tempo_account_get_all_account_by_customer_id(self, customer_id): """ Get un-archived Accounts by customer. The Caller must have the...
Gets all or some Attribute whose key or name contain a specific substring. Attributes can be a Category or Customer. :param query: OPTIONAL: query for search :param count_accounts: bool OPTIONAL: provide how many associated Accounts with Customer :return: list of customers def tempo_acc...
Gets all or some Attribute whose key or name contain a specific substring. Attributes can be a Category or Customer. :param data: :return: if error will show in error log, like validation unsuccessful. If success will good. def tempo_account_add_customer(self, data=None): """ Ge...
Get Account Attribute whose key or name contain a specific substring. Attribute can be a Category or Customer. :param customer_id: id of Customer record :return: Customer info def tempo_account_get_customer_by_id(self, customer_id=1): """ Get Account Attribute whose key or name contain ...
Updates an Attribute. Caller must have Manage Account Permission. Attribute can be a Category or Customer. :param customer_id: id of Customer record :param data: format is { isNew:boolean name:string key:string ...
Delete an Attribute. Caller must have Manage Account Permission. Attribute can be a Category or Customer. :param customer_id: id of Customer record :return: Customer info def tempo_account_delete_customer_by_id(self, customer_id=1): """ Delete an Attribute. Caller must have Manage Accou...
Get csv export file of Accounts from Tempo :return: csv file def tempo_account_export_accounts(self): """ Get csv export file of Accounts from Tempo :return: csv file """ headers = self.form_token_headers url = 'rest/tempo-accounts/1/export' return self.g...
Returns all boards. This only includes boards that the user has permission to view. :param board_name: :param project_key: :param board_type: :param start: :param limit: :return: def get_all_agile_boards(self, board_name=None, project_key=None, board_type=None, start=0, ...
Get agile board info by id :param board_id: :return: def get_agile_board(self, board_id): """ Get agile board info by id :param board_id: :return: """ url = 'rest/agile/1.0/board/{}'.format(str(board_id)) return self.get(url)
Get the board configuration. The response contains the following fields: id - Id of the board. name - Name of the board. filter - Reference to the filter used by the given board. subQuery (Kanban only) - JQL subquery used by the given board. columnConfig - The column configuratio...
Delete agile board by id :param board_id: :return: def delete_agile_board(self, board_id): """ Delete agile board by id :param board_id: :return: """ url = 'rest/agile/1.0/board/{}'.format(str(board_id)) return self.delete(url)
Creating customer user :param full_name: str :param email: str :return: New customer def create_customer(self, full_name, email): """ Creating customer user :param full_name: str :param email: str :return: New customer """ log.warning('C...
Creating customer request :param service_desk_id: str :param request_type_id: str :param values_dict: str :param raise_on_behalf_of: str :return: New request def create_customer_request(self, service_desk_id, request_type_id, values_dict, raise_on_behalf_of=None): """ ...
Get customer request status name :param issue_id_or_key: str :return: Status name def get_customer_request_status(self, issue_id_or_key): """ Get customer request status name :param issue_id_or_key: str :return: Status name """ request = self.get('rest/...
Returns a list of transitions that customers can perform on the request :param issue_id_or_key: str :return: def get_customer_transitions(self, issue_id_or_key): """ Returns a list of transitions that customers can perform on the request :param issue_id_or_key: str :re...
Get request participants :param issue_id_or_key: str :param start: OPTIONAL: int :param limit: OPTIONAL: int :return: Request participants def get_request_participants(self, issue_id_or_key, start=0, limit=50): """ Get request participants :param issue_id_or_ke...
Add users as participants to an existing customer request The calling user must have permission to manage participants for this customer request :param issue_id_or_key: str :param users_list: list :return: def add_request_participants(self, issue_id_or_key, users_list): """ ...
Remove participants from an existing customer request The calling user must have permission to manage participants for this customer request :param issue_id_or_key: str :param users_list: list :return: def remove_request_participants(self, issue_id_or_key, users_list): """ ...
Perform a customer transition for a given request and transition ID. An optional comment can be included to provide a reason for the transition. :param issue_id_or_key: str :param transition_id: str :param comment: OPTIONAL: str :return: None def perform_transition(self, issue_...
Creating request comment :param issue_id_or_key: str :param body: str :param public: OPTIONAL: bool (default is True) :return: New comment def create_request_comment(self, issue_id_or_key, body, public=True): """ Creating request comment :param issue_id_or_key:...
Returns a list of organizations in the Jira instance. If the user is not an agent, the resource returns a list of organizations the user is a member of. :param service_desk_id: OPTIONAL: str Get organizations from single Service Desk :param start: OPTIONAL: int The starting index of the returne...
Get an organization for a given organization ID :param organization_id: str :return: Organization def get_organization(self, organization_id): """ Get an organization for a given organization ID :param organization_id: str :return: Organization """ url ...
Get all the users of a specified organization :param organization_id: str :param start: OPTIONAL: int :param limit: OPTIONAL: int :return: Users list in organization def get_users_in_organization(self, organization_id, start=0, limit=50): """ Get all the users of a spec...
To create an organization Jira administrator global permission or agent permission is required depending on the settings :param name: str :return: Organization data def create_organization(self, name): """ To create an organization Jira administrator global permission or agent ...
Adds an organization to a servicedesk for a given servicedesk ID and organization ID :param service_desk_id: str :param organization_id: int :return: def add_organization(self, service_desk_id, organization_id): """ Adds an organization to a servicedesk for a given servicedesk ...
Removes an organization from a servicedesk for a given servicedesk ID and organization ID :param service_desk_id: str :param organization_id: int :return: def remove_organization(self, service_desk_id, organization_id): """ Removes an organization from a servicedesk for a given...
Deletes an organization for a given organization ID :param organization_id: :return: def delete_organization(self, organization_id): """ Deletes an organization for a given organization ID :param organization_id: :return: """ log.warning('Deleting organ...
Adds users to an organization users_list is a list of strings :param organization_id: str :param users_list: list :return: def add_users_to_organization(self, organization_id, users_list): """ Adds users to an organization users_list is a list of strings ...
Removes users from an organization users_list is a list of strings :param organization_id: str :param users_list: list :return: def remove_users_from_organization(self, organization_id, users_list): """ Removes users from an organization users_list is a list of ...
Add attachment as a comment. Setting attachment visibility is dependent on the user's permission. For example, Agents can create either public or internal attachments, while Unlicensed users can only create internal attachments, and Customers can only create public attachments. An addi...
Create temporary attachment, which can later be converted into permanent attachment :param service_desk_id: str :param filename: str :return: Temporary Attachment ID def attach_temporary_file(self, service_desk_id, filename): """ Create temporary attachment, which can later be ...
Adds temporary attachment that were created using attach_temporary_file function to a customer request :param issue_id_or_key: str :param temp_attachment_id: str, ID from result attach_temporary_file function :param public: bool (default is True) :param comment: str (default is None) ...
Get the SLA information for a customer request for a given request ID or key and SLA metric ID IMPORTANT: The calling user must be an agent :param issue_id_or_key: str :param sla_id: str :return: SLA information def get_sla_by_id(self, issue_id_or_key, sla_id): """ Get ...
Get all approvals on a request, for a given request ID/Key :param issue_id_or_key: str :param start: OPTIONAL: int :param limit: OPTIONAL: int :return: def get_approvals(self, issue_id_or_key, start=0, limit=50): """ Get all approvals on a request, for a given request I...
Get an approval for a given approval ID :param issue_id_or_key: str :param approval_id: str :return: def get_approval_by_id(self, issue_id_or_key, approval_id): """ Get an approval for a given approval ID :param issue_id_or_key: str :param approval_id: str ...
Answer a pending approval :param issue_id_or_key: str :param approval_id: str :param decision: str :return: def answer_approval(self, issue_id_or_key, approval_id, decision): """ Answer a pending approval :param issue_id_or_key: str :param approval_id: ...
Get queue settings on project :param project_key: str :return: def get_queue_settings(self, project_key): """ Get queue settings on project :param project_key: str :return: """ url = 'rest/servicedeskapi/queues/{}'.format(project_key) return se...
Adds one or more existing customers to the given service desk. If you need to create a customer, see Create customer method. Administer project permission is required, or agents if public signups and invites are enabled for the Service Desk project. :param service_desk_id: str ...
Returns a page of queues defined inside a service desk, for a given service desk ID. The returned queues will include an issue count for each queue (represented in issueCount field) if the query param includeCount is set to true (defaults to false). Permissions: The calling user must be an agen...
Returns a page of issues inside a queue for a given queue ID. Only fields that the queue is configured to show are returned. For example, if a queue is configured to show only Description and Due Date, then only those two fields are returned for each issue in the queue. Permissions: The...
Generic method to return a generator with the results returned from Bamboo. It is intended to work for responses in the form: { 'results': { 'size': 5, 'start-index': 0, 'max-result': 5, 'result': [] }, ...
Returns a generator with the plans in a given project :param project_key: Project key :return: Generator with plans def project_plans(self, project_key): """ Returns a generator with the plans in a given project :param project_key: Project key :return: Generator with pla...
Get results as generic method :param project_key: :param plan_key: :param job_key: :param build_number: :param expand: :param favourite: :param clover_enabled: :param issue_key: :param start_index: :param max_results: :return: def ...
Get Plan results :param project_key: :param plan_key: :param expand: :param favourite: :param clover_enabled: :param label: :param issue_key: :param start_index: :param max_results: :return: def plan_results(self, project_key, plan_key, ex...
Returns details of a specific build result :param expand: expands build result details on request. Possible values are: artifacts, comments, labels, Jira Issues, stages. stages expand is available only for top level plans. It allows to drill down to job results using stages.stage.results.result....
Returns the current status of each deployment environment If no project id is provided, returns all projects. def deployment_dashboard(self, project_id=None): """ Returns the current status of each deployment environment If no project id is provided, returns all projects. """ ...
api/1.0/plan/{projectKey}-{buildKey}/branch def plan_branches(self, plan_key, expand=None, favourite=False, clover_enabled=False, max_results=25): """api/1.0/plan/{projectKey}-{buildKey}/branch""" resource = 'plan/{}/branch'.format(plan_key) return self.base_list_call(resource, expand, favourit...
>>> is_email('username@example.com') True >>> is_email('example.com') False >>> is_email('firstname.lastname@domain.co.uk') True def is_email(string): """ >>> is_email('username@example.com') True >>> is_email('example.com') False >>> is_email('firstname.lastname@domain.co.u...
>>> html_email('username@example.com') '<a href="mailto:username@example.com">username@example.com</a>' def html_email(email, title=None): """ >>> html_email('username@example.com') '<a href="mailto:username@example.com">username@example.com</a>' """ if not title: title = email re...
>>> html_list(['example.com', 'admin1@example.com', 'admin2@example.com']) '<ul> <li>example.com</li> <li><a href="mailto:admin1@example.com">admin1@example.com</a></li> <li><a href="mailto:admin2@example.com">admin2@example.com</a></li> </ul>' def html_list(data): """ >>> html_...
>>> html_table_header_row(['administrators', 'key', 'leader', 'project']) '\\n\\t<tr><th>Administrators</th><th>Key</th><th>Leader</th><th>Project</th></tr>' >>> html_table_header_row(['key', 'project', 'leader', 'administrators']) '\\n\\t<tr><th>Key</th><th>Project</th><th>Leader</th><th>Administrators</th...
>>> headers = ['administrators', 'key', 'leader', 'project'] >>> data = {'key': 'DEMO', 'project': 'Demonstration', 'leader': 'leader@example.com', 'administrators': ['admin1@example.com', 'admin2@example.com']} >>> html_row_with_ordered_headers(data, headers) '\\n\\t<tr><td><ul><li><a href="mailto:admin1@e...
>>> ordering = ['administrators', 'key', 'leader', 'project'] >>> data = [ \ {'key': 'DEMO', 'project': 'Demo project', 'leader': 'lead@example.com', \ 'administrators': ['admin@example.com', 'root@example.com']},] >>> html_table_from_dict(data, ordering) '<table> <tbody>\\n ...
Provide plugins info :param limit: :param offset: :return: def get_plugins_info(self, limit=10, offset=10): """ Provide plugins info :param limit: :param offset: :return: """ params = {} if offset: params['offset'] = of...