# \ProjectComponentsApi All URIs are relative to *https://your-domain.atlassian.net* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_component**](ProjectComponentsApi.md#create_component) | **POST** /rest/api/2/component | Create component [**delete_component**](ProjectComponentsApi.md#delete_component) | **DELETE** /rest/api/2/component/{id} | Delete component [**get_component**](ProjectComponentsApi.md#get_component) | **GET** /rest/api/2/component/{id} | Get component [**get_component_related_issues**](ProjectComponentsApi.md#get_component_related_issues) | **GET** /rest/api/2/component/{id}/relatedIssueCounts | Get component issues count [**get_project_components**](ProjectComponentsApi.md#get_project_components) | **GET** /rest/api/2/project/{projectIdOrKey}/components | Get project components [**get_project_components_paginated**](ProjectComponentsApi.md#get_project_components_paginated) | **GET** /rest/api/2/project/{projectIdOrKey}/component | Get project components paginated [**update_component**](ProjectComponentsApi.md#update_component) | **PUT** /rest/api/2/component/{id} | Update component ## create_component > crate::models::ProjectComponent create_component(project_component) Create component Creates a component. Use components to provide containers for issues within a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the component is created or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **project_component** | [**ProjectComponent**](ProjectComponent.md) | | [required] | ### Return type [**crate::models::ProjectComponent**](ProjectComponent.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## delete_component > delete_component(id, move_issues_to) Delete component Deletes a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of the component. | [required] | **move_issues_to** | Option<**String**> | The ID of the component to replace the deleted component. If this value is null no replacement is made. | | ### Return type (empty response body) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_component > crate::models::ProjectComponent get_component(id) Get component Returns a component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for project containing the component. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of the component. | [required] | ### Return type [**crate::models::ProjectComponent**](ProjectComponent.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_component_related_issues > crate::models::ComponentIssuesCount get_component_related_issues(id) Get component issues count Returns the counts of issues assigned to the component. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of the component. | [required] | ### Return type [**crate::models::ComponentIssuesCount**](ComponentIssuesCount.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_project_components > Vec get_project_components(project_id_or_key) Get project components Returns all components in a project. See the [Get project components paginated](#api-rest-api-2-project-projectIdOrKey-component-get) resource if you want to get a full list of components with pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **project_id_or_key** | **String** | The project ID or project key (case sensitive). | [required] | ### Return type [**Vec**](ProjectComponent.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_project_components_paginated > crate::models::PageBeanComponentWithIssueCount get_project_components_paginated(project_id_or_key, start_at, max_results, order_by, query) Get project components paginated Returns a [paginated](#pagination) list of all components in a project. See the [Get project components](#api-rest-api-2-project-projectIdOrKey-components-get) resource if you want to get a full list of versions without pagination. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **project_id_or_key** | **String** | The project ID or project key (case sensitive). | [required] | **start_at** | Option<**i64**> | The index of the first item to return in a page of results (page offset). | |[default to 0] **max_results** | Option<**i32**> | The maximum number of items to return per page. | |[default to 50] **order_by** | Option<**String**> | [Order](#ordering) the results by a field: * `description` Sorts by the component description. * `issueCount` Sorts by the count of issues associated with the component. * `lead` Sorts by the user key of the component's project lead. * `name` Sorts by component name. | | **query** | Option<**String**> | Filter the results using a literal string. Components with a matching `name` or `description` are returned (case insensitive). | | ### Return type [**crate::models::PageBeanComponentWithIssueCount**](PageBeanComponentWithIssueCount.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## update_component > crate::models::ProjectComponent update_component(id, project_component) 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](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of the component. | [required] | **project_component** | [**ProjectComponent**](ProjectComponent.md) | | [required] | ### Return type [**crate::models::ProjectComponent**](ProjectComponent.md) ### Authorization [OAuth2](../README.md#OAuth2), [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)