Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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 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:

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

  • 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:

  • URL: https://yourjiraURL.xyz/rest/stj/1.0/table/data/

  • 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.

POST REQUEST - 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

The error codes that our app returns for bad requests are easy to understand and usually self-explanatory. In case you need help, please do not hesitate to contact us.

  • No labels