API

API

We expose some parts of the Approval Path functionality by API.

Authorization

You have to generate an API key in our app.

It is available in the Approval Path global view.

Click Apps > Approval Path for Jira > API Keys > Create a new API Key

image-20251210-202239.png

 

Set up your API key and copy or download it. The template has the following fields:

  • Key name - provide your name for the API key, up to 40 characters long.

  • Key value - non-modifiable field, shows the value of the key.

  • Reveal - reveals the key. This is NOT one one-time operation - you can reveal the key at any time.

  • Download - downloads the key to the selected location.

  • Privileges (determines whether the operation is allowed for the key)

    • Definition

      • Create - create a new approval definition,

      • Read/Get - retrieve an approval definition by ID or a list of definitions,

      • Update - update a definition by its ID,

      • Delete - delete a definition.

    • Condition

      • Create - create a new condition,

      • Read/Get - retrieve a condition by ID or a list of conditions,

      • Update - update a condition by its ID,

      • Delete - archive a condition.

    • Approval

      • Create - create an approval path,

      • Read/Get - retrieve an approval path by ID or a list of approval paths,

      • Delete - delete an approval.

  • Allow change performer origin - presents a valuable customization capability for users, empowering them to personalize the change performer. Once checked, users are granted the flexibility to adjust performer origin according to their chosen parameters.

image-20251210-202408.png

Change Performer Origin select offers three distinct options:

  1. User - to ensure smooth operations, it is essential to select a valid user as the new performer. This can be done by utilizing the option that allows the selection of a specific user.

  2. Work item field User - allows you to select a work item field of type User (or User array first element) to fetch the new performer. In cases where the selected work item field does not contain a valid user, you have the option to choose a default user. However, if no default user is selected and the work item field still does not contain a valid user, the API call will return an error.

     

image-20251210-202452.png

 

  1. User from API call - API call body parameter allows for the passing of a user ID. User IDs can be limited to users from a designated group. In cases where the submitted user ID is empty or does not contain a valid user, a default user can be selected. However, if the submitted user does not belong to the specified group, an error will be returned.

     

image-20251210-202700.png

 

  • Not valid before - set the start date for key validity.

  • Not valid after - set the invalidation date for the key.

  • Allowed IPs - set IPs or an IP range that can use the key.

  • Description - description of the key. Maximum 4000 characters.

  • Creation time - non-modifiable field, the time when the key was created.

  • Last modified - non-modifiable field, the time when the key was last modified.

  • Last usage - non-modifiable field, the time when the key was last used.

  • Usage Count - non-modifiable field, counter that shows how many times the key was used.

Using the Web API with an API key

With the key generated, you can now make a call to the Web API. First of all, set Authorization and Content-Type headers in your REST client.

Authorization: Bearer mc96LyRi9nUQySSjKXEf8xfqUZzjS2CYhRK8bWSRRfQi Content-Type: 'application/json'

Endpoints

Base path: https://app.approval-path.com/webapi/v2