diff --git a/api-tests/server/auth_test.go b/api-tests/server/auth_test.go index 60f1ea906a..581455f079 100644 --- a/api-tests/server/auth_test.go +++ b/api-tests/server/auth_test.go @@ -299,11 +299,11 @@ func TestBasicAuthPermissions(t *testing.T) { {userType: "editor", login: editor, apiKey: editorAPIKey, statusCode: 401}, {userType: "admin", login: admin, apiKey: adminAPIKey, statusCode: 200}, }}, - {name: "platform-connect", url: "/v1/platform/Connect", method: "POST", userCase: []userCase{ + {name: "platform-connect", url: "/v1/platform:connect", method: "POST", userCase: []userCase{ {userType: "default", login: none, statusCode: 401}, {userType: "viewer", login: viewer, apiKey: viewerAPIKey, statusCode: 401}, {userType: "editor", login: editor, apiKey: editorAPIKey, statusCode: 401}, - {userType: "admin", login: admin, apiKey: adminAPIKey, statusCode: 400}, // We send bad request, but have access to endpoint + {userType: "admin", login: admin, apiKey: adminAPIKey, statusCode: 400}, // We send a bad request, but have access to endpoint }}, } diff --git a/api/MIGRATION_TO_V3.md b/api/MIGRATION_TO_V3.md index 605b851750..a2a94847c3 100644 --- a/api/MIGRATION_TO_V3.md +++ b/api/MIGRATION_TO_V3.md @@ -148,7 +148,7 @@ POST /v1/role/SetDefault POST /v1/accesscontrol/roles POST /v1/role/Update PUT /v1/accesscontrol/roles/{role_id} ✅ **QANService** **QANService** -POST /v1/qan/Filters/Get POST /v1/qan/metrics:getFilters accepts a bunch of params, incl. an array +POST /v1/qan/Filters/Get POST /v1/qan/metrics:getFilters POST /v1/qan/GetMetricsNames POST /v1/qan/metrics:getNames Note: it accepts no params, but hard to make it a GET POST /v1/qan/GetReport POST /v1/qan/metrics:getReport POST /v1/qan/ObjectDetails/ExplainFingerprintByQueryId POST /v1/qan:explainFingerprint @@ -161,13 +161,13 @@ POST /v1/qan/ObjectDetails/QueryExists GET /v1/qan/query/{query_id} POST /v1/qan/ObjectDetails/SchemaByQueryId POST /v1/qan/query:getSchema **PlatformService** **PlatformService** -POST /v1/platform/Connect POST /v1/platform:connect -POST /v1/platform/Disconnect POST /v1/platform:disconnect -POST /v1/platform/GetContactInformation GET /v1/platform/contact -POST /v1/platform/SearchOganizationEntitlemenets GET /v1/platform/organization/entitlements -POST /v1/platform/SearchOganizationTickets GET /v1/platform/organization/tickets -POST /v1/platform/ServerInfo GET /v1/platform/server -POST /v1/platform/UserInfo GET /v1/platform/user +POST /v1/platform/Connect POST /v1/platform:connect ✅ +POST /v1/platform/Disconnect POST /v1/platform:disconnect ✅ +POST /v1/platform/GetContactInformation GET /v1/platform/contact ✅ +POST /v1/platform/SearchOganizationEntitlemenets GET /v1/platform/organization/entitlements ✅ +POST /v1/platform/SearchOganizationTickets GET /v1/platform/organization/tickets ✅ +POST /v1/platform/ServerInfo GET /v1/platform/server ✅ +POST /v1/platform/UserInfo GET /v1/platform/user ✅ // TODO: rename `period_start_from` to `start_from` and `period_start_to` to `start_to` // TODO: refactor the primitive types in alerting.proto diff --git a/api/platform/v1/json/client/platform_service/connect_responses.go b/api/platform/v1/json/client/platform_service/connect_responses.go index 47ed457c86..a0a4c5e5f4 100644 --- a/api/platform/v1/json/client/platform_service/connect_responses.go +++ b/api/platform/v1/json/client/platform_service/connect_responses.go @@ -58,7 +58,7 @@ type ConnectOK struct { } func (o *ConnectOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/Connect][%d] connectOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/platform:connect][%d] connectOk %+v", 200, o.Payload) } func (o *ConnectOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *ConnectDefault) Code() int { } func (o *ConnectDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/Connect][%d] Connect default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/platform:connect][%d] Connect default %+v", o._statusCode, o.Payload) } func (o *ConnectDefault) GetPayload() *ConnectDefaultBody { diff --git a/api/platform/v1/json/client/platform_service/disconnect_responses.go b/api/platform/v1/json/client/platform_service/disconnect_responses.go index ef8afcb07e..6ec1e882c2 100644 --- a/api/platform/v1/json/client/platform_service/disconnect_responses.go +++ b/api/platform/v1/json/client/platform_service/disconnect_responses.go @@ -58,7 +58,7 @@ type DisconnectOK struct { } func (o *DisconnectOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/Disconnect][%d] disconnectOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/platform:disconnect][%d] disconnectOk %+v", 200, o.Payload) } func (o *DisconnectOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *DisconnectDefault) Code() int { } func (o *DisconnectDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/Disconnect][%d] Disconnect default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/platform:disconnect][%d] Disconnect default %+v", o._statusCode, o.Payload) } func (o *DisconnectDefault) GetPayload() *DisconnectDefaultBody { diff --git a/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go b/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go index 60e1e4806b..5f1da0f329 100644 --- a/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go +++ b/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go @@ -60,9 +60,6 @@ GetContactInformationParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type GetContactInformationParams struct { - // Body. - Body interface{} - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -116,28 +113,12 @@ func (o *GetContactInformationParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the get contact information params -func (o *GetContactInformationParams) WithBody(body interface{}) *GetContactInformationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get contact information params -func (o *GetContactInformationParams) SetBody(body interface{}) { - o.Body = body -} - // WriteToRequest writes these params to a swagger request func (o *GetContactInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/api/platform/v1/json/client/platform_service/get_contact_information_responses.go b/api/platform/v1/json/client/platform_service/get_contact_information_responses.go index 6936cec34f..19b2083d4e 100644 --- a/api/platform/v1/json/client/platform_service/get_contact_information_responses.go +++ b/api/platform/v1/json/client/platform_service/get_contact_information_responses.go @@ -58,7 +58,7 @@ type GetContactInformationOK struct { } func (o *GetContactInformationOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/GetContactInformation][%d] getContactInformationOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/platform/contact][%d] getContactInformationOk %+v", 200, o.Payload) } func (o *GetContactInformationOK) GetPayload() *GetContactInformationOKBody { @@ -100,7 +100,7 @@ func (o *GetContactInformationDefault) Code() int { } func (o *GetContactInformationDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/GetContactInformation][%d] GetContactInformation default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/platform/contact][%d] GetContactInformation default %+v", o._statusCode, o.Payload) } func (o *GetContactInformationDefault) GetPayload() *GetContactInformationDefaultBody { diff --git a/api/platform/v1/json/client/platform_service/platform_service_client.go b/api/platform/v1/json/client/platform_service/platform_service_client.go index a5863399dd..ada337e47e 100644 --- a/api/platform/v1/json/client/platform_service/platform_service_client.go +++ b/api/platform/v1/json/client/platform_service/platform_service_client.go @@ -46,7 +46,7 @@ type ClientService interface { } /* -Connect connects +Connect connects PMM server Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account. */ @@ -58,7 +58,7 @@ func (a *Client) Connect(params *ConnectParams, opts ...ClientOption) (*ConnectO op := &runtime.ClientOperation{ ID: "Connect", Method: "POST", - PathPattern: "/v1/platform/Connect", + PathPattern: "/v1/platform:connect", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -85,7 +85,7 @@ func (a *Client) Connect(params *ConnectParams, opts ...ClientOption) (*ConnectO } /* -Disconnect disconnects +Disconnect disconnects PMM server Disconnect a PMM server from the organization created on Percona Portal. */ @@ -97,7 +97,7 @@ func (a *Client) Disconnect(params *DisconnectParams, opts ...ClientOption) (*Di op := &runtime.ClientOperation{ ID: "Disconnect", Method: "POST", - PathPattern: "/v1/platform/Disconnect", + PathPattern: "/v1/platform:disconnect", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -126,7 +126,7 @@ func (a *Client) Disconnect(params *DisconnectParams, opts ...ClientOption) (*Di /* GetContactInformation gets contact information -GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform. +Fetch the contact details of the customer success employee handling the Percona customer account. */ func (a *Client) GetContactInformation(params *GetContactInformationParams, opts ...ClientOption) (*GetContactInformationOK, error) { // TODO: Validate the params before sending @@ -135,8 +135,8 @@ func (a *Client) GetContactInformation(params *GetContactInformationParams, opts } op := &runtime.ClientOperation{ ID: "GetContactInformation", - Method: "POST", - PathPattern: "/v1/platform/GetContactInformation", + Method: "GET", + PathPattern: "/v1/platform/contact", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -165,7 +165,7 @@ func (a *Client) GetContactInformation(params *GetContactInformationParams, opts /* SearchOrganizationEntitlements searches organization entitlements -SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to. +Fetch entitlements available to the Portal organization that the PMM server is connected to. */ func (a *Client) SearchOrganizationEntitlements(params *SearchOrganizationEntitlementsParams, opts ...ClientOption) (*SearchOrganizationEntitlementsOK, error) { // TODO: Validate the params before sending @@ -174,8 +174,8 @@ func (a *Client) SearchOrganizationEntitlements(params *SearchOrganizationEntitl } op := &runtime.ClientOperation{ ID: "SearchOrganizationEntitlements", - Method: "POST", - PathPattern: "/v1/platform/SearchOrganizationEntitlements", + Method: "GET", + PathPattern: "/v1/platform/organization/entitlements", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -204,7 +204,7 @@ func (a *Client) SearchOrganizationEntitlements(params *SearchOrganizationEntitl /* SearchOrganizationTickets searches organization tickets -SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to. +Fetch support tickets belonging to the Percona Portal Organization that the PMM server is connected to. */ func (a *Client) SearchOrganizationTickets(params *SearchOrganizationTicketsParams, opts ...ClientOption) (*SearchOrganizationTicketsOK, error) { // TODO: Validate the params before sending @@ -213,8 +213,8 @@ func (a *Client) SearchOrganizationTickets(params *SearchOrganizationTicketsPara } op := &runtime.ClientOperation{ ID: "SearchOrganizationTickets", - Method: "POST", - PathPattern: "/v1/platform/SearchOrganizationTickets", + Method: "GET", + PathPattern: "/v1/platform/organization/tickets", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -241,9 +241,9 @@ func (a *Client) SearchOrganizationTickets(params *SearchOrganizationTicketsPara } /* -ServerInfo servers info +ServerInfo gets server info -ServerInfo returns PMM server ID and name. +Return PMM server ID and name. */ func (a *Client) ServerInfo(params *ServerInfoParams, opts ...ClientOption) (*ServerInfoOK, error) { // TODO: Validate the params before sending @@ -252,8 +252,8 @@ func (a *Client) ServerInfo(params *ServerInfoParams, opts ...ClientOption) (*Se } op := &runtime.ClientOperation{ ID: "ServerInfo", - Method: "POST", - PathPattern: "/v1/platform/ServerInfo", + Method: "GET", + PathPattern: "/v1/platform/server", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -280,9 +280,9 @@ func (a *Client) ServerInfo(params *ServerInfoParams, opts ...ClientOption) (*Se } /* -UserStatus users status +UserStatus gets user status -UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not. +Check if the current user is logged in with their Percona Account. */ func (a *Client) UserStatus(params *UserStatusParams, opts ...ClientOption) (*UserStatusOK, error) { // TODO: Validate the params before sending @@ -291,8 +291,8 @@ func (a *Client) UserStatus(params *UserStatusParams, opts ...ClientOption) (*Us } op := &runtime.ClientOperation{ ID: "UserStatus", - Method: "POST", - PathPattern: "/v1/platform/UserStatus", + Method: "GET", + PathPattern: "/v1/platform/user", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, diff --git a/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go b/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go index 21cd5a5a33..a63841d674 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go +++ b/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go @@ -60,9 +60,6 @@ SearchOrganizationEntitlementsParams contains all the parameters to send to the Typically these are written to a http.Request. */ type SearchOrganizationEntitlementsParams struct { - // Body. - Body interface{} - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -116,28 +113,12 @@ func (o *SearchOrganizationEntitlementsParams) SetHTTPClient(client *http.Client o.HTTPClient = client } -// WithBody adds the body to the search organization entitlements params -func (o *SearchOrganizationEntitlementsParams) WithBody(body interface{}) *SearchOrganizationEntitlementsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the search organization entitlements params -func (o *SearchOrganizationEntitlementsParams) SetBody(body interface{}) { - o.Body = body -} - // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationEntitlementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go b/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go index 8304937fa8..5294d803b6 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go +++ b/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go @@ -59,7 +59,7 @@ type SearchOrganizationEntitlementsOK struct { } func (o *SearchOrganizationEntitlementsOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/SearchOrganizationEntitlements][%d] searchOrganizationEntitlementsOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/platform/organization/entitlements][%d] searchOrganizationEntitlementsOk %+v", 200, o.Payload) } func (o *SearchOrganizationEntitlementsOK) GetPayload() *SearchOrganizationEntitlementsOKBody { @@ -101,7 +101,7 @@ func (o *SearchOrganizationEntitlementsDefault) Code() int { } func (o *SearchOrganizationEntitlementsDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/SearchOrganizationEntitlements][%d] SearchOrganizationEntitlements default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/platform/organization/entitlements][%d] SearchOrganizationEntitlements default %+v", o._statusCode, o.Payload) } func (o *SearchOrganizationEntitlementsDefault) GetPayload() *SearchOrganizationEntitlementsDefaultBody { diff --git a/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go b/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go index f4b36df27a..b86868b75f 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go +++ b/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go @@ -60,9 +60,6 @@ SearchOrganizationTicketsParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type SearchOrganizationTicketsParams struct { - // Body. - Body interface{} - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -116,28 +113,12 @@ func (o *SearchOrganizationTicketsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the search organization tickets params -func (o *SearchOrganizationTicketsParams) WithBody(body interface{}) *SearchOrganizationTicketsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the search organization tickets params -func (o *SearchOrganizationTicketsParams) SetBody(body interface{}) { - o.Body = body -} - // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go b/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go index 91866c4aaf..0c3972d55f 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go +++ b/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go @@ -59,7 +59,7 @@ type SearchOrganizationTicketsOK struct { } func (o *SearchOrganizationTicketsOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/SearchOrganizationTickets][%d] searchOrganizationTicketsOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/platform/organization/tickets][%d] searchOrganizationTicketsOk %+v", 200, o.Payload) } func (o *SearchOrganizationTicketsOK) GetPayload() *SearchOrganizationTicketsOKBody { @@ -101,7 +101,7 @@ func (o *SearchOrganizationTicketsDefault) Code() int { } func (o *SearchOrganizationTicketsDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/SearchOrganizationTickets][%d] SearchOrganizationTickets default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/platform/organization/tickets][%d] SearchOrganizationTickets default %+v", o._statusCode, o.Payload) } func (o *SearchOrganizationTicketsDefault) GetPayload() *SearchOrganizationTicketsDefaultBody { diff --git a/api/platform/v1/json/client/platform_service/server_info_parameters.go b/api/platform/v1/json/client/platform_service/server_info_parameters.go index 41b87f10d1..3dbeb11371 100644 --- a/api/platform/v1/json/client/platform_service/server_info_parameters.go +++ b/api/platform/v1/json/client/platform_service/server_info_parameters.go @@ -60,9 +60,6 @@ ServerInfoParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ServerInfoParams struct { - // Body. - Body interface{} - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -116,28 +113,12 @@ func (o *ServerInfoParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the server info params -func (o *ServerInfoParams) WithBody(body interface{}) *ServerInfoParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the server info params -func (o *ServerInfoParams) SetBody(body interface{}) { - o.Body = body -} - // WriteToRequest writes these params to a swagger request func (o *ServerInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/api/platform/v1/json/client/platform_service/server_info_responses.go b/api/platform/v1/json/client/platform_service/server_info_responses.go index fbd130fbe3..c28aa272c1 100644 --- a/api/platform/v1/json/client/platform_service/server_info_responses.go +++ b/api/platform/v1/json/client/platform_service/server_info_responses.go @@ -58,7 +58,7 @@ type ServerInfoOK struct { } func (o *ServerInfoOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/ServerInfo][%d] serverInfoOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/platform/server][%d] serverInfoOk %+v", 200, o.Payload) } func (o *ServerInfoOK) GetPayload() *ServerInfoOKBody { @@ -100,7 +100,7 @@ func (o *ServerInfoDefault) Code() int { } func (o *ServerInfoDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/ServerInfo][%d] ServerInfo default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/platform/server][%d] ServerInfo default %+v", o._statusCode, o.Payload) } func (o *ServerInfoDefault) GetPayload() *ServerInfoDefaultBody { diff --git a/api/platform/v1/json/client/platform_service/user_status_parameters.go b/api/platform/v1/json/client/platform_service/user_status_parameters.go index 1511852277..ea2a62482d 100644 --- a/api/platform/v1/json/client/platform_service/user_status_parameters.go +++ b/api/platform/v1/json/client/platform_service/user_status_parameters.go @@ -60,9 +60,6 @@ UserStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UserStatusParams struct { - // Body. - Body interface{} - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -116,28 +113,12 @@ func (o *UserStatusParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the user status params -func (o *UserStatusParams) WithBody(body interface{}) *UserStatusParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the user status params -func (o *UserStatusParams) SetBody(body interface{}) { - o.Body = body -} - // WriteToRequest writes these params to a swagger request func (o *UserStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/api/platform/v1/json/client/platform_service/user_status_responses.go b/api/platform/v1/json/client/platform_service/user_status_responses.go index c91cd3fa0e..e4113b9f1e 100644 --- a/api/platform/v1/json/client/platform_service/user_status_responses.go +++ b/api/platform/v1/json/client/platform_service/user_status_responses.go @@ -58,7 +58,7 @@ type UserStatusOK struct { } func (o *UserStatusOK) Error() string { - return fmt.Sprintf("[POST /v1/platform/UserStatus][%d] userStatusOk %+v", 200, o.Payload) + return fmt.Sprintf("[GET /v1/platform/user][%d] userStatusOk %+v", 200, o.Payload) } func (o *UserStatusOK) GetPayload() *UserStatusOKBody { @@ -100,7 +100,7 @@ func (o *UserStatusDefault) Code() int { } func (o *UserStatusDefault) Error() string { - return fmt.Sprintf("[POST /v1/platform/UserStatus][%d] UserStatus default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /v1/platform/user][%d] UserStatus default %+v", o._statusCode, o.Payload) } func (o *UserStatusDefault) GetPayload() *UserStatusDefaultBody { diff --git a/api/platform/v1/json/v1.json b/api/platform/v1/json/v1.json index dffe7cf628..34e8de03ec 100644 --- a/api/platform/v1/json/v1.json +++ b/api/platform/v1/json/v1.json @@ -15,161 +15,14 @@ "version": "v0" }, "paths": { - "/v1/platform/Connect": { - "post": { - "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", + "/v1/platform/contact": { + "get": { + "description": "Fetch the contact details of the customer success employee handling the Percona customer account.", "tags": [ "PlatformService" ], - "summary": "Connect", - "operationId": "Connect", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "personal_access_token": { - "description": "Personal Access Token that the user obtains from Percona Portal.", - "type": "string", - "x-order": 1 - }, - "server_name": { - "description": "User defined human readable PMM Server Name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/platform/Disconnect": { - "post": { - "description": "Disconnect a PMM server from the organization created on Percona Portal.", - "tags": [ - "PlatformService" - ], - "summary": "Disconnect", - "operationId": "Disconnect", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "force": { - "type": "boolean", - "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/platform/GetContactInformation": { - "post": { - "description": "GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform.", - "tags": [ - "PlatformService" - ], - "summary": "GetContactInformation", + "summary": "Get Contact Information", "operationId": "GetContactInformation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -233,24 +86,14 @@ } } }, - "/v1/platform/SearchOrganizationEntitlements": { - "post": { - "description": "SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to.", + "/v1/platform/organization/entitlements": { + "get": { + "description": "Fetch entitlements available to the Portal organization that the PMM server is connected to.", "tags": [ "PlatformService" ], - "summary": "SearchOrganizationEntitlements", + "summary": "Search Organization Entitlements", "operationId": "SearchOrganizationEntitlements", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -382,24 +225,14 @@ } } }, - "/v1/platform/SearchOrganizationTickets": { - "post": { - "description": "SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", + "/v1/platform/organization/tickets": { + "get": { + "description": "Fetch support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", "tags": [ "PlatformService" ], - "summary": "SearchOrganizationTickets", + "summary": "Search Organization Tickets", "operationId": "SearchOrganizationTickets", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -500,24 +333,14 @@ } } }, - "/v1/platform/ServerInfo": { - "post": { - "description": "ServerInfo returns PMM server ID and name.", + "/v1/platform/server": { + "get": { + "description": "Return PMM server ID and name.", "tags": [ "PlatformService" ], - "summary": "ServerInfo", + "summary": "Get Server Info", "operationId": "ServerInfo", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -577,36 +400,163 @@ } } }, - "/v1/platform/UserStatus": { - "post": { - "description": "UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not.", + "/v1/platform/user": { + "get": { + "description": "Check if the current user is logged in with their Percona Account.", "tags": [ "PlatformService" ], - "summary": "UserStatus", + "summary": "Get User Status", "operationId": "UserStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "is_platform_user": { + "type": "boolean", + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/platform:connect": { + "post": { + "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", + "tags": [ + "PlatformService" + ], + "summary": "Connect PMM Server", + "operationId": "Connect", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "type": "object" + "type": "object", + "properties": { + "personal_access_token": { + "description": "Personal Access Token that the user obtains from Percona Portal.", + "type": "string", + "x-order": 1 + }, + "server_name": { + "description": "User defined human readable PMM Server Name.", + "type": "string", + "x-order": 0 + } + } } } ], "responses": { "200": { "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "is_platform_user": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/platform:disconnect": { + "post": { + "description": "Disconnect a PMM server from the organization created on Percona Portal.", + "tags": [ + "PlatformService" + ], + "summary": "Disconnect PMM Server", + "operationId": "Disconnect", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "force": { "type": "boolean", + "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response", "x-order": 0 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", diff --git a/api/platform/v1/platform.pb.go b/api/platform/v1/platform.pb.go index 64246318cd..f8527f3d0d 100644 --- a/api/platform/v1/platform.pb.go +++ b/api/platform/v1/platform.pb.go @@ -1184,141 +1184,129 @@ var file_platform_v1_platform_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, - 0x72, 0x32, 0xab, 0x0f, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x87, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x72, 0x32, 0xe6, 0x0d, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x92, - 0x41, 0x9d, 0x01, 0x12, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x1a, 0x91, 0x01, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x61, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, - 0x6f, 0x6e, 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, - 0x6c, 0x2e, 0x20, 0x54, 0x68, 0x61, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x20, - 0x69, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, - 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, - 0xca, 0x01, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x1e, - 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x7b, 0x92, 0x41, 0x56, 0x12, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x1a, 0x48, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x61, 0x20, 0x50, - 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, - 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0xd4, 0x02, 0x0a, - 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, + 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcb, 0x01, 0x92, + 0x41, 0xa8, 0x01, 0x12, 0x12, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x50, 0x4d, 0x4d, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x1a, 0x91, 0x01, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x20, 0x61, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x50, 0x65, + 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x2e, 0x20, 0x54, 0x68, + 0x61, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, + 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x6f, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, + 0x6e, 0x61, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0xd6, 0x01, 0x0a, 0x0a, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x01, 0x92, 0x41, 0x61, + 0x12, 0x15, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x50, 0x4d, 0x4d, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x1a, 0x48, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x20, 0x61, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6f, + 0x6e, 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x12, 0xb0, 0x02, 0x0a, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x92, 0x41, 0xa2, 0x01, - 0x12, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x84, 0x01, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, - 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, - 0x20, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, - 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, - 0x6f, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x12, 0xf6, 0x02, 0x0a, 0x1e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xea, 0x01, 0x92, 0x41, 0xb0, 0x01, 0x12, 0x1e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, + 0x73, 0x12, 0x2d, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xb3, 0x01, 0x92, 0x41, 0x86, 0x01, 0x12, 0x1b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x67, 0x46, 0x65, 0x74, 0x63, 0x68, 0x20, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x20, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x62, 0x65, 0x6c, 0x6f, + 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x65, 0x72, + 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x20, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0xbe, 0x02, 0x0a, 0x1e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x8d, 0x01, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x65, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x27, 0x73, 0x20, 0x61, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x6f, - 0x72, 0x74, 0x61, 0x6c, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x20, 0x74, 0x6f, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, - 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xcb, 0x02, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xb2, 0x01, 0x92, 0x41, 0x80, 0x01, 0x12, 0x20, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x20, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x5c, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x4d, + 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, + 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x29, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, - 0x92, 0x41, 0xa9, 0x01, 0x12, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x8f, 0x01, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x65, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x20, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, - 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x65, - 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x20, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x50, 0x65, 0x72, 0x63, - 0x6f, 0x6e, 0x61, 0x20, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xac, 0x01, 0x0a, 0x0a, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x92, 0x41, 0x38, 0x12, - 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2a, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, - 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x49, 0x44, 0x20, 0x61, 0x6e, - 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, - 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0xf3, 0x01, 0x0a, 0x0a, 0x55, 0x73, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, 0x92, 0x41, 0x7e, 0x12, - 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x70, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, - 0x61, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, - 0x20, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, - 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, - 0xb3, 0x01, 0x92, 0x41, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x3b, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, - 0xaa, 0x02, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x92, 0x41, 0x7c, 0x12, 0x17, + 0x47, 0x65, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x61, 0x46, 0x65, 0x74, 0x63, 0x68, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x65, 0x72, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x6c, 0x6f, + 0x79, 0x65, 0x65, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x31, 0x12, 0x0f, 0x47, 0x65, 0x74, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x1e, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, + 0x49, 0x44, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0xc0, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, 0x92, 0x41, 0x55, 0x12, 0x0f, 0x47, 0x65, + 0x74, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x42, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x6c, 0x6f, 0x67, 0x67, + 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, + 0x20, 0x50, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x42, 0xb3, 0x01, 0x92, 0x41, 0x10, + 0x12, 0x0e, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x41, 0x50, 0x49, + 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x42, 0x0d, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/platform/v1/platform.pb.gw.go b/api/platform/v1/platform.pb.gw.go index aa08ecb30e..a16a0eb48a 100644 --- a/api/platform/v1/platform.pb.gw.go +++ b/api/platform/v1/platform.pb.gw.go @@ -85,10 +85,6 @@ func request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, ma var protoReq SearchOrganizationTicketsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.SearchOrganizationTickets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -97,10 +93,6 @@ func local_request_PlatformService_SearchOrganizationTickets_0(ctx context.Conte var protoReq SearchOrganizationTicketsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.SearchOrganizationTickets(ctx, &protoReq) return msg, metadata, err } @@ -109,10 +101,6 @@ func request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Contex var protoReq SearchOrganizationEntitlementsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.SearchOrganizationEntitlements(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -121,10 +109,6 @@ func local_request_PlatformService_SearchOrganizationEntitlements_0(ctx context. var protoReq SearchOrganizationEntitlementsRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.SearchOrganizationEntitlements(ctx, &protoReq) return msg, metadata, err } @@ -133,10 +117,6 @@ func request_PlatformService_GetContactInformation_0(ctx context.Context, marsha var protoReq GetContactInformationRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.GetContactInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -145,10 +125,6 @@ func local_request_PlatformService_GetContactInformation_0(ctx context.Context, var protoReq GetContactInformationRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.GetContactInformation(ctx, &protoReq) return msg, metadata, err } @@ -157,10 +133,6 @@ func request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime var protoReq ServerInfoRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ServerInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -169,10 +141,6 @@ func local_request_PlatformService_ServerInfo_0(ctx context.Context, marshaler r var protoReq ServerInfoRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ServerInfo(ctx, &protoReq) return msg, metadata, err } @@ -181,10 +149,6 @@ func request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime var protoReq UserStatusRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.UserStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -193,10 +157,6 @@ func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler r var protoReq UserStatusRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.UserStatus(ctx, &protoReq) return msg, metadata, err } @@ -214,7 +174,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/Connect", runtime.WithHTTPPathPattern("/v1/platform/Connect")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/Connect", runtime.WithHTTPPathPattern("/v1/platform:connect")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -238,7 +198,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/Disconnect", runtime.WithHTTPPathPattern("/v1/platform/Disconnect")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/Disconnect", runtime.WithHTTPPathPattern("/v1/platform:disconnect")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -254,7 +214,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv forward_PlatformService_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -262,7 +222,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationTickets", runtime.WithHTTPPathPattern("/v1/platform/SearchOrganizationTickets")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationTickets", runtime.WithHTTPPathPattern("/v1/platform/organization/tickets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -278,7 +238,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv forward_PlatformService_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -286,7 +246,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationEntitlements", runtime.WithHTTPPathPattern("/v1/platform/SearchOrganizationEntitlements")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationEntitlements", runtime.WithHTTPPathPattern("/v1/platform/organization/entitlements")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -302,7 +262,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv forward_PlatformService_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -310,7 +270,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/GetContactInformation", runtime.WithHTTPPathPattern("/v1/platform/GetContactInformation")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/GetContactInformation", runtime.WithHTTPPathPattern("/v1/platform/contact")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -326,7 +286,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv forward_PlatformService_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -334,7 +294,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/ServerInfo", runtime.WithHTTPPathPattern("/v1/platform/ServerInfo")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/ServerInfo", runtime.WithHTTPPathPattern("/v1/platform/server")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -350,7 +310,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv forward_PlatformService_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -358,7 +318,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/UserStatus", runtime.WithHTTPPathPattern("/v1/platform/UserStatus")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/platform.v1.PlatformService/UserStatus", runtime.WithHTTPPathPattern("/v1/platform/user")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -420,7 +380,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/Connect", runtime.WithHTTPPathPattern("/v1/platform/Connect")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/Connect", runtime.WithHTTPPathPattern("/v1/platform:connect")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -441,7 +401,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/Disconnect", runtime.WithHTTPPathPattern("/v1/platform/Disconnect")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/Disconnect", runtime.WithHTTPPathPattern("/v1/platform:disconnect")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -456,13 +416,13 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv forward_PlatformService_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationTickets", runtime.WithHTTPPathPattern("/v1/platform/SearchOrganizationTickets")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationTickets", runtime.WithHTTPPathPattern("/v1/platform/organization/tickets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -477,13 +437,13 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv forward_PlatformService_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationEntitlements", runtime.WithHTTPPathPattern("/v1/platform/SearchOrganizationEntitlements")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/SearchOrganizationEntitlements", runtime.WithHTTPPathPattern("/v1/platform/organization/entitlements")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -498,13 +458,13 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv forward_PlatformService_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/GetContactInformation", runtime.WithHTTPPathPattern("/v1/platform/GetContactInformation")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/GetContactInformation", runtime.WithHTTPPathPattern("/v1/platform/contact")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -519,13 +479,13 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv forward_PlatformService_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/ServerInfo", runtime.WithHTTPPathPattern("/v1/platform/ServerInfo")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/ServerInfo", runtime.WithHTTPPathPattern("/v1/platform/server")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -540,13 +500,13 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv forward_PlatformService_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/UserStatus", runtime.WithHTTPPathPattern("/v1/platform/UserStatus")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/platform.v1.PlatformService/UserStatus", runtime.WithHTTPPathPattern("/v1/platform/user")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -565,19 +525,19 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } var ( - pattern_PlatformService_Connect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "Connect"}, "")) + pattern_PlatformService_Connect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "platform"}, "connect")) - pattern_PlatformService_Disconnect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "Disconnect"}, "")) + pattern_PlatformService_Disconnect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "platform"}, "disconnect")) - pattern_PlatformService_SearchOrganizationTickets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "SearchOrganizationTickets"}, "")) + pattern_PlatformService_SearchOrganizationTickets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "platform", "organization", "tickets"}, "")) - pattern_PlatformService_SearchOrganizationEntitlements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "SearchOrganizationEntitlements"}, "")) + pattern_PlatformService_SearchOrganizationEntitlements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "platform", "organization", "entitlements"}, "")) - pattern_PlatformService_GetContactInformation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "GetContactInformation"}, "")) + pattern_PlatformService_GetContactInformation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "contact"}, "")) - pattern_PlatformService_ServerInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "ServerInfo"}, "")) + pattern_PlatformService_ServerInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "server"}, "")) - pattern_PlatformService_UserStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "UserStatus"}, "")) + pattern_PlatformService_UserStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "platform", "user"}, "")) ) var ( diff --git a/api/platform/v1/platform.proto b/api/platform/v1/platform.proto index 8bddf26ba2..0dbe048ae5 100644 --- a/api/platform/v1/platform.proto +++ b/api/platform/v1/platform.proto @@ -130,79 +130,63 @@ service PlatformService { // Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account. rpc Connect(ConnectRequest) returns (ConnectResponse) { option (google.api.http) = { - post: "/v1/platform/Connect" + post: "/v1/platform:connect" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Connect" + summary: "Connect PMM Server" description: "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account." }; } // Disconnect a PMM server from the organization created on Percona Portal. rpc Disconnect(DisconnectRequest) returns (DisconnectResponse) { option (google.api.http) = { - post: "/v1/platform/Disconnect" + post: "/v1/platform:disconnect" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Disconnect" + summary: "Disconnect PMM Server" description: "Disconnect a PMM server from the organization created on Percona Portal." }; } // SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to. rpc SearchOrganizationTickets(SearchOrganizationTicketsRequest) returns (SearchOrganizationTicketsResponse) { - option (google.api.http) = { - post: "/v1/platform/SearchOrganizationTickets" - body: "*" - }; + option (google.api.http) = {get: "/v1/platform/organization/tickets"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "SearchOrganizationTickets" - description: "SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to." + summary: "Search Organization Tickets" + description: "Fetch support tickets belonging to the Percona Portal Organization that the PMM server is connected to." }; } - // SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to. + // SearchOrganizationEntitlements fetches entitlements available to the Portal organization that the PMM server is connected to. rpc SearchOrganizationEntitlements(SearchOrganizationEntitlementsRequest) returns (SearchOrganizationEntitlementsResponse) { - option (google.api.http) = { - post: "/v1/platform/SearchOrganizationEntitlements" - body: "*" - }; + option (google.api.http) = {get: "/v1/platform/organization/entitlements"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "SearchOrganizationEntitlements" - description: "SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to." + summary: "Search Organization Entitlements" + description: "Fetch entitlements available to the Portal organization that the PMM server is connected to." }; } - // GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform. + // GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account. rpc GetContactInformation(GetContactInformationRequest) returns (GetContactInformationResponse) { - option (google.api.http) = { - post: "/v1/platform/GetContactInformation" - body: "*" - }; + option (google.api.http) = {get: "/v1/platform/contact"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "GetContactInformation" - description: "GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform." + summary: "Get Contact Information" + description: "Fetch the contact details of the customer success employee handling the Percona customer account." }; } // ServerInfo returns PMM server ID and name. rpc ServerInfo(ServerInfoRequest) returns (ServerInfoResponse) { - option (google.api.http) = { - post: "/v1/platform/ServerInfo" - body: "*" - }; + option (google.api.http) = {get: "/v1/platform/server"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "ServerInfo" - description: "ServerInfo returns PMM server ID and name." + summary: "Get Server Info" + description: "Return PMM server ID and name." }; } - - // UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not. + // UserStatus check if the current user is logged in with their Percona Account. rpc UserStatus(UserStatusRequest) returns (UserStatusResponse) { - option (google.api.http) = { - post: "/v1/platform/UserStatus" - body: "*" - }; + option (google.api.http) = {get: "/v1/platform/user"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "UserStatus" - description: "UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not." + summary: "Get User Status" + description: "Check if the current user is logged in with their Percona Account." }; } } diff --git a/api/platform/v1/platform_grpc.pb.go b/api/platform/v1/platform_grpc.pb.go index a43bf99e43..37607343f4 100644 --- a/api/platform/v1/platform_grpc.pb.go +++ b/api/platform/v1/platform_grpc.pb.go @@ -39,13 +39,13 @@ type PlatformServiceClient interface { Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error) // SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to. SearchOrganizationTickets(ctx context.Context, in *SearchOrganizationTicketsRequest, opts ...grpc.CallOption) (*SearchOrganizationTicketsResponse, error) - // SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to. + // SearchOrganizationEntitlements fetches entitlements available to the Portal organization that the PMM server is connected to. SearchOrganizationEntitlements(ctx context.Context, in *SearchOrganizationEntitlementsRequest, opts ...grpc.CallOption) (*SearchOrganizationEntitlementsResponse, error) - // GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform. + // GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account. GetContactInformation(ctx context.Context, in *GetContactInformationRequest, opts ...grpc.CallOption) (*GetContactInformationResponse, error) // ServerInfo returns PMM server ID and name. ServerInfo(ctx context.Context, in *ServerInfoRequest, opts ...grpc.CallOption) (*ServerInfoResponse, error) - // UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not. + // UserStatus check if the current user is logged in with their Percona Account. UserStatus(ctx context.Context, in *UserStatusRequest, opts ...grpc.CallOption) (*UserStatusResponse, error) } @@ -130,13 +130,13 @@ type PlatformServiceServer interface { Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) // SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to. SearchOrganizationTickets(context.Context, *SearchOrganizationTicketsRequest) (*SearchOrganizationTicketsResponse, error) - // SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to. + // SearchOrganizationEntitlements fetches entitlements available to the Portal organization that the PMM server is connected to. SearchOrganizationEntitlements(context.Context, *SearchOrganizationEntitlementsRequest) (*SearchOrganizationEntitlementsResponse, error) - // GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform. + // GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account. GetContactInformation(context.Context, *GetContactInformationRequest) (*GetContactInformationResponse, error) // ServerInfo returns PMM server ID and name. ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error) - // UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not. + // UserStatus check if the current user is logged in with their Percona Account. UserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error) mustEmbedUnimplementedPlatformServiceServer() } diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index ac00c466d8..7712f0cc77 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -22586,161 +22586,14 @@ } } }, - "/v1/platform/Connect": { - "post": { - "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", - "tags": [ - "PlatformService" - ], - "summary": "Connect", - "operationId": "Connect", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "server_name": { - "description": "User defined human readable PMM Server Name.", - "type": "string", - "x-order": 0 - }, - "personal_access_token": { - "description": "Personal Access Token that the user obtains from Percona Portal.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/platform/Disconnect": { - "post": { - "description": "Disconnect a PMM server from the organization created on Percona Portal.", - "tags": [ - "PlatformService" - ], - "summary": "Disconnect", - "operationId": "Disconnect", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "force": { - "type": "boolean", - "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/platform/GetContactInformation": { - "post": { - "description": "GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform.", + "/v1/platform/contact": { + "get": { + "description": "Fetch the contact details of the customer success employee handling the Percona customer account.", "tags": [ "PlatformService" ], - "summary": "GetContactInformation", + "summary": "Get Contact Information", "operationId": "GetContactInformation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -22804,24 +22657,14 @@ } } }, - "/v1/platform/SearchOrganizationEntitlements": { - "post": { - "description": "SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to.", + "/v1/platform/organization/entitlements": { + "get": { + "description": "Fetch entitlements available to the Portal organization that the PMM server is connected to.", "tags": [ "PlatformService" ], - "summary": "SearchOrganizationEntitlements", + "summary": "Search Organization Entitlements", "operationId": "SearchOrganizationEntitlements", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -22953,24 +22796,14 @@ } } }, - "/v1/platform/SearchOrganizationTickets": { - "post": { - "description": "SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", + "/v1/platform/organization/tickets": { + "get": { + "description": "Fetch support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", "tags": [ "PlatformService" ], - "summary": "SearchOrganizationTickets", + "summary": "Search Organization Tickets", "operationId": "SearchOrganizationTickets", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -23071,24 +22904,14 @@ } } }, - "/v1/platform/ServerInfo": { - "post": { - "description": "ServerInfo returns PMM server ID and name.", + "/v1/platform/server": { + "get": { + "description": "Return PMM server ID and name.", "tags": [ "PlatformService" ], - "summary": "ServerInfo", + "summary": "Get Server Info", "operationId": "ServerInfo", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], "responses": { "200": { "description": "A successful response.", @@ -23148,36 +22971,163 @@ } } }, - "/v1/platform/UserStatus": { - "post": { - "description": "UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not.", + "/v1/platform/user": { + "get": { + "description": "Check if the current user is logged in with their Percona Account.", "tags": [ "PlatformService" ], - "summary": "UserStatus", + "summary": "Get User Status", "operationId": "UserStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "is_platform_user": { + "type": "boolean", + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/platform:connect": { + "post": { + "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", + "tags": [ + "PlatformService" + ], + "summary": "Connect PMM Server", + "operationId": "Connect", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "type": "object" + "type": "object", + "properties": { + "server_name": { + "description": "User defined human readable PMM Server Name.", + "type": "string", + "x-order": 0 + }, + "personal_access_token": { + "description": "Personal Access Token that the user obtains from Percona Portal.", + "type": "string", + "x-order": 1 + } + } } } ], "responses": { "200": { "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "is_platform_user": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/platform:disconnect": { + "post": { + "description": "Disconnect a PMM server from the organization created on Percona Portal.", + "tags": [ + "PlatformService" + ], + "summary": "Disconnect PMM Server", + "operationId": "Disconnect", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "force": { "type": "boolean", + "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response", "x-order": 0 } } } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index 180754accd..eb69e6ebeb 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -59,12 +59,12 @@ import ( "gopkg.in/reform.v1" "gopkg.in/reform.v1/dialects/postgresql" - rolev1beta1 "github.com/percona/pmm/api/accesscontrol/v1beta1" + accesscontrolv1 "github.com/percona/pmm/api/accesscontrol/v1beta1" actionsv1 "github.com/percona/pmm/api/actions/v1" advisorsv1 "github.com/percona/pmm/api/advisors/v1" agentv1 "github.com/percona/pmm/api/agent/v1" - alertingpb "github.com/percona/pmm/api/alerting/v1" - backuppb "github.com/percona/pmm/api/backup/v1" + alertingv1 "github.com/percona/pmm/api/alerting/v1" + backupv1 "github.com/percona/pmm/api/backup/v1" dumpv1beta1 "github.com/percona/pmm/api/dump/v1beta1" inventoryv1 "github.com/percona/pmm/api/inventory/v1" managementv1 "github.com/percona/pmm/api/management/v1" @@ -267,14 +267,14 @@ func runGRPCServer(ctx context.Context, deps *gRPCServerDeps) { actionsv1.RegisterActionsServiceServer(gRPCServer, managementgrpc.NewActionsServer(deps.actions, deps.db)) advisorsv1.RegisterAdvisorServiceServer(gRPCServer, management.NewChecksAPIService(deps.checksService)) - rolev1beta1.RegisterAccessControlServiceServer(gRPCServer, management.NewAccessControlService(deps.db)) + accesscontrolv1.RegisterAccessControlServiceServer(gRPCServer, management.NewAccessControlService(deps.db)) - alertingpb.RegisterAlertingServiceServer(gRPCServer, deps.templatesService) + alertingv1.RegisterAlertingServiceServer(gRPCServer, deps.templatesService) - backuppb.RegisterBackupServiceServer(gRPCServer, mgmtBackupService) - backuppb.RegisterLocationsServiceServer(gRPCServer, managementbackup.NewLocationsService(deps.db, deps.minioClient)) - backuppb.RegisterArtifactsServiceServer(gRPCServer, mgmtArtifactsService) - backuppb.RegisterRestoreServiceServer(gRPCServer, mgmtRestoreService) + backupv1.RegisterBackupServiceServer(gRPCServer, mgmtBackupService) + backupv1.RegisterLocationsServiceServer(gRPCServer, managementbackup.NewLocationsService(deps.db, deps.minioClient)) + backupv1.RegisterArtifactsServiceServer(gRPCServer, mgmtArtifactsService) + backupv1.RegisterRestoreServiceServer(gRPCServer, mgmtRestoreService) dumpv1beta1.RegisterDumpServiceServer(gRPCServer, managementdump.New(deps.db, deps.grafanaClient, deps.dumpService)) @@ -358,14 +358,14 @@ func runHTTP1Server(ctx context.Context, deps *http1ServerDeps) { managementv1.RegisterManagementServiceHandlerFromEndpoint, actionsv1.RegisterActionsServiceHandlerFromEndpoint, advisorsv1.RegisterAdvisorServiceHandlerFromEndpoint, - rolev1beta1.RegisterAccessControlServiceHandlerFromEndpoint, + accesscontrolv1.RegisterAccessControlServiceHandlerFromEndpoint, - alertingpb.RegisterAlertingServiceHandlerFromEndpoint, + alertingv1.RegisterAlertingServiceHandlerFromEndpoint, - backuppb.RegisterBackupServiceHandlerFromEndpoint, - backuppb.RegisterLocationsServiceHandlerFromEndpoint, - backuppb.RegisterArtifactsServiceHandlerFromEndpoint, - backuppb.RegisterRestoreServiceHandlerFromEndpoint, + backupv1.RegisterBackupServiceHandlerFromEndpoint, + backupv1.RegisterLocationsServiceHandlerFromEndpoint, + backupv1.RegisterArtifactsServiceHandlerFromEndpoint, + backupv1.RegisterRestoreServiceHandlerFromEndpoint, dumpv1beta1.RegisterDumpServiceHandlerFromEndpoint, diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go index 452046fba8..48d1b2ffe2 100644 --- a/managed/services/grafana/auth_server.go +++ b/managed/services/grafana/auth_server.go @@ -59,31 +59,30 @@ var rules = map[string]role{ "/qan.v1.CollectorService.": viewer, "/qan.v1.QANService.": viewer, - "/v1/alerting": viewer, - "/v1/actions/": viewer, - "/v1/actions:startServiceAction": viewer, - "/v1/actions:startNodeAction": viewer, - "/v1/actions:cancelAction": viewer, - "/v1/backups": admin, - "/v1/dump": admin, - "/v1/accesscontrol": admin, - "/v1/inventory/": admin, - "/v1/inventory/services:getTypes": viewer, - "/v1/management/": admin, - "/v1/management/Jobs": viewer, - "/v1/server/AWSInstance": none, // special case - used before Grafana can be accessed - "/v1/server/updates": viewer, - "/v1/server/updates:start": admin, - "/v1/server/updates:getStatus": none, // special token-based auth - "/v1/server/settings": admin, - "/v1/platform/Connect": admin, - "/v1/platform/Disconnect": admin, - "/v1/platform/SearchOrganizationTickets": viewer, - "/v1/platform/SearchOrganizationEntitlements": viewer, - "/v1/platform/GetContactInformation": viewer, - "/v1/platform/ServerInfo": viewer, - "/v1/platform/UserStatus": viewer, - "/v1/users": viewer, + "/v1/alerting": viewer, + "/v1/actions/": viewer, + "/v1/actions:startServiceAction": viewer, + "/v1/actions:startNodeAction": viewer, + "/v1/actions:cancelAction": viewer, + "/v1/backups": admin, + "/v1/dump": admin, + "/v1/accesscontrol": admin, + "/v1/inventory/": admin, + "/v1/inventory/services:getTypes": viewer, + "/v1/management/": admin, + "/v1/management/Jobs": viewer, + "/v1/server/AWSInstance": none, // special case - used before Grafana can be accessed + "/v1/server/updates": viewer, + "/v1/server/updates:start": admin, + "/v1/server/updates:getStatus": none, // special token-based auth + "/v1/server/settings": admin, + "/v1/platform:connect": admin, + "/v1/platform:disconnect": admin, + "/v1/platform/organization/": viewer, + "/v1/platform/contact": viewer, + "/v1/platform/server": viewer, + "/v1/platform/user": viewer, + "/v1/users": viewer, // must be available without authentication for health checking "/v1/readyz": none, // TODO: remove before v3 GA diff --git a/managed/services/grafana/auth_server_test.go b/managed/services/grafana/auth_server_test.go index ed757f2b18..f08d6eea40 100644 --- a/managed/services/grafana/auth_server_test.go +++ b/managed/services/grafana/auth_server_test.go @@ -212,19 +212,24 @@ func TestAuthServerAuthenticate(t *testing.T) { "/server.v1.ServerService/UpdateStatus": none, "/server.v1.ServerService/AWSInstanceCheck": none, - "/v1/inventory/nodes": admin, - "/v1/actions:startServiceAction": viewer, - "/v1/management/services": admin, - "/v1/management/agents": admin, - "/v1/server/updates": viewer, - "/v1/server/updates:start": admin, - "/v1/server/updates:getStatus": none, - "/v1/server/settings": admin, - "/v1/server/AWSInstance": none, - "/v1/backups": admin, - "/v1/accesscontrol": admin, - "/v1/users": viewer, - "/v1/platform/Connect": admin, + "/v1/inventory/nodes": admin, + "/v1/actions:startServiceAction": viewer, + "/v1/management/services": admin, + "/v1/management/agents": admin, + "/v1/server/updates": viewer, + "/v1/server/updates:start": admin, + "/v1/server/updates:getStatus": none, + "/v1/server/settings": admin, + "/v1/server/AWSInstance": none, + "/v1/backups": admin, + "/v1/accesscontrol": admin, + "/v1/users": viewer, + "/v1/platform:connect": admin, + "/v1/platform:disconnect": admin, + "/v1/platform/contact": viewer, + "/v1/platform/user": viewer, + "/v1/platform/server": viewer, + "/v1/platform/organization/tickets": viewer, "/v1/server/AWSInstance/..%2f..%2finventory/Services/List": admin, "/v1/server/AWSInstance/..%2flogs.zip": admin,