---
title: "POST /projects/{id}/sync/"
method: POST
path: "/projects/{id}/sync/"
tags: ["projects"]
---

# POST /projects/{id}/sync/

`POST /projects/{id}/sync/`

Provide default implementation to get_response_serializer_class.

The view class should override this method if the response body format
is different from the request.

## Path parameters

- `id` integer, required

## Request body

- Project
  - `name` string, required
  - `description` string
  - `credential_id` integer, nullable, required
  - `id` integer, required
  - `url` string, required
  - `git_hash` string, required
  - `import_state` 'pending' | 'running' | 'failed' | 'completed', required — * `pending` - Pending * `running` - Running * `failed` - Failed * `completed` - Completed
  - `import_error` string, nullable, required
  - `import_task_id` string, uuid, nullable, required
  - `created_at` string, date-time, required
  - `modified_at` string, date-time, required

## Response `202`

- TaskRef
  - `id` string, uuid, required
  - `href` string, uri, required

## Changes

- **2023-05-19** `f84d9240fdf2` — 1 info
  - the endpoint scheme security `cookieAuth` was removed from the API
- **2023-04-25** `62d33b790834` — 13 breaking, 5 warning, 4 info
  - added required request body
  - the `id` response's property type/format changed from `integer`/`` to `string`/`uuid` for status `202`
  - removed the required property `created_at` from the response with the `202` status
  - removed the required property `git_hash` from the response with the `202` status
  - …18 more

[Change history](https://skmtc.dev/ansible/apis/event-driven-ansible-api/changes/projects/:id/sync/post.md)

---

[API](https://skmtc.dev/ansible/apis/event-driven-ansible-api.md) · [All operations](https://skmtc.dev/ansible/apis/event-driven-ansible-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ansible/event-driven-ansible-api/revisions/f84d9240fdf2/schema)
