GoHarbor Replication API
The replication API from GoHarbor — 2 operation(s) for replication.
The replication API from GoHarbor — 2 operation(s) for replication.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/goharbor-replication-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Harbor Replication API
description: These APIs provide services for manipulating Harbor project.
version: '2.0'
servers:
- url: http://localhost/api/v2.0
- url: https://localhost/api/v2.0
security:
- basic: []
- {}
tags:
- name: Replication
paths:
/replication/policies:
get:
summary: List replication policies
tags:
- Replication
operationId: listReplicationPolicies
parameters:
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/query'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- name: name
in: query
required: false
description: Deprecated, use "query" instead. The policy name.
schema:
type: string
responses:
'200':
description: Success
headers:
X-Total-Count:
description: The total count of the resources
schema:
type: integer
Link:
description: Link refers to the previous page and next page
schema:
type: string
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ReplicationPolicy'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'500':
$ref: '#/components/responses/500'
post:
summary: Create a replication policy
tags:
- Replication
operationId: createReplicationPolicy
parameters:
- $ref: '#/components/parameters/requestId'
responses:
'201':
$ref: '#/components/responses/201'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'409':
$ref: '#/components/responses/409'
'500':
$ref: '#/components/responses/500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ReplicationPolicy'
description: The replication policy
required: true
/replication/policies/{id}:
get:
summary: Get the specific replication policy
tags:
- Replication
operationId: getReplicationPolicy
parameters:
- $ref: '#/components/parameters/requestId'
- name: id
in: path
required: true
description: Policy ID
schema:
type: integer
format: int64
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ReplicationPolicy'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete the specific replication policy
tags:
- Replication
operationId: deleteReplicationPolicy
parameters:
- $ref: '#/components/parameters/requestId'
- name: id
in: path
required: true
description: Replication policy ID
schema:
type: integer
format: int64
responses:
'200':
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'412':
$ref: '#/components/responses/412'
'500':
$ref: '#/components/responses/500'
put:
summary: Update the replication policy
tags:
- Replication
operationId: updateReplicationPolicy
parameters:
- $ref: '#/components/parameters/requestId'
- name: id
in: path
required: true
description: The policy ID
schema:
type: integer
format: int64
responses:
'200':
$ref: '#/components/responses/200'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'409':
$ref: '#/components/responses/409'
'500':
$ref: '#/components/responses/500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ReplicationPolicy'
description: The replication policy
required: true
/replication/executions:
get:
summary: List replication executions
tags:
- Replication
operationId: listReplicationExecutions
parameters:
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- name: policy_id
in: query
required: false
description: The ID of the policy that the executions belong to.
schema:
type: integer
- name: status
in: query
required: false
description: The execution status.
schema:
type: string
- name: trigger
in: query
required: false
description: The trigger mode.
schema:
type: string
responses:
'200':
description: Success
headers:
X-Total-Count:
description: The total count of the resources
schema:
type: integer
Link:
description: Link refers to the previous page and next page
schema:
type: string
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ReplicationExecution'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'500':
$ref: '#/components/responses/500'
post:
summary: Start one replication execution
description: Start one replication execution according to the policy
tags:
- Replication
operationId: startReplication
parameters:
- $ref: '#/components/parameters/requestId'
responses:
'201':
$ref: '#/components/responses/201'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'500':
$ref: '#/components/responses/500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StartReplicationExecution'
description: The ID of policy that the execution belongs to
required: true
/replication/executions/{id}:
get:
summary: Get the specific replication execution
description: Get the replication execution specified by ID
tags:
- Replication
operationId: getReplicationExecution
parameters:
- $ref: '#/components/parameters/requestId'
- name: id
in: path
description: The ID of the execution.
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ReplicationExecution'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
put:
summary: Stop the specific replication execution
description: Stop the replication execution specified by ID
tags:
- Replication
operationId: stopReplication
parameters:
- $ref: '#/components/parameters/requestId'
- name: id
in: path
description: The ID of the execution.
required: true
schema:
type: integer
format: int64
responses:
'200':
$ref: '#/components/responses/200'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/replication/executions/{id}/tasks:
get:
summary: List replication tasks for a specific execution
tags:
- Replication
operationId: listReplicationTasks
parameters:
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/pageSize'
- name: id
in: path
description: The ID of the execution that the tasks belongs to.
required: true
schema:
type: integer
format: int64
- name: status
in: query
required: false
description: The task status.
schema:
type: string
- name: resource_type
in: query
required: false
description: The resource type.
schema:
type: string
responses:
'200':
description: Success
headers:
X-Total-Count:
description: The total count of the resources
schema:
type: integer
Link:
description: Link refers to the previous page and next page
schema:
type: string
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ReplicationTask'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'500':
$ref: '#/components/responses/500'
/replication/executions/{id}/tasks/{task_id}/log:
get:
summary: Get the log of the specific replication task
tags:
- Replication
operationId: getReplicationLog
parameters:
- $ref: '#/components/parameters/requestId'
- name: id
in: path
description: The ID of the execution that the tasks belongs to.
required: true
schema:
type: integer
format: int64
- name: task_id
in: path
description: The ID of the task.
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Success
headers:
Content-Type:
description: The content type of response body
schema:
type: string
content:
text/plain:
schema:
type: string
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
components:
responses:
'400':
description: Bad request. The request body or query parameters are invalid. Inspect the `errors` array in the response body for details.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'409':
description: Conflict. The resource already exists or the current state prevents the operation.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'401':
description: Unauthorized. Authentication is required to access this resource.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'500':
description: Internal server error. Inspect the `errors` array in the response body for details.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'200':
description: Success
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
'404':
description: Not found. The requested resource does not exist.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'412':
description: Precondition failed. A dependency or policy check failed; inspect the `errors` array for the constraint that was violated.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden. The caller does not have sufficient permission to perform the requested operation.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'201':
description: Created
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
Location:
description: The location of the resource
schema:
type: string
schemas:
Errors:
description: The error array that describe the errors got during the handling of request
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
ReplicationTrigger:
type: object
properties:
type:
type: string
description: The replication policy trigger type. The valid values are manual, event_based and scheduled.
trigger_settings:
$ref: '#/components/schemas/ReplicationTriggerSettings'
Error:
description: a model for all the error response coming from harbor
type: object
properties:
code:
type: string
description: The error code
message:
type: string
description: The error message
example:
code: NOT_FOUND
message: artifact library/hello-world:latest not found
ReplicationExecution:
type: object
description: The replication execution
properties:
id:
type: integer
description: The ID of the execution
policy_id:
type: integer
description: The ID if the policy that the execution belongs to
status:
type: string
description: The status of the execution
trigger:
type: string
description: The trigger mode
start_time:
type: string
format: date-time
description: The start time
end_time:
type: string
format: date-time
description: The end time
status_text:
type: string
x-omitempty: false
description: The status text
total:
type: integer
x-omitempty: false
description: The total count of all executions
failed:
type: integer
x-omitempty: false
description: The count of failed executions
succeed:
type: integer
x-omitempty: false
description: The count of succeed executions
in_progress:
type: integer
x-omitempty: false
description: The count of in_progress executions
stopped:
type: integer
x-omitempty: false
description: The count of stopped executions
RegistryCredential:
type: object
properties:
type:
type: string
description: Credential type, such as 'basic', 'oauth'.
access_key:
type: string
description: Access key, e.g. user name when credential type is 'basic'.
access_secret:
type: string
description: Access secret, e.g. password when credential type is 'basic'.
Registry:
type: object
properties:
id:
type: integer
format: int64
description: The registry ID.
x-omitempty: false
url:
type: string
description: The registry URL string.
name:
type: string
description: The registry name.
credential:
$ref: '#/components/schemas/RegistryCredential'
type:
type: string
description: Type of the registry, e.g. 'harbor'.
insecure:
type: boolean
description: Whether or not the certificate will be verified when Harbor tries to access the server.
ca_certificate:
type:
- string
- 'null'
description: The PEM-encoded CA certificate for this registry endpoint. If provided, this CA will be used to verify the registry's certificate instead of the system CA pool.
description:
type: string
description: Description of the registry.
status:
type: string
description: Health status of the registry.
creation_time:
type: string
format: date-time
description: The create time of the policy.
update_time:
type: string
format: date-time
description: The update time of the policy.
ReplicationPolicy:
type: object
properties:
id:
type: integer
format: int64
description: The policy ID.
name:
type: string
description: The policy name.
description:
type: string
description: The description of the policy.
src_registry:
description: The source registry.
$ref: '#/components/schemas/Registry'
dest_registry:
description: The destination registry.
$ref: '#/components/schemas/Registry'
dest_namespace:
type: string
description: The destination namespace.
dest_namespace_replace_count:
type: integer
format: int8
description: 'Specify how many path components will be replaced by the provided destination namespace.
The default value is -1 in which case the legacy mode will be applied.'
x-isnullable: true
trigger:
$ref: '#/components/schemas/ReplicationTrigger'
filters:
type: array
description: The replication policy filter array.
items:
$ref: '#/components/schemas/ReplicationFilter'
replicate_deletion:
type: boolean
description: Whether to replicate the deletion operation.
deletion:
type: boolean
description: Deprecated, use "replicate_deletion" instead. Whether to replicate the deletion operation.
override:
type: boolean
description: Whether to override the resources on the destination registry.
enabled:
type: boolean
description: Whether the policy is enabled or not.
creation_time:
type: string
format: date-time
description: The create time of the policy.
update_time:
type: string
format: date-time
description: The update time of the policy.
speed:
type: integer
format: int32
description: speed limit for each task
x-isnullable: true
copy_by_chunk:
type: boolean
description: Whether to enable copy by chunk.
x-isnullable: true
single_active_replication:
type: boolean
description: 'Whether to skip execution until the previous active execution finishes,
avoiding the execution of the same replication rules multiple times in parallel.'
x-isnullable: true
ReplicationTriggerSettings:
type: object
properties:
cron:
type: string
description: The cron string for scheduled trigger
ReplicationFilter:
type: object
properties:
type:
type: string
description: The replication policy filter type.
value:
description: The value of replication policy filter. For name, tag, and resource filters, this should be a string. For label filters, this should be an array of strings.
decoration:
type: string
description: matches or excludes the result
ReplicationTask:
type: object
description: The replication task
properties:
id:
type: integer
description: The ID of the task
execution_id:
type: integer
description: The ID of the execution that the task belongs to
status:
type: string
description: The status of the task
job_id:
type: string
description: The ID of the underlying job that the task related to
operation:
type: string
description: The operation of the task
resource_type:
type: string
description: The type of the resource that the task operates
src_resource:
type: string
description: The source resource that the task operates
dst_resource:
type: string
description: The destination resource that the task operates
start_time:
type: string
format: date-time
description: The start time of the task
end_time:
type: string
format: date-time
description: The end time of the task
StartReplicationExecution:
type: object
properties:
policy_id:
type: integer
format: int64
description: The ID of policy that the execution belongs to.
parameters:
query:
name: q
description: Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3=[min~max]
in: query
required: false
schema:
type: string
requestId:
name: X-Request-Id
description: An unique ID for the request
in: header
required: false
schema:
type: string
minLength: 1
pageSize:
name: page_size
in: query
required: false
description: The size of per page
schema:
type: integer
format: int64
default: 10
maximum: 100
sort:
name: sort
description: Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending order and field2 in descending order with "sort=field1,-field2"
in: query
required: false
schema:
type: string
page:
name: page
in: query
required: false
description: The page number
schema:
type: integer
format: int64
default: 1
securitySchemes:
basic:
type: http
scheme: basic