> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Method Policies

> Retrieves all policies (request, response, and error pipelines) for a specific method identified by its path name and HTTP method combination.

## Endpoint

```
POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/methods/policies/
```

## Authentication

Requires a Personal API Access Token.

### Header

```
Authorization: Bearer YOUR_TOKEN
```

## Request

### Headers

| Header        | Value            | Required |
| ------------- | ---------------- | -------- |
| Authorization | Bearer {token}   | Yes      |
| Content-Type  | application/json | Yes      |

### Path Parameters

| Parameter    | Type   | Required | Description    |
| ------------ | ------ | -------- | -------------- |
| projectName  | string | Yes      | Project name   |
| apiProxyName | string | Yes      | API Proxy name |

### Request Body

#### Full JSON Body Example

```json theme={null}
{
  "name": "/api/users",
  "httpMethod": "GET"
}
```

#### Request Body Fields

| Field      | Type   | Required | Description                                                                     |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------- |
| name       | string | Yes      | Method path/name                                                                |
| httpMethod | string | Yes      | HTTP method for the method. See [EnumHttpRequestMethod](#enumhttprequestmethod) |

### Query Parameters

None

## Response

### Success Response (200 OK)

```json theme={null}
{
  "id": "endpoint-id",
  "endpoint": "/api/users",
  "description": "Get all users",
  "active": true,
  "httpMethod": "GET",
  "backendResourceUrl": "/users",
  "backendHttpMethod": "GET",
  "requestPolicyList": [
    {
      "type": "policy-api-based-throttling",
      "name": "throttling-policy",
      "description": "Throttling policy",
      "active": true
    }
  ],
  "responsePolicyList": [
    {
      "type": "policy-script",
      "name": "response-logging",
      "description": "Response logging",
      "active": true
    }
  ],
  "errorPolicyList": []
}
```

### Response Fields

| Field              | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| id                 | string  | Method unique identifier           |
| endpoint           | string  | Method path/name                   |
| description        | string  | Method description                 |
| active             | boolean | Whether method is active/enabled   |
| httpMethod         | string  | HTTP method for the method         |
| backendResourceUrl | string  | Backend resource URL               |
| backendHttpMethod  | string  | HTTP method for backend call       |
| requestPolicyList  | array   | List of request pipeline policies  |
| responsePolicyList | array   | List of response pipeline policies |
| errorPolicyList    | array   | List of error pipeline policies    |

### Policy Object Fields (in policy lists)

| Field       | Type    | Description              |
| ----------- | ------- | ------------------------ |
| type        | string  | Policy type              |
| name        | string  | Policy name              |
| description | string  | Policy description       |
| active      | boolean | Whether policy is active |

**Note:** Policy objects contain only basic information. For full policy configuration details, use the [Policies API](/api-reference/policies/crud).

### EnumHttpRequestMethod

* `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `OPTIONS`, `HEAD`, `TRACE`, `ALL`

### Error Response (400 Bad Request)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Endpoint identifier (name and httpMethod) must be provided in request body!"
}
```

or

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Endpoint with name (/api/users) and HTTP method (GET) is not found!"
}
```

### Error Response (401 Unauthorized)

```json theme={null}
{
  "error": "unauthorized_client",
  "error_description": "Invalid token"
}
```

### Error Response (400 Bad Request - API Proxy Not Found)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "ApiProxy (name: MyAPI) is not found!"
}
```

## cURL Example

```bash theme={null}
curl -X POST \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/methods/policies/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "/api/users",
    "httpMethod": "GET"
  }'
```

## Permissions

User must have **`API_MANAGEMENT` + `VIEW`** permission in the project.

## Notes and Warnings

* **Method Identifier**: The method is identified by the combination of `name` (path) and `httpMethod` -- not by ID
* **Policy Details**: Policy objects contain basic information only. For full policy configuration, use the [Policies API](/api-reference/policies/crud)
* **Empty Lists**: If no policies exist in a pipeline, an empty array is returned
* **Difference from List Endpoint Policies**: This endpoint uses the `/methods/policies/` path and follows the same pattern as the other methods-based endpoints

## Related Documentation

* [List Methods](/api-reference/api-proxies/endpoints/list-methods) - List all methods with optional policies
* [List Endpoint Policies](/api-reference/api-proxies/endpoints/list-endpoint-policies) - List policies for an endpoint
* [List Policies](/api-reference/policies/crud/list-policies) - List all policies (proxy-level and method-level)
* [Policies API](/api-reference/policies/crud) - Policy management API
