Skip to content

component

create

Create component

Creates a component. Use components to provide containers for issues within a project. Use components to provide containers for issues within a project.

This operation can be accessed anonymously.

Permissions required: Administer projects project permission for the project in which the component is created or Administer Jira global permission.

POST /rest/api/3/component

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)

Example:

bash
jr component create

delete

Delete component

Deletes a component.

This operation can be accessed anonymously.

Permissions required: Administer projects project permission for the project containing the component or Administer Jira global permission.

DELETE /rest/api/3/component/{id}

FlagTypeRequiredDescription
--idstringYesThe ID of the component.
--moveIssuesTostringNoThe ID of the component to replace the deleted component. If this value is null no replacement is made.

Example:

bash
jr component delete --id <id>

find-for-projects

Find components for projects

Returns a paginated list of all components in a project, including global (Compass) components when applicable.

This operation can be accessed anonymously.

Permissions required: Browse Projects project permission for the project.

GET /rest/api/3/component

FlagTypeRequiredDescription
--maxResultsstringNoThe maximum number of items to return per page.
--orderBystringNoOrder the results by a field:
  • description Sorts by the component description.
  • name Sorts by component name. | | --projectIdsOrKeys | string | No | The project IDs and/or project keys (case sensitive). | | --query | string | No | Filter the results using a literal string. Components with a matching name or description are returned (case insensitive). | | --startAt | string | No | The index of the first item to return in a page of results (page offset). |

Example:

bash
jr component find-for-projects

get

Get component

Returns a component.

This operation can be accessed anonymously.

Permissions required: Browse projects project permission for project containing the component.

GET /rest/api/3/component/{id}

FlagTypeRequiredDescription
--idstringYesThe ID of the component.

Example:

bash
jr component get --id <id>

Get component issues count

Returns the counts of issues assigned to the component.

This operation can be accessed anonymously.

Deprecation notice: The required OAuth 2.0 scopes will be updated on June 15, 2024.

  • Classic: read:jira-work
  • Granular: read:field:jira, read:project.component:jira

Permissions required: None.

GET /rest/api/3/component/{id}/relatedIssueCounts

FlagTypeRequiredDescription
--idstringYesThe ID of the component.

Example:

bash
jr component get-related-issues --id <id>

update

Update component

Updates a component. Any fields included in the request are overwritten. If leadAccountId is an empty string ("") the component lead is removed.

This operation can be accessed anonymously.

Permissions required: Administer projects project permission for the project containing the component or Administer Jira global permission.

PUT /rest/api/3/component/{id}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the component.

Example:

bash
jr component update --id <id>