# \ProjectApi
All URIs are relative to *http://localhost/api/v2.0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_project**](ProjectApi.md#create_project) | **POST** /projects | Create a new project.
[**delete_project**](ProjectApi.md#delete_project) | **DELETE** /projects/{project_name_or_id} | Delete project by projectID
[**get_logs**](ProjectApi.md#get_logs) | **GET** /projects/{project_name}/logs | Get recent logs of the projects
[**get_project**](ProjectApi.md#get_project) | **GET** /projects/{project_name_or_id} | Return specific project detail information
[**get_project_deletable**](ProjectApi.md#get_project_deletable) | **GET** /projects/{project_name_or_id}/_deletable | Get the deletable status of the project
[**get_project_summary**](ProjectApi.md#get_project_summary) | **GET** /projects/{project_name_or_id}/summary | Get summary of the project.
[**get_scanner_of_project**](ProjectApi.md#get_scanner_of_project) | **GET** /projects/{project_name_or_id}/scanner | Get project level scanner
[**head_project**](ProjectApi.md#head_project) | **HEAD** /projects | Check if the project name user provided already exists.
[**list_artifacts_of_project**](ProjectApi.md#list_artifacts_of_project) | **GET** /projects/{project_name_or_id}/artifacts | List artifacts
[**list_projects**](ProjectApi.md#list_projects) | **GET** /projects | List projects
[**list_scanner_candidates_of_project**](ProjectApi.md#list_scanner_candidates_of_project) | **GET** /projects/{project_name_or_id}/scanner/candidates | Get scanner registration candidates for configurating project level scanner
[**set_scanner_of_project**](ProjectApi.md#set_scanner_of_project) | **PUT** /projects/{project_name_or_id}/scanner | Configure scanner for the specified project
[**update_project**](ProjectApi.md#update_project) | **PUT** /projects/{project_name_or_id} | Update properties for a selected project.
## create_project
> create_project(project, x_request_id, x_resource_name_in_location)
Create a new project.
This endpoint is for user to create a new project.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project** | [**ProjectReq**](ProjectReq.md) | New created project. | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_resource_name_in_location** | Option<**bool**> | The flag to indicate whether to return the name of the resource in Location. When X-Resource-Name-In-Location is true, the Location will return the name of the resource. | |[default to false]
### Return type
(empty response body)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## delete_project
> delete_project(project_name_or_id, x_request_id, x_is_resource_name)
Delete project by projectID
This endpoint is aimed to delete project by project ID.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
(empty response body)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_logs
> Vec<models::AuditLog> get_logs(project_name, x_request_id, q, sort, page, page_size)
Get recent logs of the projects
Get recent logs of the projects
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name** | **String** | The name of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**q** | Option<**String**> | 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] | |
**sort** | Option<**String**> | 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\" | |
**page** | Option<**i64**> | The page number | |[default to 1]
**page_size** | Option<**i64**> | The size of per page | |[default to 10]
### Return type
[**Vec<models::AuditLog>**](AuditLog.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_project
> models::Project get_project(project_name_or_id, x_request_id, x_is_resource_name)
Return specific project detail information
This endpoint returns specific project information by project ID.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
[**models::Project**](Project.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_project_deletable
> models::ProjectDeletable get_project_deletable(project_name_or_id, x_request_id, x_is_resource_name)
Get the deletable status of the project
Get the deletable status of the project
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
[**models::ProjectDeletable**](ProjectDeletable.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_project_summary
> models::ProjectSummary get_project_summary(project_name_or_id, x_request_id, x_is_resource_name)
Get summary of the project.
Get summary of the project.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
[**models::ProjectSummary**](ProjectSummary.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_scanner_of_project
> models::ScannerRegistration get_scanner_of_project(project_name_or_id, x_request_id, x_is_resource_name)
Get project level scanner
Get the scanner registration of the specified project. If no scanner registration is configured for the specified project, the system default scanner registration will be returned.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
[**models::ScannerRegistration**](ScannerRegistration.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## head_project
> head_project(project_name, x_request_id)
Check if the project name user provided already exists.
This endpoint is used to check if the project name provided already exist.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name** | **String** | Project name for checking exists. | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
### Return type
(empty response body)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_artifacts_of_project
> Vec<models::Artifact> list_artifacts_of_project(project_name_or_id, x_request_id, x_is_resource_name, q, sort, page, page_size, x_accept_vulnerabilities, with_tag, with_label, with_scan_overview, with_sbom_overview, with_immutable_status, with_accessory, latest_in_repository)
List artifacts
List artifacts of the specified project
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
**q** | Option<**String**> | 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] | |
**sort** | Option<**String**> | 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\" | |
**page** | Option<**i64**> | The page number | |[default to 1]
**page_size** | Option<**i64**> | The size of per page | |[default to 10]
**x_accept_vulnerabilities** | Option<**String**> | A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1' | |[default to application/vnd.security.vulnerability.report; version=1.1, application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0]
**with_tag** | Option<**bool**> | Specify whether the tags are included inside the returning artifacts | |[default to true]
**with_label** | Option<**bool**> | Specify whether the labels are included inside the returning artifacts | |[default to false]
**with_scan_overview** | Option<**bool**> | Specify whether the scan overview is included inside the returning artifacts | |[default to false]
**with_sbom_overview** | Option<**bool**> | Specify whether the SBOM overview is included in returning artifacts, when this option is true, the SBOM overview will be included in the response | |[default to false]
**with_immutable_status** | Option<**bool**> | Specify whether the immutable status is included inside the tags of the returning artifacts. Only works when setting \"with_immutable_status=true\" | |[default to false]
**with_accessory** | Option<**bool**> | Specify whether the accessories are included of the returning artifacts. Only works when setting \"with_accessory=true\" | |[default to false]
**latest_in_repository** | Option<**bool**> | Specify whether only the latest pushed artifact of each repository is included inside the returning artifacts. Only works when either artifact_type or media_type is included in the query. | |[default to false]
### Return type
[**Vec<models::Artifact>**](Artifact.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_projects
> Vec<models::Project> list_projects(x_request_id, q, page, page_size, sort, name, public, owner, with_detail)
List projects
This endpoint returns projects created by Harbor.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**x_request_id** | Option<**String**> | An unique ID for the request | |
**q** | Option<**String**> | 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] | |
**page** | Option<**i64**> | The page number | |[default to 1]
**page_size** | Option<**i64**> | The size of per page | |[default to 10]
**sort** | Option<**String**> | 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\" | |
**name** | Option<**String**> | The name of project. | |
**public** | Option<**bool**> | The project is public or private. | |
**owner** | Option<**String**> | The name of project owner. | |
**with_detail** | Option<**bool**> | Bool value indicating whether return detailed information of the project | |[default to true]
### Return type
[**Vec<models::Project>**](Project.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_scanner_candidates_of_project
> Vec<models::ScannerRegistration> list_scanner_candidates_of_project(project_name_or_id, x_request_id, x_is_resource_name, q, sort, page, page_size)
Get scanner registration candidates for configurating project level scanner
Retrieve the system configured scanner registrations as candidates of setting project level scanner.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
**q** | Option<**String**> | 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] | |
**sort** | Option<**String**> | 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\" | |
**page** | Option<**i64**> | The page number | |[default to 1]
**page_size** | Option<**i64**> | The size of per page | |[default to 10]
### Return type
[**Vec<models::ScannerRegistration>**](ScannerRegistration.md)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## set_scanner_of_project
> set_scanner_of_project(project_name_or_id, payload, x_request_id, x_is_resource_name)
Configure scanner for the specified project
Set one of the system configured scanner registration as the indepndent scanner of the specified project.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**payload** | [**ProjectScanner**](ProjectScanner.md) | | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
(empty response body)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_project
> update_project(project_name_or_id, project, x_request_id, x_is_resource_name)
Update properties for a selected project.
This endpoint is aimed to update the properties of a project.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_name_or_id** | **String** | The name or id of the project | [required] |
**project** | [**ProjectReq**](ProjectReq.md) | Updates of project. | [required] |
**x_request_id** | Option<**String**> | An unique ID for the request | |
**x_is_resource_name** | Option<**bool**> | The flag to indicate whether the parameter which supports both name and id in the path is the name of the resource. When the X-Is-Resource-Name is false and the parameter can be converted to an integer, the parameter will be as an id, otherwise, it will be as a name. | |[default to false]
### Return type
(empty response body)
### Authorization
[basic](../README.md#basic)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)