Skip to content

Latest commit

 

History

History
212 lines (136 loc) · 9.27 KB

MemberApi.md

File metadata and controls

212 lines (136 loc) · 9.27 KB

\MemberApi

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

Method HTTP request Description
CreateProjectMember Post /projects/{project_name_or_id}/members Create project member
DeleteProjectMember Delete /projects/{project_name_or_id}/members/{mid} Delete project member
GetProjectMember Get /projects/{project_name_or_id}/members/{mid} Get the project member information
ListProjectMembers Get /projects/{project_name_or_id}/members Get all project member information
UpdateProjectMember Put /projects/{project_name_or_id}/members/{mid} Update project member

CreateProjectMember

CreateProjectMember(ctx, projectNameOrId, optional) Create project member

Create project member relationship, the member can be one of the user_member and group_member, The user_member need to specify user_id or username. If the user already exist in harbor DB, specify the user_id, If does not exist in harbor DB, it will SearchAndOnBoard the user. The group_member need to specify id or ldap_group_dn. If the group already exist in harbor DB. specify the user group's id, If does not exist, it will SearchAndOnBoard the group.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectNameOrId string The name or id of the project
optional *MemberApiCreateProjectMemberOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a MemberApiCreateProjectMemberOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.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] projectMember | optional.Interface of ProjectMember| |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteProjectMember

DeleteProjectMember(ctx, projectNameOrId, mid, optional) Delete project member

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectNameOrId string The name or id of the project
mid int64 Member ID.
optional *MemberApiDeleteProjectMemberOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a MemberApiDeleteProjectMemberOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.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

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetProjectMember

ProjectMemberEntity GetProjectMember(ctx, projectNameOrId, mid, optional) Get the project member information

Get the project member information

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectNameOrId string The name or id of the project
mid int64 The member ID
optional *MemberApiGetProjectMemberOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a MemberApiGetProjectMemberOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.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

ProjectMemberEntity

Authorization

basic

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListProjectMembers

[]ProjectMemberEntity ListProjectMembers(ctx, projectNameOrId, optional) Get all project member information

Get all project member information

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectNameOrId string The name or id of the project
optional *MemberApiListProjectMembersOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a MemberApiListProjectMembersOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.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] page | optional.Int64| The page number | [default to 1] pageSize | optional.Int64| The size of per page | [default to 10] entityname | optional.String| The entity name to search. |

Return type

[]ProjectMemberEntity

Authorization

basic

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateProjectMember

UpdateProjectMember(ctx, projectNameOrId, mid, optional) Update project member

Update project member relationship

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectNameOrId string The name or id of the project
mid int64 Member ID.
optional *MemberApiUpdateProjectMemberOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a MemberApiUpdateProjectMemberOpts struct

Name Type Description Notes

xRequestId | optional.String| An unique ID for the request | xIsResourceName | optional.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] role | optional.Interface of RoleRequest| |

Return type

(empty response body)

Authorization

basic

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]