Requests
- 1 Variables
- 2 Table
- 2.1 Get table
- 2.2 Get multiple tables
- 2.3 Update table
- 2.4 Clone table
- 2.4.1 Clone single table only
- 2.4.2 Clone one or more tables
- 2.5 Export table CSV
- 3 Columns
- 4 Sums
- 4.1 Table sum
- 4.2 Column sum
- 5 Table row
- 5.1 Create new row
- 5.2 Update existing row
- 5.3 Delete row
Variables
:customFieldID
is a unique ID of a STAGIL table. See Table ID for details.
:rowID
- use GET Table call to retrieve the row ID (e.g. "id": 146839)
:fieldId
- Table column ID
:issueIdOrKey
requires an issue ID or issue key of a particular Jira issue.
:customfieldConfigID
or :customFieldConfig
- table configuration ID number. To get the ID, go to the ‘Table Configuration’ page, select a table and click Manage in the ‘Actions’ menu. Then see the ID listed in the context:
Table
Get table
Returns table rows and their values.
Method: GET
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/:customFieldId/issue/:issueIdOrKey
Variables: :customFieldId
, :issueIdOrKey
Get multiple tables
Returns tables from an array of issues.
Method: GET
API call:
https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/{customFieldId}?page=0&jql={jql_query}
Variables: :customFieldId
Update table
https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/:customFieldId/issue/:issueIdOrKey
Method: PuT
Description: replaces current table with values from the body
Variables: :customFieldId
, :issueIdOrKey
Fill out the body of the request with values for the new row. Use the JSON snippet below as an example.
Leave the body empty to clear the table
Clone table
Tables can be cloned using one of the following calls. Please refer to the call conditions to determine the best one for your use case.
A general rule for both calls: a target table must be empty.
Clone single table only
Method: POST
Description: clone table values between 2 issues.
Condition: an issue with a target table should not have any other tables in issue view.
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/clone/customField/:customFieldId/issue/:fromIssueIdOrKey/to/:toIssueIdOrKey
Variables:
:customFieldId
= Table ID
:fromIssueIdOrKey
- a key or ID of the source issue to copy table values from
:toIssueIdOrKey
- a key or ID of the target issue to copy table values to.
Clone one or more tables
Method: POST
Description: clones all tables that are configured for the current issue.
If the target table is not empty, the cloning process will skip it. This means that only empty tables will receive cloned values. Therefore, this call is useful for cloning a single table when there are multiple tables configured, as long as the tables to be skipped are not empty.
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/clone/issue/:fromIssueIdOrKey/to/:toIssueIdOrKey
Variables:
:fromIssueIdOrKey
- a key or ID of the source issue to copy table values from
:toIssueIdOrKey
- a key or ID of the target issue to copy table values to.
Export table CSV
Method: GET
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/:customFieldConfig/:issueIdOrKey/:delimiter/csv
Variables::customFieldConfig
,
:delimiter
- used for a CSV table export. Use comma or semicolon text values to specify delimiter.
For example,
Columns
Returns details about table columns configuration
Method: GET
API cal: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/fields/:customFieldConfigId
Variables::customFieldConfigId
Sums
Table sum
Returns separate sums of values within all table columns
Method: GET
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/sum/customField/:customFieldId/issue/:issueIdOrKey
Variables: :customFieldId
, :issueIdOrKey
Column sum
Retrieved the sum of all values in the number column
Method: GET
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/sum/customField/:customFieldId/issue/:issueIdOrKey/field/:fieldId
Variables: :customFieldId
, :issueIdOrKey
, :fieldId
Table row
Create new row
Method: Post
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/:customFieldId/issue/:issueIdOrKey
Variables: :customFieldId
, :issueIdOrKey
Fill out the body of the request with values for the new row. Use the JSON snippet below as an example.
Update existing row
Method: PUT
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/:customFieldId/issue/:issueIdOrKey/row/:rowId
Variables: :customFieldId
, :issueIdOrKey
, :rowId
Fill out the body of the request with new values for the row. Use the JSON snippet from the previous call as an example.
Delete row
Method: Delete
API call: https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/:customFieldId/issue/:issueIdOrKey/row/:rowId
Variables: :customFieldId
, :issueIdOrKey
, :rowId
© 2023, STAGIL