harbor_client.ProjectMetadataApi

All URIs are relative to http://localhost/api/v2.0

MethodHTTP requestDescription
add_project_metadatasPOST /projects/{project_name_or_id}/metadatas/Add metadata for the specific project
delete_project_metadataDELETE /projects/{project_name_or_id}/metadatas/{meta_name}Delete the specific metadata for the specific project
get_project_metadataGET /projects/{project_name_or_id}/metadatas/{meta_name}Get the specific metadata of the specific project
list_project_metadatasGET /projects/{project_name_or_id}/metadatas/Get the metadata of the specific project
update_project_metadataPUT /projects/{project_name_or_id}/metadatas/{meta_name}Update the specific metadata for the specific project

add_project_metadatas

Signature

add_project_metadatas(project_name_or_id: str, x_request_id: Optional[str], x_is_resource_name: Optional[bool], metadata: Optional[object])-> None

Add metadata for the specific project

Add metadata for the specific project

Example

from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ProjectMetadataApi(harbor_client.ApiClient(configuration))
project_name_or_id = 'project_name_or_id_example' # str | The name or id of the project
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
x_is_resource_name = false # 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. (optional) (default to false)
metadata = NULL # object |  (optional)

try:
    # Add metadata for the specific project
    api_instance.add_project_metadatas(project_name_or_id, x_request_id=x_request_id, x_is_resource_name=x_is_resource_name, metadata=metadata)
except ApiException as e:
    print("Exception when calling ProjectMetadataApi->add_project_metadatas: %s\n" % e)

Parameters

NameTypeDescriptionNotes
project_name_or_idstrThe name or id of the project
x_request_idstrAn unique ID for the request[optional]
x_is_resource_nameboolThe 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.[optional] [default to false]
metadataobject[optional]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top]

delete_project_metadata

Signature

delete_project_metadata(project_name_or_id: str, meta_name: str, x_request_id: Optional[str], x_is_resource_name: Optional[bool])-> None

Delete the specific metadata for the specific project

Delete the specific metadata for the specific project

Example

from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ProjectMetadataApi(harbor_client.ApiClient(configuration))
project_name_or_id = 'project_name_or_id_example' # str | The name or id of the project
meta_name = 'meta_name_example' # str | The name of metadata.
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
x_is_resource_name = false # 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. (optional) (default to false)

try:
    # Delete the specific metadata for the specific project
    api_instance.delete_project_metadata(project_name_or_id, meta_name, x_request_id=x_request_id, x_is_resource_name=x_is_resource_name)
except ApiException as e:
    print("Exception when calling ProjectMetadataApi->delete_project_metadata: %s\n" % e)

Parameters

NameTypeDescriptionNotes
project_name_or_idstrThe name or id of the project
meta_namestrThe name of metadata.
x_request_idstrAn unique ID for the request[optional]
x_is_resource_nameboolThe 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.[optional] [default to false]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top]

get_project_metadata

Signature

get_project_metadata(project_name_or_id: str, meta_name: str, x_request_id: Optional[str], x_is_resource_name: Optional[bool])-> dict(str, str)

Get the specific metadata of the specific project

Get the specific metadata of the specific project

Example

from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ProjectMetadataApi(harbor_client.ApiClient(configuration))
project_name_or_id = 'project_name_or_id_example' # str | The name or id of the project
meta_name = 'meta_name_example' # str | The name of metadata.
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
x_is_resource_name = false # 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. (optional) (default to false)

try:
    # Get the specific metadata of the specific project
    api_response = api_instance.get_project_metadata(project_name_or_id, meta_name, x_request_id=x_request_id, x_is_resource_name=x_is_resource_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectMetadataApi->get_project_metadata: %s\n" % e)

Parameters

NameTypeDescriptionNotes
project_name_or_idstrThe name or id of the project
meta_namestrThe name of metadata.
x_request_idstrAn unique ID for the request[optional]
x_is_resource_nameboolThe 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.[optional] [default to false]

Return type

dict(str, str)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top]

list_project_metadatas

Signature

list_project_metadatas(project_name_or_id: str, x_request_id: Optional[str], x_is_resource_name: Optional[bool])-> dict(str, str)

Get the metadata of the specific project

Get the metadata of the specific project

Example

from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ProjectMetadataApi(harbor_client.ApiClient(configuration))
project_name_or_id = 'project_name_or_id_example' # str | The name or id of the project
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
x_is_resource_name = false # 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. (optional) (default to false)

try:
    # Get the metadata of the specific project
    api_response = api_instance.list_project_metadatas(project_name_or_id, x_request_id=x_request_id, x_is_resource_name=x_is_resource_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectMetadataApi->list_project_metadatas: %s\n" % e)

Parameters

NameTypeDescriptionNotes
project_name_or_idstrThe name or id of the project
x_request_idstrAn unique ID for the request[optional]
x_is_resource_nameboolThe 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.[optional] [default to false]

Return type

dict(str, str)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top]

update_project_metadata

Signature

update_project_metadata(project_name_or_id: str, meta_name: str, x_request_id: Optional[str], x_is_resource_name: Optional[bool], metadata: Optional[object])-> None

Update the specific metadata for the specific project

Update the specific metadata for the specific project

Example

from __future__ import print_function
import time
import harbor_client
from harbor_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basic
configuration = harbor_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = harbor_client.ProjectMetadataApi(harbor_client.ApiClient(configuration))
project_name_or_id = 'project_name_or_id_example' # str | The name or id of the project
meta_name = 'meta_name_example' # str | The name of metadata.
x_request_id = 'x_request_id_example' # str | An unique ID for the request (optional)
x_is_resource_name = false # 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. (optional) (default to false)
metadata = NULL # object |  (optional)

try:
    # Update the specific metadata for the specific project
    api_instance.update_project_metadata(project_name_or_id, meta_name, x_request_id=x_request_id, x_is_resource_name=x_is_resource_name, metadata=metadata)
except ApiException as e:
    print("Exception when calling ProjectMetadataApi->update_project_metadata: %s\n" % e)

Parameters

NameTypeDescriptionNotes
project_name_or_idstrThe name or id of the project
meta_namestrThe name of metadata.
x_request_idstrAn unique ID for the request[optional]
x_is_resource_nameboolThe 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.[optional] [default to false]
metadataobject[optional]

Return type

void (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top]