Info |
---|
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. |
Table of Contents |
---|
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
...
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
...
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:
Error Codes
...