---
title: "Mark P4 import as running"
method: POST
path: "/repos/{repo_id}/p4-import-state/mark-running"
tags: ["Perforce Repository Import"]
---

# Mark P4 import as running

`POST /repos/{repo_id}/p4-import-state/mark-running`

## Request

- Base URL: `https://api.diversion.dev/v0`
- URL: `https://api.diversion.dev/v0/repos/{repo_id}/p4-import-state/mark-running`
- Auth: OAuth 2
  - Implicit: `https://auth.diversion.dev/oauth2/authorize`
  - Scopes: `coreapi/write`
- TypeScript: <https://skmtc.dev/diversion/apis/diversion-core-api/docs/repos/:repo_id/p4-import-state/mark-running/post.ts> (a function with typed inputs; its response is checked against the schema)

Mark the Perforce import job as currently running by generating a new running_job_id and setting the start timestamp. This should be called when a continuous import job begins.

## Query parameters

- `branch_ref` string
- `p4_import_path` string

## Response `200`

Job marked as running successfully

- object
  - `running_job_id` string, required: The generated UUID for this running job instance

## Other responses

- `400`: The request does not meet the required conditions
- `404`: The specified resource was not found
- `default`: An error occurred

---

[API](https://skmtc.dev/diversion/apis/diversion-core-api.md) - [All operations](https://skmtc.dev/diversion/apis/diversion-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/diversion/apis/diversion-core-api/revisions/38a18aba804b?raw)
