# Update log profiles (REST API)


> Update an existing F5 WAF for NGINX security log profile or create a new revision using the F5 NGINX Instance Manager REST API.

You can update an existing F5 WAF for NGINX security log profile using the F5 NGINX Instance Manager REST API. Depending on your workflow, you can either overwrite the current version or create a new revision.

To update a log profile, use one of the following methods:

- `POST` with the `isNewRevision=true` parameter to create a new revision.
- `PUT` with the log profile UID to overwrite the existing version.

**Note:** 
Use tools such as `curl` or [Postman](https://www.postman.com) to send requests to the NGINX Instance Manager REST API.
The API base URL is `https://<NIM-FQDN>/api/[nim|platform]/<API_VERSION>`.  
All requests require authentication. For details on authentication methods, see the [API overview](/nim/fundamentals/api-overview.md).

| Method | Endpoint                                                           |
|--------|--------------------------------------------------------------------|
| POST   | `/api/platform/v1/security/logprofiles?isNewRevision=true`         |
| PUT    | `/api/platform/v1/security/logprofiles/{security-log-profile-uid}` |

### Create a new revision

```shell
curl -X POST https://<NIM_FQDN>/api/platform/v1/security/logprofiles?isNewRevision=true \
    -H "Authorization: Bearer <access token>" \
    -H "Content-Type: application/json" \
    -d @update-default-log.json
```

### Overwrite an existing log profile

To overwrite an existing security log profile:

1. Retrieve the profile’s UID:

    ```shell
    curl -X GET https://<NIM_FQDN>/api/platform/v1/security/logprofiles/<log-profile-uid> \
      -H "Authorization: Bearer <access token>" \
    ```

2. Update the log profile using the UID:

    ```shell
    curl -X PUT https://<NIM_FQDN>/api/platform/v1/security/logprofiles/<log-profile-uid> \
      -H "Authorization: Bearer <access token>" \
      -H "Content-Type: application/json" \
      -d @update-log-profile.json
      ```

After updating the security log profile, you can [publish it to specific instances or instance groups](/nim/waf-integration/policies-and-logs/publish/_index.md).

