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
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
Example:
jr component createdelete
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the component. |
--moveIssuesTo | string | No | The ID of the component to replace the deleted component. If this value is null no replacement is made. |
Example:
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
| Flag | Type | Required | Description |
|---|---|---|---|
--maxResults | string | No | The maximum number of items to return per page. |
--orderBy | string | No | Order the results by a field: |
descriptionSorts by the component description.nameSorts 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 matchingnameordescriptionare returned (case insensitive). | |--startAt| string | No | The index of the first item to return in a page of results (page offset). |
Example:
jr component find-for-projectsget
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the component. |
Example:
jr component get --id <id>get-related-issues
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
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Yes | The ID of the component. |
Example:
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}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--id | string | Yes | The ID of the component. |
Example:
jr component update --id <id>