---
title: "Get custom field contexts for projects and issue types"
method: POST
path: "/rest/api/2/field/{fieldId}/context/mapping"
tags: ["Issue custom field contexts"]
---

# Get custom field contexts for projects and issue types

`POST /rest/api/2/field/{fieldId}/context/mapping`

Returns a [paginated](#pagination) list of project and issue type mappings and, for each mapping, the ID of a [custom field context](https://confluence.atlassian.com/x/k44fOw) that applies to the project and issue type.

If there is no custom field context assigned to the project then, if present, the custom field context that applies to all projects is returned if it also applies to the issue type or all issue types. If a custom field context is not found, the returned custom field context ID is `null`.

Duplicate project and issue type mappings cannot be provided in the request.

The order of the returned values is the same as provided in the request.

**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).

## Path parameters

- `fieldId` string, required

## Query parameters

- `startAt` integer
- `maxResults` integer

## Request body

- ProjectIssueTypeMappings — The project and issue type mappings.
  - `mappings` ProjectIssueTypeMapping[], required — The project and issue type mappings.
    - `issueTypeId` string, required — The ID of the issue type.
    - `projectId` string, required — The ID of the project.

## Response `200`

Returned if the request is successful.

- PageBeanContextForProjectAndIssueType — A page of items.
  - `isLast` boolean — Whether this is the last page.
  - `maxResults` integer — The maximum number of items that could be returned.
  - `nextPage` string, uri — If there is another page of results, the URL of the next page.
  - `self` string, uri — The URL of the page.
  - `startAt` integer — The index of the first item returned.
  - `total` integer — The number of items returned.
  - `values` ContextForProjectAndIssueType[] — The list of items.
    - `contextId` string, required — The ID of the custom field context.
    - `issueTypeId` string, required — The ID of the issue type.
    - `projectId` string, required — The ID of the project.

## Other responses

- `400` — Returned if the request is not valid.
- `401` — Returned if the authentication credentials are incorrect or missing.
- `403` — Returned if the user does not have the required permissions.
- `404` — Returned if the custom field, project, or issue type is not found.

---

[API](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api.md) · [All operations](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atlassian/the-jira-cloud-platform-rest-api/revisions/7e9af75061ea/schema)
