---
title: "Create a preheat policy under a project"
method: POST
path: "/projects/{project_name}/preheat/policies"
tags: ["preheat"]
---

# Create a preheat policy under a project

`POST /projects/{project_name}/preheat/policies`

Create a preheat policy under a project

## Path parameters

- `project_name` string, required

## Headers

- `X-Request-Id` string

## Request body

- PreheatPolicy
  - `id` integer — The ID of preheat policy
  - `name` string — The Name of preheat policy
  - `description` string — The Description of preheat policy
  - `project_id` integer — The ID of preheat policy project
  - `provider_id` integer — The ID of preheat policy provider
  - `provider_name` string — The Name of preheat policy provider
  - `filters` string — The Filters of preheat policy
  - `trigger` string — The Trigger of preheat policy
  - `enabled` boolean — Whether the preheat policy enabled
  - `extra_attrs` string — The extra attributes of preheat policy
  - `creation_time` string, date-time — The Create Time of preheat policy
  - `update_time` string, date-time — The Update Time of preheat policy

## Response `201`

Created

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `500` — Internal server error

---

[API](https://skmtc.dev/cerit/apis/harbor-api.md) · [All operations](https://skmtc.dev/cerit/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cerit/harbor-api/revisions/62d78801f8df/schema)
