REST APIs

This page describes how to use REST APIs for Table Grid Next Generation for Jira Cloud. Our APIs endpoints are deployed outside of your Atlassian Site cause we are storing grid data using MongoDB, the root URL of all our endpoints is https://databuckets.net.

To summarize how to use our REST APIs:

  1. Generate an Atlassian API token with your user account, here is the documentation to learn how to generate a token: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

image-20240327-072536.png
  • From the dialog that appears, enter a memorable and concise Label for your token and click Create.

image-20240327-073126.png
  • Click Copy to clipboard, then paste the token to your script, or elsewhere to save

  1. Validate your authentication using your Atlassian site REST APIs to be authenticated, see the Authorization part here in this documentation.

You can use this Postman collection to experiment with . To use it, import it in Postman, then set the appropriate values to collection variables (click on three dots → Edit → Variables). You can enter all values but accountId, then run "Get account id" script which automatically fills accountId variable for you.

  1. Start to request data from your grid using our REST APIs endpoints

Postman Collection

Table Grid Cloud.postman_collection.json

Firstly, make sure to follow our Excerpt above to generate an Atlassian API token and validate your authentication.

You can use this Postman collection to experiment with Table Grid Cloud API. To use it, import it in Postman, then set the appropriate values to collection variables (click on three dots → Edit → Variables). You can enter all values but accountId, then run "Get account id" script which automatically fills accountId variable for you.

 

Authorization

Basic authentication scheme is used for authentication. You can also use Table Grid Cloud postman collection for that.

  • tgcApiToken: Get it on "API Tokens" tab on "Manage your apps" page

  • accountId: Select “Get account id” request → Click “Send” button.

Then there will be a JSON will contain accountId like the picture below:

Basic auth password is a token generated on "API Tokens" page. You need to provide these credentials for every request in the "Authorization" header. If your credentials are incorrect, their will be a error request like the example below:

 

Please note that user need to complete the Authorization first before creating any requests in Postman, or else it will return results show status 401: Unauthorized.

Value Format

Values in columns are stored in the following format:

  • Checkboxes are stored as booleans.

  • Integers, Numbers, Dates, DateTimes and Times are stored as numbers. Values of Date, DateTime and Time columns are stored in Unix time format in milliseconds.

  • Strings, Textareas, Single Select Lists and Sequences are stored as strings. Value of a single select list is a string containing a selected item's title.

  • Multi Select Lists are stored as lists of strings containing titles of selected items.

  • Formulas are stored as numbers or strings depending on return type.

  • Userlists are stored as Maps with the following entries:

    • "accountId" contains user's account id, which uniquely identifies a user.
      "accountId" may be missing from the result of "Read Grid Data" method call if a user could not be found.
      When using "Add Grid Data" or "Update Grid Data" methods, "accountId" MUST be provided, and the rest of the entries are optional.

    • "value" contains user's full name.

    • "avatar" contains a link to user's avatar.

The term empty value refers to nulls, empty strings and empty lists.

Methods

Get Grids

API call: GET https://databuckets.net/rest/tgc/api/v1/grids

Description: Returns all grids in a Jira Cloud instance

Responses

Read Grid Data

API call: GET https://databuckets.net/rest/tgc/api/v1/grids/{gridId}/issue/{issueIdOrKey}

Description: Returns all the rows for a grid custom field and an issue

Request

PATH PARAMETERS

gridId REQUIRED

string

Grid id.

issueIdOrKey REQUIRED

string

The ID or key of the issue.

QUERY PARAMETERS

columnIds

Array<string>

A list of columns' ids to return for the Grid. This parameter accepts a comma-separated list.

Note: All columns are returned by default. 

Responses

Add Grid Data

API call: POST https://databuckets.net/rest/tgc/api/v1/grids/{gridId}/issue/{issueIdOrKey}

Description: Add rows to the Grid custom field

Request

PATH PARAMETERS

gridId REQUIRED

string

Grid id.

issueIdOrKey REQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

{ "rows":[ { "status":"Open", "user":"Stephen Curry", "summary":"New row" } ] }

Responses