# Class: FieldClient

## FieldClient

## Constructor

#### new FieldClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/field'

##### Parameters:

Name | Type | Description
--- | --- | ---
`jiraClient` | JiraClient |

Source:
  - api/field.js, line 5

### Methods

#### createCustomField(opts, callback)

Creates a custom field using a definition (object encapsulating custom field data)

##### Parameters:

Name | Type | Description
--- | --- | ---

`opts`

The request options to send to Jira

###### Properties

Name | Type | Description
--- | --- | ---
`field` |  | See https://docs.atlassian.com/jira/REST/latest/#d2e3412

`callback` |  | Called when the custom field has been created.

Source:
  - api/field.js, line 33

#### getAllFields(opts, callback)

Returns a list of all fields, both System and Custom

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | Ignored
`callback` |  | Called when the fields have been retrieved.

Source:
  - api/field.js, line 14