---
updatedAt: 2026-06-16T18:46:24.000Z
agentTools:
  siteIndex: https://developer.jamf.com/llms.txt
  projectIndex: https://developer.jamf.com/jamf-pro/llms.txt
---

# Flushes a log specified in an XML file

> 📘 Notice
>
> The ability to flush logs is currently only supported for flushing all logs for a given policy or all logs for a given computer. There is no support for flushing logs for a given policy and computer combination.

Use the drop down menus above to identify supported values within the sample request body below.

```xml Flush all logs for a policy
<logflush>
	<log>policy</log>
	<log_id>2</log_id>
	<interval>THREE MONTHS</interval>
</logflush>
```
```text Flush all logs for computer(s)
<computers><logflush>
	<log>policy</log>
	<interval>THREE MONTHS</interval>
	<computers>
		<computer>
			<id>1</id>
		</computer>
		<computer>
			<id>2</id>
		</computer>
	</computers>
</logflush>
```

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "11.32.0",
    "title": "Classic API",
    "license": {
      "name": "Jamf API License Agreement",
      "url": "https://developer.jamf.com/developer-guide/docs/api-license-agreement"
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl",
      "swift",
      "ruby",
      "python"
    ],
    "explorer-enabled": false
  },
  "paths": {
    "/logflush": {
      "delete": {
        "tags": [
          "logflush"
        ],
        "summary": "Flushes a log specified in an XML file",
        "operationId": "logFlush",
        "requestBody": {
          "content": {
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/logflush"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://yourServer.jamfcloud.com/JSSResource"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "logflush": {
        "type": "object",
        "properties": {
          "log": {
            "type": "string",
            "enum": [
              "policy"
            ]
          },
          "log_id": {
            "type": "integer",
            "example": 1
          },
          "interval": {
            "type": "string",
            "enum": [
              "Zero Days",
              "Zero Weeks",
              "Zero Months",
              "Zero Years",
              "One Days",
              "One Weeks",
              "One Months",
              "One Years",
              "Two Days",
              "Two Weeks",
              "Two Months",
              "Two Years",
              "Three Days",
              "Three Weeks",
              "Three Months",
              "Three Years",
              "Six Days",
              "Six Weeks",
              "Six Months",
              "Six Years"
            ]
          },
          "computers": {
            "type": "object",
            "properties": {
              "computer": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 1
                  }
                }
              }
            }
          }
        },
        "required": [
          "log",
          "log_id",
          "interval"
        ]
      }
    }
  }
}
```