Confluence has been updated to version 6.15.9

Page tree
Skip to end of metadata
Go to start of metadata

 Read Grid Data

API call: GET /rest/idalko-grid/1.0/api/grid/{gridCustomFieldId}/issue/{issueIdOrKey}

Desription: Read all rows of the Grid custom field

Request

PATH PARAMETERS

gridCustomFieldId REQUIRED

string

The id of the Grid custom field.

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

Returned if the request is successful.

Content-Type - application/json

Example response (application/json)

{ 
   "customFieldId":"12345",
   "description":"This is grid custom field",
   "rows":[ 
      { 
         "rowId":"row_34477069-bdb5-4330-b162-f2dfea402b41",
         "columns":{ 
            "summary":"Prepare",
            "status":"Done",
            "user":{ 
               "value":"LeBron James",
               "avatar":"{avatar url}"
            }
         },
         "order":0
      },
      { 
         "rowId":"row_4201bbd1-f933-4cbc-be5c-24b2b1582b71",
         "columns":{ 
            "summary":"Implement",
            "status":"In Progress",
            "user":{ 
               "value":"Odell Beckham Jr",
               "avatar":"{avatar url}"
            }
         },
         "order":1
      },
      { 
         "rowId":"row_87e87312-73cb-4a46-8502-b3e596027ce2",
         "columns":{ 
            "summary":"Validate",
            "status":"Open",
            "user":{ 
               "value":"Tom Brady",
               "avatar":"{avatar url}"
            }
         },
         "order":2
      }
   ]
}
Returned if specified column id(s) does not exist.
Returned if the authentication credentials are incorrect or missing.

Returned if:

  • The issue is not found or the user does not have permission to view it.

  • The custom field is not found or it's not the Grid type.
 Add Grid Data

API call: POST /rest/idalko-grid/1.0/api/grid/{gridCustomFieldId}/issue/{issueIdOrKey}

Desription: Add rows to the Grid custom field

Request

PATH PARAMETERS

gridCustomFieldId REQUIRED

string

The id of the Grid custom field.

issueIdOrKey REQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

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

Responses

Returned if the request is successful.

Content-Type - application/json

Example response (application/json)

["row_b089f167-9475-401b-88bd-2c2d25052196"]

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)

{
  "errorMessages": [
    "Column 'summary' is required"
  ]
}
Returned if the authentication credentials are incorrect or missing.

Returned if:

  • The issue is not found or the user does not have permission to view it.

  • The custom field is not found or it's not the Grid type.
 Update Grid Data

API call: PUT /rest/idalko-grid/1.0/api/grid/{gridCustomFieldId}/issue/{issueIdOrKey}

Description: Update rows of the Grid custom field

Request

PATH PARAMETERS

gridCustomFieldId REQUIRED

string

The id of the Grid custom field.

issueIdOrKey REQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

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

Responses

Returned if the request is successful.

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)

{
  "errorMessages": [
    "Column 'summary' is required"
  ]
}
Returned if the authentication credentials are incorrect or missing.

Returned if:

  • The issue is not found or the user does not have permission to view it.

  • The custom field is not found or it's not the Grid type.
 Delete Grid Data

API call: DELETE /rest/idalko-grid/1.0/api/grid/{gridCustomFieldId}/issue/{issueIdOrKey}

Description: Delete rows of the Grid custom field

Request

PATH PARAMETERS

gridCustomFieldId REQUIRED

string

The id of the Grid custom field.

issueIdOrKey REQUIRED

string

The ID or key of the issue.

BODY

Example (application/json)

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

Responses

Returned if the request is successful.
Returned if the authentication credentials are incorrect or missing.

Returned if:

  • The issue is not found or the user does not have permission to view it.

  • The custom field is not found or it's not the Grid type.
  • Specified row id does not exist in the grid. None of the rows are deleted in this case.
 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:
    • "key" contains user key, which uniquely identifies a user.
      "key" may be missing if a user could not be found.
      When using "Add Grid Data" or "Update Grid Data" methods, "key" MUST be provided, and the rest of the entries are optional.
    • "username" contains user's username.
    • "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.

  • No labels