# Operations with Specific ProjectCustomField

This resource lets you access and configure custom fields in the specific project.
|  Resource  |     ```GENERIC /api/admin/projects/{projectID}/customFields/{fieldID} ```    |
| --- | --- |
|  Returned entity  |  [ProjectCustomField](api-entity-ProjectCustomField.html). For the description of the entity attributes, see [Supported Fields](#ProjectCustomField-supported-fields) section.  |
|  Supported methods  |      * `POST`: [Update a Specific ProjectCustomField](#update-ProjectCustomField-method).    * `GET`: [Read a Specific ProjectCustomField](#get-ProjectCustomField-method).    * `DELETE`: [Delete a Specific ProjectCustomField](#delete-ProjectCustomField-method).    |

## ProjectCustomField attributes

Represents settings for custom fields in a particular project.

### Related Resources

Below you can find the list of resources that let you work with this entity.

* [Project Custom Fields](resource-api-admin-customFieldSettings-customFields-fieldID-instances.html)

### Attributes

This table describes attributes of the `ProjectCustomField` entity.

* To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.

* To update an attribute, provide it in the body of a POST request.

|  Field  |  Type  |  Description  |
| --- | --- | --- |
|  id  |  String  |  The ID of the project custom field. `Read-only`.  |
|  field  |  [CustomField](api-entity-CustomField.html)  |  The custom field in the project. `Read-only`. `Can be null`.  |
|  project  |  [Project](api-entity-Project.html)  |  The project where the custom field belongs. `Read-only`. `Can be null`.  |
|  canBeEmpty  |  Boolean  |  If `true`, the custom field can have empty value, otherwise `false`.  |
|  emptyFieldText  |  String  |  The text that is shown as a placeholder when the custom field has an empty value. `Can be null`.  |
|  ordinal  |  Int  |  The position number of this field on the list of project custom fields.  |
|  isPublic  |  Boolean  |  If `true`, the basic Read Issue and Update Issue permissions are sufficient to access this field. If `false`, the Read Issue Private Fields and Update Issue Private Fields permissions are required.  |
|  hasRunningJob  |  Boolean  |  If `true`, there is a background job running for this field. In this case, some field operations may be temporary inaccessible. `Read-only`.  |
|  condition  |  [CustomFieldCondition](api-entity-CustomFieldCondition.html)  |  The condition for showing the custom field. `Can be null`.  |

## Update a Specific ProjectCustomField

Change the settings of the specific custom field in the project.

### Required permissions

Requires permissions: Update Project

### Request syntax

```GENERIC
POST /api/admin/projects/{projectID}/customFields/{fieldID}?{fields}
```

|  {fieldID}  |  The database ID of the project custom field.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/admin/projects/0-0/customFields/92-4?fields=id,bundle(id,isUpdateable,name,values(archived,releaseDate,released,id,name)),canBeEmpty,emptyFieldText,field(name,aliases,id,isAutoAttached,isDisplayedInIssueList,isPublic,isUpdateable),project(id,name)
```

#### Sample request body

```JSON
{
  "emptyFieldText": "No version"
}
```

#### Sample response body

```JSON
{
  "bundle": {
    "values": [
      {
        "releaseDate": 1548936000000,
        "released": false,
        "archived": false,
        "name": "2019.1",
        "id": "133-19",
        "$type": "VersionBundleElement"
      }
    ],
    "isUpdateable": true,
    "name": "Sample Project: Versions",
    "id": "71-1",
    "$type": "VersionBundle"
  },
  "field": {
    "aliases": "fix for, fixed in, fix version, version",
    "isAutoAttached": true,
    "isDisplayedInIssueList": true,
    "isUpdateable": true,
    "name": "Fix versions",
    "id": "58-5",
    "$type": "CustomField"
  },
  "canBeEmpty": true,
  "project": {
    "name": "Sample Project",
    "id": "0-0",
    "$type": "Project"
  },
  "emptyFieldText": "No version",
  "id": "92-4",
  "$type": "VersionProjectCustomField"
}
```

## Read a Specific ProjectCustomField

Get the settings of the specific custom field in the project.

### Required permissions

* If the field is public, requires Create Issue or Read Issue permission.

* If the field is private, requires Read Issue Private Fields permission.

### Request syntax

```GENERIC
GET /api/admin/projects/{projectID}/customFields/{fieldID}?{fields}
```

|  {fieldID}  |  The database ID of the project custom field.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/admin/projects/0-0/customFields/92-4?fields=id,name,aliases,bundle(id,isUpdateable,name,values(archived,releaseDate,released,id,name)),canBeEmpty,emptyFieldText,field(name,id,isAutoAttached,isDisplayedInIssueList,isPublic,isUpdateable),project(id,name)
```

#### Sample response body

```JSON
{
  "bundle": {
    "values": [
      {
        "releaseDate": 1548936000000,
        "released": false,
        "archived": false,
        "name": "2019.1",
        "id": "133-19",
        "$type": "VersionBundleElement"
      }
    ],
    "isUpdateable": true,
    "name": "Sample Project: Versions",
    "id": "71-1",
    "$type": "VersionBundle"
  },
  "field": {
    "isAutoAttached": true,
    "isDisplayedInIssueList": true,
    "isUpdateable": true,
    "name": "Fix versions",
    "id": "58-5",
    "$type": "CustomField"
  },
  "canBeEmpty": true,
  "project": {
    "name": "Sample Project",
    "id": "0-0",
    "$type": "Project"
  },
  "emptyFieldText": "Unscheduled",
  "id": "92-4",
  "$type": "VersionProjectCustomField"
}
```

## Delete a Specific ProjectCustomField

Remove the specific custom field from the project.

### Required permissions

Requires permissions: Update Project

### Request syntax

```GENERIC
DELETE /api/admin/projects/{projectID}/customFields/{fieldID}
```

|  {fieldID}  |  The database ID of the project custom field.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/admin/projects/0-0/customFields/92-35
```

