mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 09:38:09 +01:00
commit
cfa56fee61
@ -4,7 +4,7 @@ swagger: '2.0'
|
|||||||
info:
|
info:
|
||||||
title: Harbor API
|
title: Harbor API
|
||||||
description: These APIs provide services for manipulating Harbor project.
|
description: These APIs provide services for manipulating Harbor project.
|
||||||
version: "0.1.0"
|
version: "0.1.1"
|
||||||
# the domain of the service
|
# the domain of the service
|
||||||
host: localhost
|
host: localhost
|
||||||
# array of all schemes that your API supports
|
# array of all schemes that your API supports
|
||||||
@ -167,7 +167,7 @@ paths:
|
|||||||
- name: access_log
|
- name: access_log
|
||||||
in: body
|
in: body
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/AccessLog'
|
$ref: '#/definitions/AccessLogFilter'
|
||||||
description: Search results of access logs.
|
description: Search results of access logs.
|
||||||
tags:
|
tags:
|
||||||
- Products
|
- Products
|
||||||
@ -204,7 +204,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Role'
|
$ref: '#/definitions/User'
|
||||||
400:
|
400:
|
||||||
description: Illegal format of provided ID value.
|
description: Illegal format of provided ID value.
|
||||||
401:
|
401:
|
||||||
@ -517,7 +517,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Repository'
|
type: string
|
||||||
400:
|
400:
|
||||||
description: Invalid project ID.
|
description: Invalid project ID.
|
||||||
403:
|
403:
|
||||||
@ -605,12 +605,41 @@ definitions:
|
|||||||
description: Search results of the projects that matched the filter keywords.
|
description: Search results of the projects that matched the filter keywords.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Project'
|
$ref: '#/definitions/SearchProject'
|
||||||
repositories:
|
repositories:
|
||||||
description: Search results of the repositories that matched the filter keywords.
|
description: Search results of the repositories that matched the filter keywords.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Repository'
|
$ref: '#/definitions/SearchRepository'
|
||||||
|
SearchProject:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
description: The ID of project
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the project
|
||||||
|
public:
|
||||||
|
type: integer
|
||||||
|
format: int
|
||||||
|
description: The flag to indicate the publicity of the project (1 is public, 0 is non-public)
|
||||||
|
SearchRepository:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
repository_name:
|
||||||
|
type: string
|
||||||
|
description: The name of the repository
|
||||||
|
project_name:
|
||||||
|
type: string
|
||||||
|
description: The name of the project that the repository belongs to
|
||||||
|
project_id:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the project that the repository belongs to
|
||||||
|
project_public:
|
||||||
|
type: integer
|
||||||
|
description: The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)
|
||||||
Project:
|
Project:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -622,30 +651,39 @@ definitions:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: The owner ID of the project always means the creator of the project.
|
description: The owner ID of the project always means the creator of the project.
|
||||||
project_name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: The name of the project.
|
description: The name of the project.
|
||||||
creation_time:
|
creation_time:
|
||||||
type: string
|
type: string
|
||||||
description: The creation time of the project.
|
description: The creation time of the project.
|
||||||
|
update_time:
|
||||||
|
type: string
|
||||||
|
description: The update time of the project.
|
||||||
deleted:
|
deleted:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: A deletion mark of the project.
|
description: A deletion mark of the project (1 means it's deleted, 0 is not)
|
||||||
user_id:
|
user_id:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: A relation field to the user table.
|
description: A relation field to the user table.
|
||||||
owner_name:
|
owner_name:
|
||||||
type: string
|
type: string
|
||||||
description: The owner name of tthe project always means the creator of the project.
|
description: The owner name of the project.
|
||||||
public:
|
public:
|
||||||
type: boolean
|
type: boolean
|
||||||
format: boolean
|
format: boolean
|
||||||
description: The public status of the project.
|
description: The public status of the project.
|
||||||
togglable:
|
togglable:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Correspond to the UI about showing the public status of the project.
|
description: Correspond to the UI about whether the project's publicity is updatable (for UI)
|
||||||
|
current_user_role_id:
|
||||||
|
type: integer
|
||||||
|
description: The role ID of the current user who triggered the API (for UI)
|
||||||
|
repo_count:
|
||||||
|
type: integer
|
||||||
|
description: The number of the repositories under this project.
|
||||||
Repository:
|
Repository:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -680,6 +718,7 @@ definitions:
|
|||||||
user_id:
|
user_id:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
description: The ID of the user.
|
||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
email:
|
email:
|
||||||
@ -702,7 +741,7 @@ definitions:
|
|||||||
new_password:
|
new_password:
|
||||||
type: string
|
type: string
|
||||||
description: New password for marking as to be updated.
|
description: New password for marking as to be updated.
|
||||||
AccessLog:
|
AccessLogFilter:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
username:
|
username:
|
||||||
@ -711,14 +750,32 @@ definitions:
|
|||||||
keywords:
|
keywords:
|
||||||
type: string
|
type: string
|
||||||
description: Operation name specified when project created.
|
description: Operation name specified when project created.
|
||||||
beginTimestamp:
|
begin_timestamp:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int64
|
||||||
description: Begin timestamp for querying access logs.
|
description: Begin timestamp for querying access logs.
|
||||||
endTimestamp:
|
end_timestamp:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int64
|
||||||
description: End timestamp for querying accessl logs.
|
description: End timestamp for querying accessl logs.
|
||||||
|
AccessLog:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
log_id:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the log entry.
|
||||||
|
repo_name:
|
||||||
|
type: string
|
||||||
|
description: Name of the repository in this log entry.
|
||||||
|
repo_tag:
|
||||||
|
type: string
|
||||||
|
description: Tag of the repository in this log entry.
|
||||||
|
operation:
|
||||||
|
type: string
|
||||||
|
description: The operation against the repository in this log entry.
|
||||||
|
op_time:
|
||||||
|
type: time
|
||||||
|
description: The time when this operation is triggered.
|
||||||
Role:
|
Role:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -741,6 +798,6 @@ definitions:
|
|||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: Role ID for updating project role member.
|
description: Role ID for updating project role member.
|
||||||
user_name:
|
username:
|
||||||
type: string
|
type: string
|
||||||
description: Username relevant to a project role member.
|
description: Username relevant to a project role member.
|
||||||
|
Loading…
Reference in New Issue
Block a user