REST API (going to be deprecated)
Please note that from version 2.1.3 we implemented new REST API calls. You can still use the old calls, but they are going to be deprecated in the future.
GET Requests
GET TABLE Request
First, look for your STAGIL Table custom field's ID and the issue ID from which you want to pull the data. The GET request has to look like this:
Example URL: https://yourjiraURL.xyz/rest/api/2/issue/DEV-6?fields=customfield_10100&expand=renderedFields
"DEV-6" is your issue key
"customfield_10100 is your custom field ID of the Table custom field
With this request, you will get all the tabular data from the table.
GET TABLE SUM
Please note that this request is going to be replaced by the GET TABLE SUM request down below.
If you want to directly get the sum of your table, you can use the following syntax:
BASEURL/rest/stj/1.0/table/sum/customfield/{customfield_ID}/issue/{issuekey}
Example URL: https://yourjiraURL.com/rest/stj/table/sum/customfield/22007/issue/KEY-123
It will give you the following data:Â Arrays of table sums: columnID, columnsum, columnID, columnsum, columnID, columnsum.
Example output for a table containing only one row that should be summed up:
GET FIELD CONFIGURATION
BASEURL/rest/stj/1.0/table/fields/{{fieldConfigId}}
You can retrieve the field configuration ID from the url of the STAGIL Tables Configuration page:
Â
Example URL: yourjiraURL/rest/stj/1.0/table/fields/22504
GET FIELD SUM
BASEURL/rest/stj/1.0/table/sum/customfield/{customFieldId}/issue/{issueId}/field/{fieldId}
You can retrieve the field ID from the table field configuration screen.
Example URL: yourjiraURL/rest/stj/1.0/table/sum/customfield/22096/issue/189038/field/10
Example:
GET CSV FILE
BASEURL/rest/stj/1.0/table/{{fieldConfigId}}/{issueId}/COMMA/csv
Example URL: http://yourjiraurl.xyz/rest/stj/1.0/table/23804/189038/COMMA/csv
PUT / POST Requests
PUT REQUEST: UPDATE ROW
BASEURL/rest/stj/1.0/table/data/{rowID}
Â
Â
POST REQUEST - CREATE ROW
To create a new row for a table, please use this POST request, which is very similar to the PUT request:
Headers: Same like PUT request
In the body of the POST request, you do not need to include values for the orderPosition and the id. The new row will automatically be added at the end of the table.
Example body:Â {"field-1": "Customer 8", "field-3":Â [2], "field-5": "anorth", "field-6":Â [8], "customFieldId":11501,"issueId":"11706"}
This example's structure is the same like in the PUT request example.
DELETE Requests
DELETE ROW
To delete rows of your table, simply take the row ID that you get from using the GET request and add it to the URL:
© 2023, STAGIL