summary:Return role members accompany with relevant project and user.
description:|
This endpoint is for user to get role members accompany with relevant project and user.
parameters:
- name:project_id
in:path
type:integer
format:int32
required:true
description:Relevant project ID
- name:user_id
in:path
type:integer
format:int32
required:true
description:Relevant user ID
tags:
- Products
responses:
200:
description:Get project role members successfully.
schema:
type:array
items:
$ref:'#/definitions/Role'
400:
description:Illegal format of provided ID value.
401:
description:User need to log in first.
403:
description:User in session does not have permission to the project.
404:
description:Project ID does not exist.
500:
description:Unexpected internal errors.
put:
summary:Update project role members accompany with relevant project and user.
description:|
This endpoint is for user to update current project role members accompany with relevant project and user.
parameters:
- name:project_id
in:path
type:integer
format:int32
required:true
description:Relevant project ID.
- name:user_id
in:path
type:integer
format:int32
required:true
description:Relevant user ID.
- name:roles
in:body
schema:
$ref:'#/definitions/RoleParam'
description:Updates for roles and username.
tags:
- Products
responses:
200:
description:Project role members updated successfully.
400:
description:Illegal format of provided ID value.
401:
description:User need to log in first.
403:
description:User in session does not have permission to the project.
404:
description:Project ID does not exist.
500:
description:Unexpected internal errors.
delete:
summary:Delete project role members accompany with relevant project and user.
description:|
This endpoint is aimed to remove project role members already added to the relevant project and user.
parameters:
- name:project_id
in:path
type:integer
format:int32
required:true
description:Relevant project ID.
- name:user_id
in:path
type:integer
format:int32
required:true
description:Relevant user ID.
tags:
- Products
responses:
200:
description:Project role members deleted successfully.
400:
description:Illegal format of provided ID value.
401:
description:User need to log in first.
403:
description:User in session does not have permission to the project.
404:
description:Project ID does not exist.
500:
description:Unexpected internal errors.
/users:
get:
summary:Get registered users of Harbor.
description:|
This endpoint is for user to search registered users, support for filtering results with username.Notice, by now this operation is only for administrator.
parameters:
- name:user_name
in:query
type:string
format:string
required:false
description:Username for filtering results.
tags:
- Products
responses:
200:
description:Searched for users of Harbor successfully.
schema:
type:array
items:
$ref:'#/definitions/User'
400:
description:Invalid user ID.
401:
description:User need to log in first.
403:
description:User does not have permission of admin role.
500:
description:Unexpected internal errors.
/users/{user_id}:
put:
summary:Update a registered user to change to be an administrator of Harbor.
description:|
This endpoint let a registered user change to be an administrator
of Harbor.
parameters:
- name:user_id
in:path
type:integer
format:int32
required:true
description:Registered user ID
tags:
- Products
responses:
200:
description:Updated user's admin role successfully.
400:
description:Invalid user ID.
401:
description:User need to log in first.
403:
description:User does not have permission of admin role.
404:
description:User ID does not exist.
500:
description:Unexpected internal errors.
delete:
summary:Mark a registered user as be removed.
description:|
This endpoint let administrator of Harbor mark a registered user as
be removed.It actually won't be deleted from DB.
parameters:
- name:user_id
in:path
type:integer
format:int32
required:true
description:User ID for marking as to be removed.
tags:
- Products
responses:
200:
description:Marked user as be removed successfully.
400:
description:Invalid user ID.
401:
description:User need to log in first.
403:
description:User does not have permission of admin role.
404:
description:User ID does not exist.
500:
description:Unexpected internal errors.
/repositories:
get:
summary:Get repositories accompany with relevant project and repo name.
description:|
This endpoint let user search repositories accompanying with relevant project ID and repo name.
parameters:
- name:project_id
in:query
type:integer
format:int32
required:true
description:Relevant project ID.
- name:q
in:query
type:string
format:string
required:false
description:Repo name for filtering results.
tags:
- Products
responses:
200:
description:Searched for respositories successfully.
schema:
type:array
items:
$ref:'#/definitions/Repository'
400:
description:Invalid project ID.
403:
description:Project is not public or current user is irrelevant to the repository.
404:
description:Project ID does not exist.
500:
description:Unexpected internal errors.
/repositories/tags:
get:
summary:Get tags of a relevant repository.
description:|
This endpoint aims to retrieve tags from a relevant repository.
parameters:
- name:repo_name
in:query
type:string
required:true
description:Relevant repository name.
tags:
- Products
responses:
200:
description:Retrieved tags from a relevant repository successfully.
500:
description:Unexpected internal errors.
/repositories/manifest:
get:
summary:Get manifests of a relevant repository.
description:|
This endpoint aims to retreive manifests from a relevant repository.
parameters:
- name:repo_name
in:query
type:string
required:true
description:Repository name
- name:tag
in:query
type:string
required:true
description:Tag name
tags:
- Products
responses:
200:
description:Retrieved manifests from a relevant repository successfully.
500:
description:Unexpected internal errors.
definitions:
Search:
type:object
properties:
projects:
description:Search results of the projects that matched the filter keywords.
type:array
items:
$ref:'#/definitions/Project'
repositories:
description:Search results of the repositories that matched the filter keywords.
type:array
items:
$ref:'#/definitions/Repository'
Project:
type:object
properties:
project_id:
type:integer
format:int32
description:Project ID
owner_id:
type:integer
format:int32
description:The owner ID of the project always means the creator of the project.
project_name:
type:string
description:The name of the project.
creation_time:
type:string
description:The creation time of the project.
deleted:
type:integer
format:int32
description:A deletion mark of the project.
user_id:
type:integer
format:int32
description:A relation field to the user table.
owner_name:
type:string
description:The owner name of tthe project always means the creator of the project.
public:
type:boolean
format:boolean
description:The public status of the project.
togglable:
type:boolean
description:Correspond to the UI about showing the public status of the project.
Repository:
type:object
properties:
id:
type:string
description:Repository ID
parent:
type:string
description:Parent of the image.
created:
type:string
format:date-time
description:Repository create time.
duration_days:
type:string
description:Duration days of the image.
author:
type:string
description:Author of the image.
architecture:
type:string
description:Architecture of the image.
docker_version:
type:string
description:Docker version of the image.
os:
type:string
description:OS of the image.
User:
type:object
properties:
user_id:
type:integer
format:int32
username:
type:string
email:
type:string
password:
type:string
realname:
type:string
comment:
type:string
deleted:
type:integer
format:int32
AccessLog:
type:object
properties:
username:
type:string
description:Relevant user's name that accessed this project.
keywords:
type:string
description:Operation name specified when project created.
beginTimestamp:
type:integer
format:int32
description:Begin timestamp for querying access logs.
endTimestamp:
type:integer
format:int32
description:End timestamp for querying accessl logs.
Role:
type:object
properties:
role_id:
type:integer
format:int32
description:ID in table.
role_code:
type:string
description:Description of permissions for the role.
role_name:
type:string
description:Name the the role.
RoleParam:
type:object
properties:
roles:
type:array
items:
type:integer
format:int32
description:Role ID for updating project role member.
user_name:
type:string
description:Username relevant to a project role member.