Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
Info

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 summarise 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.pngImage Added
  • From the dialog that appears, enter a memorable and concise Label for your token and click Create.

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

image-20240327-073141.pngImage Added
  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

View file
nameTable Grid Cloud.postman_collection.json
. 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.

image-20240404-075321.pngImage Added
  1. Start to request data from your grid using our REST APIs endpoints

.

Contents

Table of Contents

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.

Expand
titleAuthorization

Authorization

Basic authentication scheme is used for authentication.Basic auth username is provided in format accountId@instanceName.atlassian. net. instanceName is the part of your Jira Cloud site name before the ".atlassian.net". You can get accountId via Jira Cloud REST API. For that go to You can also use Table Grid Cloud postman collection for that.

, create a new token, put your instance name, username, email and the token in the command below and run it (works for Linux and macOS). Resulting JSON will contain accountId.
Code Block
languagebash
curl --request GET \
  --url 'https://<instanceName>.atlassian.net/rest/api/3/user/search?query=<username>' \
  --user '<email@example.com>:<token>' \
  --header 'Accept: application/json'
You can also use Table Grid Cloud postman collection for that.
  • username: Username of your account (type your e-mail address)

  • instanceName is the part of your Jira Cloud site name before the ".atlassian.net".

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

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

image-20240328-144500.pngImage Added

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

image-20240404-073007.pngImage Added

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

image-20240328-145012.pngImage Added

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.

image-20240404-075854.pngImage Added
Expand
titleValue Format

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

Expand
titleGet Grids

Get Grids

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

Description: Returns all grids in a Jira Cloud instance

Responses

Auitabs
directionhorizontal


Auitabspage
title200

Returned if the request is successful.

Content-Type - application/json

Example response (application/json)

css



Auitabspage
title401

Returned if the authentication credentials are incorrect or missing.


Expand
titleRead Grid Data

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 

Status
titleREQUIRED

string

Grid id.

issueIdOrKey 

Status
titleREQUIRED

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

Auitabs
directionhorizontal


Auitabspage
title200

Returned if the request is successful.

Content-Type - application/json

Example response (application/json)

css



Auitabspage
title400

Returned if specified column id(s) does not exist.


Auitabspage
title401

Returned if the authentication credentials are incorrect or missing.


Auitabspage
title404

Returned if:

  • The issue is not found.

  • Specified grid does not exist.


Expand
titleAdd Grid Data

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 

Status
titleREQUIRED

string

Grid id.

issueIdOrKey 

Status
titleREQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

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

Responses

Auitabs
directionhorizontal


Auitabspage
title201

Returned if the request is successful.

Content-Type - application/json

Example response (application/json)

css



Auitabspage
title400

Returned if:

  • Specified column id(s) does not exist.
  • An invalid value is set to a column e.g. a non-number to a number column.

  • A required column is not specified or assigned to an empty value.

  • A read-only column is added.
  • A userlist value is not found on Jira.

Example response (application/json)

css



Auitabspage
title401

Returned if the authentication credentials are incorrect or missing.


Auitabspage
title404

Returned if:

  • The issue is not found.

  • Specified grid does not exist.


Expand
titleUpdate Grid Data

Update Grid Data

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

Description: Update rows of the Grid custom field

Request

PATH PARAMETERS

gridId 

Status
titleREQUIRED

string

Grid id.

issueIdOrKey 

Status
titleREQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

Code Block
{ 
   "rows":[
      { 
         "rowId":"row_b089f167-9475-401b-88bd-2c2d25052196",
         "columns":{ 
            "status":"Open",
            "user":"Blake Griffin",
            "summary":"Updated value"
         }
      }
   ]
}

Responses

Auitabs
directionhorizontal


Auitabspage
title204

Returned if the request is successful.


Auitabspage
title400

Returned if:

  • Specified column id(s) does not exist.
  • An invalid value is set to a column e.g. a non-number to a number column.

  • A required column is assigned to an empty value i.e. is removed.

  • A read-only column is updated.
  • A userlist value is not found on Jira.

Example response (application/json)

css



Auitabspage
title401

Returned if the authentication credentials are incorrect or missing.


Auitabspage
title404

Returned if:

  • The issue is not found.

  • Specified grid does not exist.


Expand
titleDelete Grid Data

Delete Grid Data

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

Description: Delete rows of the Grid custom field

Request

PATH PARAMETERS

gridId 

Status
titleREQUIRED

string

Grid id.

issueIdOrKey 

Status
titleREQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

Code Block
{ 
   "rows":[
      "rowId_823e747c-a38a-4f14-8fe4-2ee565124503",
      "rowId_7424bd1a-4c1f-404c-988b-1059756f3d72"
   ]
}

Responses

Auitabs
directionhorizontal


Auitabspage
title204

Returned if the request is successful.


Auitabspage
title401

Returned if the authentication credentials are incorrect or missing.


Auitabspage
title404

Returned if:

  • The issue is not found.

  • Specified grid does not exist.
  • Specified row id does not exist in the grid. None of the rows are deleted in this case.