v1

latestOpenAPI 3.0.32026-07-22115106141.4 KB
Perforce Repository Import

Update P4 import state

Initialize or update the state of a continuous Perforce import job after manual initial import. Creates or updates a P4ImportJob record tracking the last imported changelist for incremental syncing.

post/repos/{repo_id}/p4-import-state

Request body

branch_refstring required

Ref ID of the branch to import to

p4_import_pathstring required

Path in Perforce depot to import from

last_changelistinteger required

Last Perforce changelist number that was imported

last_import_unixinteger nullable

Unix timestamp of the last successful import

commit_refstring nullable

Optional commit reference for the commit created from last_changelist. When provided, a P4CommitMapping is recorded to track the CL-to-commit relationship.

Example request

{
  "branch_ref": "dv.branch.1",
  "p4_import_path": "//depot/main/...",
  "commit_ref": "dv.commit.12345"
}

Response

Import state updated successfully

last_changelistinteger required

Last Perforce changelist number that was imported

last_import_unixinteger nullable

Unix timestamp of the last successful import

running_job_idstring nullable

ID of the currently running import job, if any

error_countinteger required

Number of consecutive errors encountered

last_errorstring nullable

Last error message encountered during import

last_error_unixinteger nullable

Unix timestamp of the last error

branch_refstring required

reference name of the branch being synced

p4_import_pathstring required

Perforce depot path being imported (e.g., //depot/main/...)

started_unixinteger nullable

Unix timestamp when the current job started running

Example response

{
  "branch_ref": "dv.branch.1"
}