# \IssueFieldsApi All URIs are relative to *https://your-domain.atlassian.net* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_custom_field**](IssueFieldsApi.md#create_custom_field) | **POST** /rest/api/3/field | Create custom field [**delete_custom_field**](IssueFieldsApi.md#delete_custom_field) | **DELETE** /rest/api/3/field/{id} | Delete custom field [**get_contexts_for_field_deprecated**](IssueFieldsApi.md#get_contexts_for_field_deprecated) | **GET** /rest/api/3/field/{fieldId}/contexts | Get contexts for a field [**get_fields**](IssueFieldsApi.md#get_fields) | **GET** /rest/api/3/field | Get fields [**get_fields_paginated**](IssueFieldsApi.md#get_fields_paginated) | **GET** /rest/api/3/field/search | Get fields paginated [**get_trashed_fields_paginated**](IssueFieldsApi.md#get_trashed_fields_paginated) | **GET** /rest/api/3/field/search/trashed | Get fields in trash paginated [**restore_custom_field**](IssueFieldsApi.md#restore_custom_field) | **POST** /rest/api/3/field/{id}/restore | Restore custom field from trash [**trash_custom_field**](IssueFieldsApi.md#trash_custom_field) | **POST** /rest/api/3/field/{id}/trash | Move custom field to trash [**update_custom_field**](IssueFieldsApi.md#update_custom_field) | **PUT** /rest/api/3/field/{fieldId} | Update custom field ## create_custom_field > models::FieldDetails create_custom_field(custom_field_definition_json_bean) Create custom field Creates a custom field. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **custom_field_definition_json_bean** | [**CustomFieldDefinitionJsonBean**](CustomFieldDefinitionJsonBean.md) | Definition of the custom field to be created | [required] | ### Return type [**models::FieldDetails**](FieldDetails.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_custom_field > delete_custom_field(id) Delete custom field Deletes a custom field. The custom field is deleted whether it is in the trash or not. See [Edit or delete a custom field](https://confluence.atlassian.com/x/Z44fOw) for more information on trashing and deleting custom fields. This operation is [asynchronous](#async). Follow the `location` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of a custom field. | [required] | ### Return type (empty response body) ### 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_contexts_for_field_deprecated > models::PageBeanContext get_contexts_for_field_deprecated(field_id, start_at, max_results) Get contexts for a field Returns a [paginated](#pagination) list of the contexts a field is used in. Deprecated, use [ Get custom field contexts](#api-rest-api-3-field-fieldId-context-get). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **field_id** | **String** | The ID of the field to return contexts for. | [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 20] ### Return type [**models::PageBeanContext**](PageBeanContext.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_fields > Vec get_fields() Get fields Returns system and custom issue fields according to the following rules: * Fields that cannot be added to the issue navigator are always returned. * Fields that cannot be placed on an issue screen are always returned. * Fields that depend on global Jira settings are only returned if the setting is enabled. That is, timetracking fields, subtasks, votes, and watches. * For all other fields, this operation only returns the fields that the user has permission to view (that is, the field is used in at least one project that the user has *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for.) This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. ### Parameters This endpoint does not need any parameter. ### Return type [**Vec**](FieldDetails.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_fields_paginated > models::PageBeanField get_fields_paginated(start_at, max_results, r#type, id, query, order_by, expand) Get fields paginated Returns a [paginated](#pagination) list of fields for Classic Jira projects. The list can include: * all fields * specific fields, by defining `id` * fields that contain a string in the field name or description, by defining `query` * specific fields that contain a string in the field name or description, by defining `id` and `query` Only custom fields can be queried, `type` must be set to `custom`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **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] **r#type** | Option<[**Vec**](String.md)> | The type of fields to search. | | **id** | Option<[**Vec**](String.md)> | The IDs of the custom fields to return or, where `query` is specified, filter. | | **query** | Option<**String**> | String used to perform a case-insensitive partial match with field names or descriptions. | | **order_by** | Option<**String**> | [Order](#ordering) the results by a field: * `contextsCount` sorts by the number of contexts related to a field * `lastUsed` sorts by the date when the value of the field last changed * `name` sorts by the field name * `screensCount` sorts by the number of screens related to a field | | **expand** | Option<**String**> | Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `key` returns the key for each field * `stableId` returns the stableId for each field * `lastUsed` returns the date when the value of the field last changed * `screensCount` returns the number of screens related to a field * `contextsCount` returns the number of contexts related to a field * `isLocked` returns information about whether the field is [locked](https://confluence.atlassian.com/x/ZSN7Og) * `searcherKey` returns the searcher key for each custom field | | ### Return type [**models::PageBeanField**](PageBeanField.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_trashed_fields_paginated > models::PageBeanField get_trashed_fields_paginated(start_at, max_results, id, query, expand, order_by) Get fields in trash paginated Returns a [paginated](#pagination) list of fields in the trash. The list may be restricted to fields whose field name or description partially match a string. Only custom fields can be queried, `type` must be set to `custom`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **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] **id** | Option<[**Vec**](String.md)> | | | **query** | Option<**String**> | String used to perform a case-insensitive partial match with field names or descriptions. | | **expand** | Option<**String**> | | | **order_by** | Option<**String**> | [Order](#ordering) the results by a field: * `name` sorts by the field name * `trashDate` sorts by the date the field was moved to the trash * `plannedDeletionDate` sorts by the planned deletion date | | ### Return type [**models::PageBeanField**](PageBeanField.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) ## restore_custom_field > serde_json::Value restore_custom_field(id) Restore custom field from trash Restores a custom field from trash. See [Edit or delete a custom field](https://confluence.atlassian.com/x/Z44fOw) for more information on trashing and deleting custom fields. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of a custom field. | [required] | ### Return type [**serde_json::Value**](serde_json::Value.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) ## trash_custom_field > serde_json::Value trash_custom_field(id) Move custom field to trash Moves a custom field to trash. See [Edit or delete a custom field](https://confluence.atlassian.com/x/Z44fOw) for more information on trashing and deleting custom fields. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The ID of a custom field. | [required] | ### Return type [**serde_json::Value**](serde_json::Value.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_custom_field > serde_json::Value update_custom_field(field_id, update_custom_field_details) Update custom field Updates a custom field. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **field_id** | **String** | The ID of the custom field. | [required] | **update_custom_field_details** | [**UpdateCustomFieldDetails**](UpdateCustomFieldDetails.md) | The custom field update details. | [required] | ### Return type [**serde_json::Value**](serde_json::Value.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)