> ## 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.

# Update Method-Level Override

> Adds or updates a method-level connector override for traffic log settings. Method-level overrides allow different logging configurations per API endpoint and connector combination.

## Endpoint

```
PUT /apiops/projects/{projectName}/apiProxies/{apiProxyName}/trafficLogSettings/{environmentName}/methods/{methodName}/connectors/{connectorType}/
```

## 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                                 |
| environmentName | string | Yes      | Environment name                               |
| methodName      | string | Yes      | API method/endpoint name                       |
| connectorType   | string | Yes      | Connector type (e.g., ELASTICSEARCH, DATABASE) |

### Connector Types

`ELASTICSEARCH_INDEX`, `DB_INSERT_UPDATE_DELETE`, `SYSLOG_SEND`, `WEBHOOK_SEND`, `RABBITMQ_SEND`, `ACTIVEMQ_SEND`, `KAFKA_SEND`, `GRAYLOG_SEND`, `LOGBACK_APPEND`

### Request Body

The request body is a Connector Log Settings object. See [Update Traffic Log Settings](/api-reference/api-proxies/settings/update-traffic-log-settings#connector-log-settings-fields) for field descriptions.

```json theme={null}
{
  "enabled": true,
  "logBodyRequestFromClient": false,
  "logBodyResponseFromTarget": true,
  "enableBodyFromClientSize": true,
  "sizeBodyFromClient": 512
}
```

## Response

### Success Response (200 OK)

```json theme={null}
{
  "status": "SUCCESS",
  "resultList": null,
  "resultCount": null
}
```

### Error Response (400 Bad Request)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Method (/pets) is not found in ApiProxy!"
}
```

## cURL Example

```bash theme={null}
curl -X PUT \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/trafficLogSettings/production/methods/%2Fpets/connectors/ELASTICSEARCH_INDEX/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "logBodyRequestFromClient": false,
    "logBodyResponseFromTarget": true
  }'
```

<Warning>
  Method names containing `/` must be URL-encoded (e.g., `/pets` → `%2Fpets`).
</Warning>

## Notes and Warnings

* **Automatic Deployment**: Changes are automatically deployed after save
* **Override Precedence**: Method-level settings override proxy-level settings for the specified connector
* **Null Fields**: Fields set to `null` inherit from proxy-level connector settings

## Permissions

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

## Related Documentation

* [Delete Method Override](/api-reference/api-proxies/traffic-log-settings/delete-method-override) - Remove a method override
* [Update Traffic Log Settings](/api-reference/api-proxies/traffic-log-settings/update) - Update proxy-level settings
