From 2171b49a26e4896a6d86960ab178a87105ccd9ac Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Fri, 20 Oct 2023 14:33:56 +0200 Subject: [PATCH 01/14] refactor: Change UserService /auth url parts to /user --- aruna/api/storage/services/v2/user_service.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aruna/api/storage/services/v2/user_service.proto b/aruna/api/storage/services/v2/user_service.proto index ee460472..ab66d823 100644 --- a/aruna/api/storage/services/v2/user_service.proto +++ b/aruna/api/storage/services/v2/user_service.proto @@ -25,7 +25,7 @@ service UserService { // This request should be called when a new user logs in for the first time rpc RegisterUser(RegisterUserRequest) returns (RegisterUserResponse) { option (google.api.http) = { - post : "/v2/auth/register" + post : "/v2/user/register" body : "*" }; } @@ -61,7 +61,7 @@ service UserService { // Creates an API token to authenticate rpc CreateAPIToken(CreateAPITokenRequest) returns (CreateAPITokenResponse) { option (google.api.http) = { - post : "/v2/auth/token" + post : "/v2/user/token" body : "*" }; } @@ -73,7 +73,7 @@ service UserService { // Returns one API token by id rpc GetAPIToken(GetAPITokenRequest) returns (GetAPITokenResponse) { option (google.api.http) = { - get : "/v2/auth/token/{token_id}" + get : "/v2/user/token/{token_id}" }; } @@ -84,7 +84,7 @@ service UserService { // Returns a list of API tokens for a specific user rpc GetAPITokens(GetAPITokensRequest) returns (GetAPITokensResponse) { option (google.api.http) = { - get : "/v2/auth/tokens" + get : "/v2/user/tokens" }; } @@ -95,7 +95,7 @@ service UserService { // Deletes the specified API Token rpc DeleteAPIToken(DeleteAPITokenRequest) returns (DeleteAPITokenResponse) { option (google.api.http) = { - delete : "/v2/auth/token/{token_id}" + delete : "/v2/user/token/{token_id}" }; } @@ -107,7 +107,7 @@ service UserService { rpc DeleteAPITokens(DeleteAPITokensRequest) returns (DeleteAPITokensResponse) { option (google.api.http) = { - delete : "/v2/auth/tokens" + delete : "/v2/user/tokens" }; } From 806ee2cdc9ec43ebc3446d069e938230b2bff0c5 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Mon, 23 Oct 2023 13:07:35 +0200 Subject: [PATCH 02/14] feat: Add gRPC health checking protocol --- aruna/api/google | 2 +- aruna/api/health/v2/health.proto | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 aruna/api/health/v2/health.proto diff --git a/aruna/api/google b/aruna/api/google index 10ea3bd3..38894df9 160000 --- a/aruna/api/google +++ b/aruna/api/google @@ -1 +1 @@ -Subproject commit 10ea3bd3042d005e145009ecb8e358cf720883bf +Subproject commit 38894df9fd8faebe373d15f25da07119582c82f3 diff --git a/aruna/api/health/v2/health.proto b/aruna/api/health/v2/health.proto new file mode 100644 index 00000000..1647f725 --- /dev/null +++ b/aruna/api/health/v2/health.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package aruna.api.health.v2; + +import "google/api/visibility.proto"; + +message HealthCheckRequest { + string service = 1; +} + +message HealthCheckResponse { + enum ServingStatus { + UNKNOWN = 0; + SERVING = 1; + NOT_SERVING = 2; + SERVICE_UNKNOWN = 3; // Used only by the Watch method. + } + ServingStatus status = 1; +} + +service Health { + option (google.api.api_visibility).restriction = "INTERNAL"; + + rpc Check(HealthCheckRequest) returns (HealthCheckResponse); + + rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse); +} \ No newline at end of file From 053946646a18bfd401a355320d20102f0df99dde Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Mon, 23 Oct 2023 14:31:13 +0200 Subject: [PATCH 03/14] chore: Add health subdirectory to buf.yaml lint ignore section --- buf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/buf.yaml b/buf.yaml index 6041a904..ec76fe8e 100644 --- a/buf.yaml +++ b/buf.yaml @@ -7,6 +7,7 @@ lint: - DEFAULT ignore: - aruna/api/google + - aruna/api/health - aruna/api/protoc-gen-openapiv2 ignore_only: ENUM_VALUE_PREFIX: From 76e3a94e7c45d6a10ce9562e577f3460e8e45102 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 24 Oct 2023 10:30:44 +0200 Subject: [PATCH 04/14] refactor: Rename message CompletedParts to CompletedPart --- aruna/api/storage/services/v2/object_service.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aruna/api/storage/services/v2/object_service.proto b/aruna/api/storage/services/v2/object_service.proto index ca7507b6..40a5b552 100644 --- a/aruna/api/storage/services/v2/object_service.proto +++ b/aruna/api/storage/services/v2/object_service.proto @@ -192,7 +192,7 @@ message GetDownloadURLResponse { string url = 1; } -message CompletedParts { +message CompletedPart { // Multipart identifier string etag = 1; // Part number @@ -211,7 +211,7 @@ message FinishObjectStagingRequest { // If the upload was multipart, this is the list of parts that were uploaded. // Should be empty if the upload was not multipart. // (optional) - repeated CompletedParts completed_parts = 4; + repeated CompletedPart completed_parts = 4; } message FinishObjectStagingResponse { From d7a0f48e1634c3e3d1b7e768f205214b24947c66 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 24 Oct 2023 13:55:25 +0200 Subject: [PATCH 05/14] refactor: Make license fields in UpdateObjectRequest optional --- aruna/api/storage/services/v2/object_service.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aruna/api/storage/services/v2/object_service.proto b/aruna/api/storage/services/v2/object_service.proto index 40a5b552..67c9f5b5 100644 --- a/aruna/api/storage/services/v2/object_service.proto +++ b/aruna/api/storage/services/v2/object_service.proto @@ -241,8 +241,8 @@ message UpdateObjectRequest { repeated storage.models.v2.Hash hashes = 12; // Force new object revision bool force_revision = 13; - string metadata_license_tag = 14; - string data_license_tag = 15; + optional string metadata_license_tag = 14; + optional string data_license_tag = 15; } message UpdateObjectResponse { From 09845b1a2341ef54563053358cc998735f9777e0 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Wed, 25 Oct 2023 09:03:23 +0200 Subject: [PATCH 06/14] refactor: Use correct spelling of announcement --- .../services/v2/notification_service.proto | 6 ++--- .../storage/services/v2/info_service.proto | 26 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/aruna/api/notification/services/v2/notification_service.proto b/aruna/api/notification/services/v2/notification_service.proto index d0702e2a..4d940755 100644 --- a/aruna/api/notification/services/v2/notification_service.proto +++ b/aruna/api/notification/services/v2/notification_service.proto @@ -94,7 +94,7 @@ message CreateStreamConsumerRequest { oneof target { ResourceTarget resource = 1; string user = 2; - bool anouncements = 3; + bool announcements = 3; bool all = 4; } bool include_subresources = 5; @@ -156,7 +156,7 @@ message EventMessage { oneof message_variant { ResourceEvent resource_event = 1; UserEvent user_event = 2; - AnouncementEvent announcement_event = 3; + AnnouncementEvent announcement_event = 3; } } @@ -196,7 +196,7 @@ message NewPubkey { string pubkey = 1; } -message AnouncementEvent { +message AnnouncementEvent { oneof event_variant { string new_data_proxy_id = 1; string remove_data_proxy_id = 2; diff --git a/aruna/api/storage/services/v2/info_service.proto b/aruna/api/storage/services/v2/info_service.proto index 891c70ea..0e5b09a8 100644 --- a/aruna/api/storage/services/v2/info_service.proto +++ b/aruna/api/storage/services/v2/info_service.proto @@ -48,16 +48,16 @@ service StorageStatusService { } - rpc GetAnouncements(GetAnouncementsRequest) returns (GetAnouncementsResponse) { + rpc GetAnnouncements(GetAnnouncementsRequest) returns (GetAnnouncementsResponse) { option (google.api.http) = { - get : "/v2/info/anouncements" + get : "/v2/info/announcements" }; } - rpc SetAnouncements(SetAnouncementsRequest) returns (SetAnouncementsResponse) { + rpc SetAnnouncements(SetAnnouncementsRequest) returns (SetAnnouncementsResponse) { option (google.api.http) = { - post : "/v2/info/anouncements/set" + post : "/v2/info/announcements/set" body : "*" }; } @@ -121,24 +121,24 @@ message GetPubkeysResponse { } -message Anouncement { +message Announcement { string id = 1; string content = 2; google.protobuf.Timestamp created_at = 3; } -message GetAnouncementsRequest {} +message GetAnnouncementsRequest {} -message GetAnouncementsResponse { - repeated Anouncement anouncements = 1; +message GetAnnouncementsResponse { + repeated Announcement announcements = 1; } -message SetAnouncementsRequest { - repeated Anouncement anouncements_upsert = 1; - repeated string anouncements_delete = 2; +message SetAnnouncementsRequest { + repeated Announcement announcements_upsert = 1; + repeated string announcements_delete = 2; } -message SetAnouncementsResponse { - repeated Anouncement anouncements = 1; +message SetAnnouncementsResponse { + repeated Announcement announcements = 1; } \ No newline at end of file From ee8931cfa370b04ac25e160029af0150a22fd739 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Wed, 25 Oct 2023 15:15:50 +0200 Subject: [PATCH 07/14] refactor: Make licenses in Collection/Dataset creation optional As the licenses are inherited from top to bottom only a Project really needs the mandatory specification of a license on creation. All other subresources can just inherit the licenses from their parent if one or both are not defined in the request. --- aruna/api/storage/services/v2/collection_service.proto | 4 ++-- aruna/api/storage/services/v2/dataset_service.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aruna/api/storage/services/v2/collection_service.proto b/aruna/api/storage/services/v2/collection_service.proto index 1e09d1ec..64e3cb5d 100644 --- a/aruna/api/storage/services/v2/collection_service.proto +++ b/aruna/api/storage/services/v2/collection_service.proto @@ -151,8 +151,8 @@ message CreateCollectionRequest { oneof parent { string project_id = 6; } - string metadata_license_tag = 7; - string default_data_license_tag = 8; + optional string metadata_license_tag = 7; + optional string default_data_license_tag = 8; } message CreateCollectionResponse { diff --git a/aruna/api/storage/services/v2/dataset_service.proto b/aruna/api/storage/services/v2/dataset_service.proto index 705f2538..76e688bb 100644 --- a/aruna/api/storage/services/v2/dataset_service.proto +++ b/aruna/api/storage/services/v2/dataset_service.proto @@ -152,8 +152,8 @@ message CreateDatasetRequest { string project_id = 6; string collection_id = 7; } - string metadata_license_tag = 8; - string default_data_license_tag = 9; + optional string metadata_license_tag = 8; + optional string default_data_license_tag = 9; } message CreateDatasetResponse { From 0c48b68c2f1e5aeaac70a5c77fa0f2c2d5483534 Mon Sep 17 00:00:00 2001 From: lfbrehm <97600985+lfbrehm@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:25:07 +0200 Subject: [PATCH 08/14] feat: Finish hook trigger --- aruna/api/hooks/services/v2/hooks_service.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aruna/api/hooks/services/v2/hooks_service.proto b/aruna/api/hooks/services/v2/hooks_service.proto index 34052f4c..ef8233a2 100644 --- a/aruna/api/hooks/services/v2/hooks_service.proto +++ b/aruna/api/hooks/services/v2/hooks_service.proto @@ -56,10 +56,11 @@ service HooksService { enum TriggerType { TRIGGER_TYPE_UNSPECIFIED = 0; TRIGGER_TYPE_HOOK_ADDED = 1; - TRIGGER_TYPE_OBJECT_CREATED = 2; + TRIGGER_TYPE_RESOURCE_CREATED = 2; TRIGGER_TYPE_LABEL_ADDED = 3; TRIGGER_TYPE_STATIC_LABEL_ADDED = 4; TRIGGER_TYPE_HOOK_STATUS_CHANGED = 5; + TRIGGER_TYPE_OBJECT_FINISHED = 6; } @@ -73,7 +74,7 @@ message ExternalHook { string url = 1; Credentials credentials = 2; // If empty a basic JSON template will be used - optional string custom_template = 3; + optional string custom_template = 3; Method method = 5; // TODO: Optional request headers } From e56cca16c8b4ba3eadf6de2098ff94dc8514844d Mon Sep 17 00:00:00 2001 From: lfbrehm <97600985+lfbrehm@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:58:25 +0100 Subject: [PATCH 09/14] feat: DataReplication and Hook update --- .../api/hooks/services/v2/hooks_service.proto | 3 +- .../services/v2/datareplication_service.proto | 79 +++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 aruna/api/storage/services/v2/datareplication_service.proto diff --git a/aruna/api/hooks/services/v2/hooks_service.proto b/aruna/api/hooks/services/v2/hooks_service.proto index ef8233a2..7ca64012 100644 --- a/aruna/api/hooks/services/v2/hooks_service.proto +++ b/aruna/api/hooks/services/v2/hooks_service.proto @@ -48,7 +48,7 @@ service HooksService { } rpc HookCallback(HookCallbackRequest) returns (HookCallbackResponse) { option (google.api.http) = { - delete : "/v2/hook/callback" + patch : "/v2/hook/callback" }; } } @@ -76,7 +76,6 @@ message ExternalHook { // If empty a basic JSON template will be used optional string custom_template = 3; Method method = 5; - // TODO: Optional request headers } enum Method { diff --git a/aruna/api/storage/services/v2/datareplication_service.proto b/aruna/api/storage/services/v2/datareplication_service.proto new file mode 100644 index 00000000..62f18d7c --- /dev/null +++ b/aruna/api/storage/services/v2/datareplication_service.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; + +package aruna.api.storage.services.v2; +option go_package = "github.com/ArunaStorage/go-api/v2/aruna/api/storage/services/v2"; +option java_multiple_files = true; +option java_package = "com.github.ArunaStorage.java_api.aruna.api.storage.services.v2"; +option java_outer_classname = "DataReplicationService"; + +import "aruna/api/storage/models/v2/models.proto"; +import "google/api/annotations.proto"; + +// DataReplicationService +// +// Endpoint specific methods for syncing data +service DataReplicationService { + + // ReplicateProjectData + // + // Status: ALPHA + // + // Replicates the (full) project data from one endpoint to another + rpc ReplicateProjectData(ReplicateProjectDataRequest) + returns (ReplicateProjectDataResponse) { + option (google.api.http) = { + post : "/v2/endpoint/{endpoint_id}/replication/project/{project_id}" + body: "*" + }; + } + + // PartialReplicateData + // + // Status: ALPHA + // + // Partial replicate data between endpoints + rpc PartialReplicateData(PartialReplicateDataRequest) + returns (PartialReplicateDataResponse) { + option (google.api.http) = { + post : "/v2/endpoint/{endpoint_id}/replication/partial/{resource_id}" + body: "*" + }; + } + + // UpdateReplicationStatus + // + // Status: ALPHA + // + // Update the replication status of a project + rpc UpdateReplicationStatus(UpdateReplicationStatusRequest) + returns (UpdateReplicationStatusResponse) { + option (google.api.http) = { + patch : "/v2/endpoint/{endpoint_id}/replication/status/{resource_id}" + body: "*" + }; + } + + // GetReplicationStatus + // + // Status: ALPHA + // + // Get the replication status of a project + rpc GetReplicationStatus(GetReplicationStatusRequest) + returns (GetReplicationStatusResponse) { + option (google.api.http) = { + get : "/v2/endpoint/{endpoint_id}/replication/status/{resource_id}" + }; + } + + // DeleteReplication + // + // Status: ALPHA + // + // Delete the replication status of a project + rpc DeleteReplication(DeleteReplicationRequest) + returns (DeleteReplicationResponse) { + option (google.api.http) = { + delete : "/v2/endpoint/{endpoint_id}/replication/{resource_id}" + }; + } +} From 68bc9e35fd60e771fbf483ef9748d2e1e3965b0e Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 31 Oct 2023 11:01:01 +0100 Subject: [PATCH 10/14] feat: Add messages to DataReplicationService --- ...e.proto => data_replication_service.proto} | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) rename aruna/api/storage/services/v2/{datareplication_service.proto => data_replication_service.proto} (68%) diff --git a/aruna/api/storage/services/v2/datareplication_service.proto b/aruna/api/storage/services/v2/data_replication_service.proto similarity index 68% rename from aruna/api/storage/services/v2/datareplication_service.proto rename to aruna/api/storage/services/v2/data_replication_service.proto index 62f18d7c..2b5225cc 100644 --- a/aruna/api/storage/services/v2/datareplication_service.proto +++ b/aruna/api/storage/services/v2/data_replication_service.proto @@ -77,3 +77,56 @@ service DataReplicationService { }; } } + +enum ReplicationStatus { + REPLICATION_STATUS_UNSPECIFIED = 0; + REPLICATION_STATUS_WAITING = 1; + REPLICATION_STATUS_RUNNING = 2; + REPLICATION_STATUS_FINISHED = 3; + REPLICATION_STATUS_ERROR = 4; +} + +message ReplicateProjectDataRequest { + string project_id = 1; + string endpoint_id = 2; +} + +message ReplicateProjectDataResponse { + ReplicationStatus status = 1; +} + +message PartialReplicateDataRequest { + oneof response { + string collection_id = 1; + string dataset_id = 2; + string object_id = 3; + } + string endpoint_id = 4; +} + +message PartialReplicateDataResponse { + ReplicationStatus status = 1; +} + +message UpdateReplicationStatusRequest { + string resource_id = 1; + string endpoint_id = 2; + ReplicationStatus status = 3; +} + +message UpdateReplicationStatusResponse {} + +message GetReplicationStatusRequest { + string resource_id = 1; +} + +message GetReplicationStatusResponse { + ReplicationStatus status = 1; +} + +message DeleteReplicationRequest { + string resource_id = 1; + string endpoint_id = 2; +} + +message DeleteReplicationResponse {} From aaf7c62a8ffead4e777e322f229f9736752ae6f1 Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 31 Oct 2023 12:54:15 +0100 Subject: [PATCH 11/14] refactor: CreateWorkspaceTemplateRequest field name --- aruna/api/storage/services/v2/workspace_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aruna/api/storage/services/v2/workspace_service.proto b/aruna/api/storage/services/v2/workspace_service.proto index f69d4fd4..41ebd0ca 100644 --- a/aruna/api/storage/services/v2/workspace_service.proto +++ b/aruna/api/storage/services/v2/workspace_service.proto @@ -114,7 +114,7 @@ message CreateWorkspaceTemplateRequest { // Description of the workspace string description = 6; // Endpoint ids that are used for this template - repeated string endpoint_id = 7; + repeated string endpoint_ids = 7; } message CreateWorkspaceTemplateResponse { From caa2c324571c31791ae79983324712fe42da5e2a Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Tue, 31 Oct 2023 13:04:15 +0100 Subject: [PATCH 12/14] chore: Remove unsued models import --- aruna/api/storage/services/v2/data_replication_service.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/aruna/api/storage/services/v2/data_replication_service.proto b/aruna/api/storage/services/v2/data_replication_service.proto index 2b5225cc..02cb6b08 100644 --- a/aruna/api/storage/services/v2/data_replication_service.proto +++ b/aruna/api/storage/services/v2/data_replication_service.proto @@ -6,7 +6,6 @@ option java_multiple_files = true; option java_package = "com.github.ArunaStorage.java_api.aruna.api.storage.services.v2"; option java_outer_classname = "DataReplicationService"; -import "aruna/api/storage/models/v2/models.proto"; import "google/api/annotations.proto"; // DataReplicationService From 655c37399f3900ba9c3cd892ce6508b7a28f47e8 Mon Sep 17 00:00:00 2001 From: lfbrehm <97600985+lfbrehm@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:13:29 +0100 Subject: [PATCH 13/14] feat: HookTriggers and Filters --- README.md | 4 ++-- .../api/hooks/services/v2/hooks_service.proto | 23 +++++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8a66c537..1d53b48c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The API contains three main sections: ### Storage -The storage section is divided in two sub-sections: +The storage section is divided in two subsections: - [Models](aruna/api/storage/models/v1): This section contains the models that are used by the storage system. @@ -33,7 +33,7 @@ The Notification section provides a set of RPCs that are used to interact with t ### Internal -This contains definitions for internal APIs that are used by different (micro) services internally. These endpoints are not exposed to external users. Currently the main use is the interaction with the storage proxy that bundles multiple storage methods (S3, local file system etc.) in one service that provides stable pre-authenticated up- and download URLs for users. +This contains definitions for internal APIs that are used by different (micro) services internally. These endpoints are not exposed to external users. Currently, the main use is the interaction with the storage proxy that bundles multiple storage methods (S3, local file system etc.) in one service that provides stable pre-authenticated up- and download URLs for users. diff --git a/aruna/api/hooks/services/v2/hooks_service.proto b/aruna/api/hooks/services/v2/hooks_service.proto index 7ca64012..2b6e95db 100644 --- a/aruna/api/hooks/services/v2/hooks_service.proto +++ b/aruna/api/hooks/services/v2/hooks_service.proto @@ -66,8 +66,7 @@ enum TriggerType { message Trigger { TriggerType trigger_type = 1; - string key = 2; - string value = 3; + repeated Filter filters = 2; } message ExternalHook { @@ -96,9 +95,9 @@ message AddHook { message InternalHook { oneof internal_action { - AddLabel add_label = 1; - AddHook add_hook = 2; - storage.models.v2.Relation add_relation = 3; + AddLabel add_label = 1; + AddHook add_hook = 2; + storage.models.v2.Relation add_relation = 3; } } @@ -114,6 +113,16 @@ message Credentials { string token = 1; } +message Filter { + oneof filter_variant { + // Regex that matches name field + string name = 1; + // Regex that matches key AND value + storage.models.v2.KeyValue key_value = 2; + // TODO: ObjectType & ObjectStatus + } +} + message CreateHookRequest { string name = 1; Trigger trigger = 2; @@ -134,8 +143,8 @@ message DeleteHookResponse {} message HookCallbackRequest { oneof status { - Finished finished = 1; - Error error = 2; + Finished finished = 1; + Error error = 2; }; string secret = 3; string hook_id = 4; From dd94ea34f578f739fe6e1c6eb5a68e2da3f8788f Mon Sep 17 00:00:00 2001 From: Jannis Hochmuth Date: Wed, 1 Nov 2023 15:26:44 +0100 Subject: [PATCH 14/14] refactor: Consistent endpoint naming --- .../services/v2/bundler_service.proto | 4 +-- .../services/v2/dataproxy_service.proto | 2 +- .../api/hooks/services/v2/hooks_service.proto | 10 +++--- .../services/v2/notification_service.proto | 4 +-- .../services/v2/authorization_service.proto | 10 +++--- .../services/v2/collection_service.proto | 18 +++++------ .../v2/data_replication_service.proto | 10 +++--- .../storage/services/v2/dataset_service.proto | 18 +++++------ .../services/v2/endpoint_service.proto | 10 +++--- .../storage/services/v2/license_service.proto | 4 +-- .../storage/services/v2/object_service.proto | 14 ++++----- .../storage/services/v2/project_service.proto | 18 +++++------ .../services/v2/relations_service.proto | 4 +-- .../storage/services/v2/search_service.proto | 4 +-- .../services/v2/service_account_service.proto | 31 ++++++++++--------- .../storage/services/v2/user_service.proto | 18 +++++------ .../services/v2/workspace_service.proto | 14 ++++----- 17 files changed, 97 insertions(+), 96 deletions(-) diff --git a/aruna/api/dataproxy/services/v2/bundler_service.proto b/aruna/api/dataproxy/services/v2/bundler_service.proto index 852d13fd..89c37ad6 100644 --- a/aruna/api/dataproxy/services/v2/bundler_service.proto +++ b/aruna/api/dataproxy/services/v2/bundler_service.proto @@ -15,13 +15,13 @@ service BundlerService { option (google.api.api_visibility).restriction = "PROXY"; rpc CreateBundle(CreateBundleRequest) returns (CreateBundleResponse) { option (google.api.http) = { - post : "/v2/bundle" + post : "/v2/bundles" body : "*" }; } rpc DeleteBundle(DeleteBundleRequest) returns (DeleteBundleResponse) { option (google.api.http) = { - delete : "/v2/bundle" + delete : "/v2/bundles/{bundle_id}" body : "*" }; } diff --git a/aruna/api/dataproxy/services/v2/dataproxy_service.proto b/aruna/api/dataproxy/services/v2/dataproxy_service.proto index c613e519..b3a92d87 100644 --- a/aruna/api/dataproxy/services/v2/dataproxy_service.proto +++ b/aruna/api/dataproxy/services/v2/dataproxy_service.proto @@ -86,7 +86,7 @@ service DataproxyUserService { // Status of the previous replication request rpc ReplicationStatus(ReplicationStatusRequest) returns (ReplicationStatusResponse) { option (google.api.http) = { - get : "/v2/replica/status" + get : "/v2/replica/{replication_id}/status" }; } } diff --git a/aruna/api/hooks/services/v2/hooks_service.proto b/aruna/api/hooks/services/v2/hooks_service.proto index 2b6e95db..fb33b5fc 100644 --- a/aruna/api/hooks/services/v2/hooks_service.proto +++ b/aruna/api/hooks/services/v2/hooks_service.proto @@ -21,19 +21,19 @@ service HooksService { // Created Hooks are always associated with the owner that creates the hook rpc CreateHook(CreateHookRequest) returns (CreateHookResponse) { option (google.api.http) = { - post : "/v2/hook" + post : "/v2/hooks" body : "*" }; } rpc AddProjectsToHook(AddProjectsToHookRequest) returns (AddProjectsToHookResponse) { option (google.api.http) = { - post : "/v2/hook/{hook_id}" + post : "/v2/hooks/{hook_id}" body : "*" }; } rpc ListProjectHooks(ListProjectHooksRequest) returns (ListProjectHooksResponse) { option (google.api.http) = { - get : "/v2/hooks/project/{project_id}" + get : "/v2/hooks/projects/{project_id}" }; } rpc ListOwnedHooks(ListOwnedHooksRequest) returns (ListOwnedHooksResponse) { @@ -43,12 +43,12 @@ service HooksService { } rpc DeleteHook(DeleteHookRequest) returns (DeleteHookResponse) { option (google.api.http) = { - delete : "/v2/hook/{hook_id}" + delete : "/v2/hooks/{hook_id}" }; } rpc HookCallback(HookCallbackRequest) returns (HookCallbackResponse) { option (google.api.http) = { - patch : "/v2/hook/callback" + patch : "/v2/hooks/callback" }; } } diff --git a/aruna/api/notification/services/v2/notification_service.proto b/aruna/api/notification/services/v2/notification_service.proto index 4d940755..c7925a92 100644 --- a/aruna/api/notification/services/v2/notification_service.proto +++ b/aruna/api/notification/services/v2/notification_service.proto @@ -25,7 +25,7 @@ service EventNotificationService { rpc CreateStreamConsumer(CreateStreamConsumerRequest) returns (CreateStreamConsumerResponse) { option (google.api.http) = { - post : "/v2/notifications/consumer" + post : "/v2/notifications/consumers" body : "*" }; } @@ -61,7 +61,7 @@ service EventNotificationService { rpc AcknowledgeMessageBatch(AcknowledgeMessageBatchRequest) returns (AcknowledgeMessageBatchResponse) { option (google.api.http) = { - patch : "/v2/notifications/ack" + patch : "/v2/notifications/acknowledge" body: "*" }; } diff --git a/aruna/api/storage/services/v2/authorization_service.proto b/aruna/api/storage/services/v2/authorization_service.proto index 6a74eafb..475faf7e 100644 --- a/aruna/api/storage/services/v2/authorization_service.proto +++ b/aruna/api/storage/services/v2/authorization_service.proto @@ -21,7 +21,7 @@ service AuthorizationService { rpc CreateAuthorization(CreateAuthorizationRequest) returns (CreateAuthorizationResponse) { option (google.api.http) = { - post : "/v2/auth" + post : "/v2/authorizations" body : "*" }; } @@ -34,7 +34,7 @@ service AuthorizationService { rpc GetAuthorizations(GetAuthorizationsRequest) returns (GetAuthorizationsResponse) { option (google.api.http) = { - get : "/v2/auths" + get : "/v2/authorizations/{resource_id}" }; } @@ -43,12 +43,12 @@ service AuthorizationService { // // Status: BETA // - // This creates a user-specific attribute that handles permission for a + // This deletes a user-specific attribute that handles permission for a // specific resource rpc DeleteAuthorization(DeleteAuthorizationRequest) returns (DeleteAuthorizationResponse) { option (google.api.http) = { - delete : "/v2/auth" + delete : "/v2/authorizations/{resource_id}" body : "*" }; } @@ -62,7 +62,7 @@ service AuthorizationService { rpc UpdateAuthorization(UpdateAuthorizationRequest) returns (UpdateAuthorizationResponse) { option (google.api.http) = { - patch : "/v2/auth" + patch : "/v2/authorizations/{resource_id}" body : "*" }; } diff --git a/aruna/api/storage/services/v2/collection_service.proto b/aruna/api/storage/services/v2/collection_service.proto index 64e3cb5d..c36ac976 100644 --- a/aruna/api/storage/services/v2/collection_service.proto +++ b/aruna/api/storage/services/v2/collection_service.proto @@ -23,7 +23,7 @@ service CollectionService { rpc CreateCollection(CreateCollectionRequest) returns (CreateCollectionResponse) { option (google.api.http) = { - post : "/v2/collection" + post : "/v2/collections" body : "*" }; } @@ -36,7 +36,7 @@ service CollectionService { rpc GetCollection(GetCollectionRequest) returns (GetCollectionResponse) { option (google.api.http) = { - get : "/v2/collection/{collection_id}" + get : "/v2/collections/{collection_id}" }; } @@ -59,7 +59,7 @@ service CollectionService { rpc DeleteCollection(DeleteCollectionRequest) returns (DeleteCollectionResponse) { option (google.api.http) = { - delete : "/v2/collection/{collection_id}" + delete : "/v2/collections/{collection_id}" }; } @@ -70,7 +70,7 @@ service CollectionService { // Updates the collection name. Caveat! Will rename the "s3 bucket" for data proxies! rpc UpdateCollectionName(UpdateCollectionNameRequest) returns (UpdateCollectionNameResponse) { option (google.api.http) = { - patch : "/v2/collection/{collection_id}/name" + patch : "/v2/collections/{collection_id}/name" body : "*" }; } @@ -82,7 +82,7 @@ service CollectionService { // Updates the collection description. rpc UpdateCollectionDescription(UpdateCollectionDescriptionRequest) returns (UpdateCollectionDescriptionResponse) { option (google.api.http) = { - patch : "/v2/collection/{collection_id}/description" + patch : "/v2/collections/{collection_id}/description" body : "*" }; } @@ -94,7 +94,7 @@ service CollectionService { // Updates the collection key values. rpc UpdateCollectionKeyValues(UpdateCollectionKeyValuesRequest) returns (UpdateCollectionKeyValuesResponse) { option (google.api.http) = { - patch : "/v2/collection/{collection_id}/key_values" + patch : "/v2/collections/{collection_id}/key_values" body : "*" }; } @@ -106,7 +106,7 @@ service CollectionService { // Updates the collection name. All (meta) data will be overwritten. rpc UpdateCollectionDataClass(UpdateCollectionDataClassRequest) returns (UpdateCollectionDataClassResponse) { option (google.api.http) = { - patch : "/v2/collection/{collection_id}/data_class" + patch : "/v2/collections/{collection_id}/data_class" body : "*" }; } @@ -118,7 +118,7 @@ service CollectionService { // Archives the full collection, rendering all downstream relations immutable rpc SnapshotCollection(SnapshotCollectionRequest) returns (SnapshotCollectionResponse) { option (google.api.http) = { - post : "/v2/collection/{collection_id}/snapshot" + post : "/v2/collections/{collection_id}/snapshot" body : "*" }; } @@ -130,7 +130,7 @@ service CollectionService { // Updates the collections metadata license and/or default data license. rpc UpdateCollectionLicenses(UpdateCollectionLicensesRequest) returns (UpdateCollectionLicensesResponse) { option (google.api.http) = { - patch : "/v2/collection/{collection_id}/licenses" + patch : "/v2/collections/{collection_id}/licenses" body : "*" }; } diff --git a/aruna/api/storage/services/v2/data_replication_service.proto b/aruna/api/storage/services/v2/data_replication_service.proto index 02cb6b08..c87593c6 100644 --- a/aruna/api/storage/services/v2/data_replication_service.proto +++ b/aruna/api/storage/services/v2/data_replication_service.proto @@ -21,7 +21,7 @@ service DataReplicationService { rpc ReplicateProjectData(ReplicateProjectDataRequest) returns (ReplicateProjectDataResponse) { option (google.api.http) = { - post : "/v2/endpoint/{endpoint_id}/replication/project/{project_id}" + post : "/v2/endpoints/{endpoint_id}/replication/{project_id}" body: "*" }; } @@ -34,7 +34,7 @@ service DataReplicationService { rpc PartialReplicateData(PartialReplicateDataRequest) returns (PartialReplicateDataResponse) { option (google.api.http) = { - post : "/v2/endpoint/{endpoint_id}/replication/partial/{resource_id}" + post : "/v2/endpoints/{endpoint_id}/replication/{resource_id}/partial" body: "*" }; } @@ -47,7 +47,7 @@ service DataReplicationService { rpc UpdateReplicationStatus(UpdateReplicationStatusRequest) returns (UpdateReplicationStatusResponse) { option (google.api.http) = { - patch : "/v2/endpoint/{endpoint_id}/replication/status/{resource_id}" + patch : "/v2/endpoints/{endpoint_id}/replication/{resource_id}/status" body: "*" }; } @@ -60,7 +60,7 @@ service DataReplicationService { rpc GetReplicationStatus(GetReplicationStatusRequest) returns (GetReplicationStatusResponse) { option (google.api.http) = { - get : "/v2/endpoint/{endpoint_id}/replication/status/{resource_id}" + get : "/v2/endpoints/{endpoint_id}/replication/{resource_id}/status" }; } @@ -72,7 +72,7 @@ service DataReplicationService { rpc DeleteReplication(DeleteReplicationRequest) returns (DeleteReplicationResponse) { option (google.api.http) = { - delete : "/v2/endpoint/{endpoint_id}/replication/{resource_id}" + delete : "/v2/endpoints/{endpoint_id}/replication/{resource_id}" }; } } diff --git a/aruna/api/storage/services/v2/dataset_service.proto b/aruna/api/storage/services/v2/dataset_service.proto index 76e688bb..fa654d4b 100644 --- a/aruna/api/storage/services/v2/dataset_service.proto +++ b/aruna/api/storage/services/v2/dataset_service.proto @@ -23,7 +23,7 @@ service DatasetService { rpc CreateDataset(CreateDatasetRequest) returns (CreateDatasetResponse) { option (google.api.http) = { - post : "/v2/dataset" + post : "/v2/datasets" body : "*" }; } @@ -36,7 +36,7 @@ service DatasetService { rpc GetDataset(GetDatasetRequest) returns (GetDatasetResponse) { option (google.api.http) = { - get : "/v2/dataset/{dataset_id}" + get : "/v2/datasets/{dataset_id}" }; } @@ -59,7 +59,7 @@ service DatasetService { rpc DeleteDataset(DeleteDatasetRequest) returns (DeleteDatasetResponse) { option (google.api.http) = { - delete : "/v2/dataset/{dataset_id}" + delete : "/v2/datasets/{dataset_id}" }; } @@ -70,7 +70,7 @@ service DatasetService { // Updates the dataset name. Caveat! Will rename the "s3 bucket" for data proxies! rpc UpdateDatasetName(UpdateDatasetNameRequest) returns (UpdateDatasetNameResponse) { option (google.api.http) = { - patch : "/v2/dataset/{dataset_id}/name" + patch : "/v2/datasets/{dataset_id}/name" body : "*" }; } @@ -82,7 +82,7 @@ service DatasetService { // Updates the dataset description. rpc UpdateDatasetDescription(UpdateDatasetDescriptionRequest) returns (UpdateDatasetDescriptionResponse) { option (google.api.http) = { - patch : "/v2/dataset/{dataset_id}/description" + patch : "/v2/datasets/{dataset_id}/description" body : "*" }; } @@ -94,7 +94,7 @@ service DatasetService { // Updates the dataset key values. rpc UpdateDatasetKeyValues(UpdateDatasetKeyValuesRequest) returns (UpdateDatasetKeyValuesResponse) { option (google.api.http) = { - patch : "/v2/dataset/{dataset_id}/key_values" + patch : "/v2/datasets/{dataset_id}/key_values" body : "*" }; } @@ -106,7 +106,7 @@ service DatasetService { // Updates the dataset name. All (meta) data will be overwritten. rpc UpdateDatasetDataClass(UpdateDatasetDataClassRequest) returns (UpdateDatasetDataClassResponse) { option (google.api.http) = { - patch : "/v2/dataset/{dataset_id}/data_class" + patch : "/v2/datasets/{dataset_id}/data_class" body : "*" }; } @@ -118,7 +118,7 @@ service DatasetService { // Archives the full dataset, rendering all downstream relations immutable rpc SnapshotDataset(SnapshotDatasetRequest) returns (SnapshotDatasetResponse) { option (google.api.http) = { - post : "/v2/dataset/{dataset_id}/snapshot" + post : "/v2/datasets/{dataset_id}/snapshot" body : "*" }; } @@ -130,7 +130,7 @@ service DatasetService { // Updates the dataset metadata license and/or default data license. rpc UpdateDatasetLicenses(UpdateDatasetLicensesRequest) returns (UpdateDatasetLicensesResponse) { option (google.api.http) = { - patch : "/v2/dataset/{dataset_id}/licenses" + patch : "/v2/datasets/{dataset_id}/licenses" body : "*" }; } diff --git a/aruna/api/storage/services/v2/endpoint_service.proto b/aruna/api/storage/services/v2/endpoint_service.proto index 2532c728..fd88f906 100644 --- a/aruna/api/storage/services/v2/endpoint_service.proto +++ b/aruna/api/storage/services/v2/endpoint_service.proto @@ -24,7 +24,7 @@ service EndpointService { // Needs admin permissions rpc CreateEndpoint(CreateEndpointRequest) returns (CreateEndpointResponse) { option (google.api.http) = { - post : "/v2/endpoint" + post : "/v2/endpoints" body : "*" }; } @@ -37,7 +37,7 @@ service EndpointService { // Requests a full sync of all endpoint related data rpc FullSyncEndpoint(FullSyncEndpointRequest) returns (stream FullSyncEndpointResponse) { option (google.api.http) = { - get : "/v2/endpoint/sync" + get : "/v2/endpoints/sync" }; } @@ -48,7 +48,7 @@ service EndpointService { // Gets an specific endpoint by ID or Name rpc GetEndpoint(GetEndpointRequest) returns (GetEndpointResponse) { option (google.api.http) = { - get : "/v2/endpoint" + get : "/v2/endpoints/{endpoint_id}" }; } @@ -71,7 +71,7 @@ service EndpointService { // This needs admin permissions rpc DeleteEndpoint(DeleteEndpointRequest) returns (DeleteEndpointResponse) { option (google.api.http) = { - delete : "/v2/endpoint/{endpoint_id}" + delete : "/v2/endpoints/{endpoint_id}" }; } @@ -84,7 +84,7 @@ service EndpointService { rpc GetDefaultEndpoint(GetDefaultEndpointRequest) returns (GetDefaultEndpointResponse) { option (google.api.http) = { - get : "/v2/endpoint/default" + get : "/v2/endpoints/default" }; } } diff --git a/aruna/api/storage/services/v2/license_service.proto b/aruna/api/storage/services/v2/license_service.proto index 665025d6..dbce255e 100644 --- a/aruna/api/storage/services/v2/license_service.proto +++ b/aruna/api/storage/services/v2/license_service.proto @@ -21,7 +21,7 @@ service LicenseService { // This creates a new license rpc CreateLicense(CreateLicenseRequest) returns (CreateLicenseResponse) { option (google.api.http) = { - post : "/v2/license" + post : "/v2/licenses" body : "*" }; } @@ -33,7 +33,7 @@ service LicenseService { // This returns the license for a given tag rpc GetLicense(GetLicenseRequest) returns (GetLicenseResponse) { option (google.api.http) = { - get : "/v2/license/{tag}" + get : "/v2/licenses/{tag}" }; } diff --git a/aruna/api/storage/services/v2/object_service.proto b/aruna/api/storage/services/v2/object_service.proto index 67c9f5b5..eacd8b3b 100644 --- a/aruna/api/storage/services/v2/object_service.proto +++ b/aruna/api/storage/services/v2/object_service.proto @@ -26,7 +26,7 @@ service ObjectService { rpc CreateObject(CreateObjectRequest) returns (CreateObjectResponse) { option (google.api.http) = { - post : "/v2/object" + post : "/v2/objects" body : "*" }; } @@ -41,7 +41,7 @@ service ObjectService { // part of the file / multipart upload. rpc GetUploadURL(GetUploadURLRequest) returns (GetUploadURLResponse) { option (google.api.http) = { - get : "/v2/object/{object_id}/upload" + get : "/v2/objects/{object_id}/upload" }; } @@ -53,7 +53,7 @@ service ObjectService { // will return a url that can be used to download a file from S3. rpc GetDownloadURL(GetDownloadURLRequest) returns (GetDownloadURLResponse) { option (google.api.http) = { - get : "/v2/object/{object_id}/download" + get : "/v2/objects/{object_id}/download" }; } @@ -65,7 +65,7 @@ service ObjectService { rpc FinishObjectStaging(FinishObjectStagingRequest) returns (FinishObjectStagingResponse) { option (google.api.http) = { - patch : "/v2/object/{object_id}/finish" + patch : "/v2/objects/{object_id}/finish" body : "*" }; } @@ -81,7 +81,7 @@ service ObjectService { // before they can be used. rpc UpdateObject(UpdateObjectRequest) returns (UpdateObjectResponse) { option (google.api.http) = { - post : "/v2/object/{object_id}" + post : "/v2/objects/{object_id}" body : "*" }; } @@ -107,7 +107,7 @@ service ObjectService { // Deletes the object with the complete revision history. rpc DeleteObject(DeleteObjectRequest) returns (DeleteObjectResponse) { option (google.api.http) = { - delete : "/v2/object/{object_id}" + delete : "/v2/objects/{object_id}" body : "*" }; } @@ -122,7 +122,7 @@ service ObjectService { // optional with_url boolean a download link can automatically be requested rpc GetObject(GetObjectRequest) returns (GetObjectResponse) { option (google.api.http) = { - get : "/v2/object/{object_id}" + get : "/v2/objects/{object_id}" }; } diff --git a/aruna/api/storage/services/v2/project_service.proto b/aruna/api/storage/services/v2/project_service.proto index cedae177..16eadb74 100644 --- a/aruna/api/storage/services/v2/project_service.proto +++ b/aruna/api/storage/services/v2/project_service.proto @@ -53,7 +53,7 @@ service ProjectService { // Creates a new project. All subsequent resources are part of a project. rpc CreateProject(CreateProjectRequest) returns (CreateProjectResponse) { option (google.api.http) = { - post : "/v2/project" + post : "/v2/projects" body : "*" }; } @@ -65,7 +65,7 @@ service ProjectService { // Requests a project (by id) rpc GetProject(GetProjectRequest) returns (GetProjectResponse) { option (google.api.http) = { - get : "/v2/project/{project_id}" + get : "/v2/projects/{project_id}" }; } @@ -87,7 +87,7 @@ service ProjectService { // Deletes the project and all its associated data. Must be empty! rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse) { option (google.api.http) = { - delete : "/v2/project/{project_id}" + delete : "/v2/projects/{project_id}" }; } @@ -98,7 +98,7 @@ service ProjectService { // Updates the project name. Caveat! Will rename the "s3 bucket" for data proxies! rpc UpdateProjectName(UpdateProjectNameRequest) returns (UpdateProjectNameResponse) { option (google.api.http) = { - patch : "/v2/project/{project_id}/name" + patch : "/v2/projects/{project_id}/name" body : "*" }; } @@ -110,7 +110,7 @@ service ProjectService { // Updates the project name. rpc UpdateProjectDescription(UpdateProjectDescriptionRequest) returns (UpdateProjectDescriptionResponse) { option (google.api.http) = { - patch : "/v2/project/{project_id}/description" + patch : "/v2/projects/{project_id}/description" body : "*" }; } @@ -122,7 +122,7 @@ service ProjectService { // Updates the project key values. rpc UpdateProjectKeyValues(UpdateProjectKeyValuesRequest) returns (UpdateProjectKeyValuesResponse) { option (google.api.http) = { - patch : "/v2/project/{project_id}/key_values" + patch : "/v2/projects/{project_id}/key_values" body : "*" }; } @@ -134,7 +134,7 @@ service ProjectService { // Updates the project name. All (meta) data will be overwritten. rpc UpdateProjectDataClass(UpdateProjectDataClassRequest) returns (UpdateProjectDataClassResponse) { option (google.api.http) = { - patch : "/v2/project/{project_id}/data_class" + patch : "/v2/projects/{project_id}/data_class" body : "*" }; } @@ -146,7 +146,7 @@ service ProjectService { // Updates the project license. All (meta) data will be overwritten. rpc UpdateProjectLicenses(UpdateProjectLicensesRequest) returns (UpdateProjectLicensesResponse) { option (google.api.http) = { - patch : "/v2/project/{project_id}/licenses" + patch : "/v2/projects/{project_id}/licenses" body : "*" }; } @@ -158,7 +158,7 @@ service ProjectService { // Archives the full project, rendering all downstream relations immutable rpc ArchiveProject(ArchiveProjectRequest) returns (ArchiveProjectResponse) { option (google.api.http) = { - post : "/v2/project/{project_id}/archive" + post : "/v2/projects/{project_id}/archive" body : "*" }; } diff --git a/aruna/api/storage/services/v2/relations_service.proto b/aruna/api/storage/services/v2/relations_service.proto index a44af298..e6b9a606 100644 --- a/aruna/api/storage/services/v2/relations_service.proto +++ b/aruna/api/storage/services/v2/relations_service.proto @@ -20,7 +20,7 @@ service RelationsService { rpc ModifyRelations(ModifyRelationsRequest) returns (ModifyRelationsResponse) { option (google.api.http) = { - post : "/v2/relation" + post : "/v2/relations" body : "*" }; } @@ -33,7 +33,7 @@ service RelationsService { rpc GetHierarchy(GetHierarchyRequest) returns (GetHierarchyResponse) { option (google.api.http) = { - get : "/v2/relation/hierarchy" + get : "/v2/relations/{resource_id}/hierarchy" }; } } diff --git a/aruna/api/storage/services/v2/search_service.proto b/aruna/api/storage/services/v2/search_service.proto index e9a5ddba..3d766f81 100644 --- a/aruna/api/storage/services/v2/search_service.proto +++ b/aruna/api/storage/services/v2/search_service.proto @@ -29,7 +29,7 @@ service SearchService { // Retrieves resource by its ID. rpc GetResource(GetResourceRequest) returns (GetResourceResponse){ option (google.api.http) = { - get : "/v2/resource/{resource_id}" + get : "/v2/resources/{resource_id}" }; } @@ -52,7 +52,7 @@ service SearchService { // Requests access to resources rpc RequestResourceAccess(RequestResourceAccessRequest) returns (RequestResourceAccessResponse){ option (google.api.http) = { - get : "/v2/resource/{resource_id}/access" + get : "/v2/resources/{resource_id}/access" }; } } diff --git a/aruna/api/storage/services/v2/service_account_service.proto b/aruna/api/storage/services/v2/service_account_service.proto index 62579785..dcdaca73 100644 --- a/aruna/api/storage/services/v2/service_account_service.proto +++ b/aruna/api/storage/services/v2/service_account_service.proto @@ -27,7 +27,7 @@ service ServiceAccountService { // it will be a global service account that can interact with any resource rpc CreateServiceAccount(CreateServiceAccountRequest) returns (CreateServiceAccountResponse){ option (google.api.http) = { - post : "/v2/service_account" + post : "/v2/service_accounts" body : "*" }; } @@ -41,7 +41,7 @@ service ServiceAccountService { // service account rpc CreateServiceAccountToken(CreateServiceAccountTokenRequest) returns (CreateServiceAccountTokenResponse){ option (google.api.http) = { - post : "/v2/service_account/{svc_account_id}/token" + post : "/v2/service_accounts/{svc_account_id}/tokens" body : "*" }; } @@ -53,7 +53,7 @@ service ServiceAccountService { // Overwrites the project specific permissions for a service account rpc SetServiceAccountPermission(SetServiceAccountPermissionRequest) returns (SetServiceAccountPermissionResponse){ option (google.api.http) = { - put : "/v2/service_account/{svc_account_id}/permissions" + put : "/v2/service_accounts/{svc_account_id}/permissions" body : "*" }; } @@ -66,7 +66,7 @@ service ServiceAccountService { // it will not contain the token itself. rpc GetServiceAccountToken(GetServiceAccountTokenRequest) returns (GetServiceAccountTokenResponse){ option (google.api.http) = { - get : "/v2/service_account/{svc_account_id}/token/{token_id}" + get : "/v2/service_accounts/{svc_account_id}/tokens/{token_id}" }; } @@ -78,7 +78,7 @@ service ServiceAccountService { // it will not contain the token itself. rpc GetServiceAccountTokens(GetServiceAccountTokensRequest) returns (GetServiceAccountTokensResponse){ option (google.api.http) = { - get : "/v2/service_account/{svc_account_id}/tokens" + get : "/v2/service_accounts/{svc_account_id}/tokens" }; } @@ -89,7 +89,7 @@ service ServiceAccountService { // Deletes one service account token by ID rpc DeleteServiceAccountToken(DeleteServiceAccountTokenRequest) returns (DeleteServiceAccountTokenResponse){ option (google.api.http) = { - delete : "/v2/service_account/{svc_account_id}/token/{token_id}" + delete : "/v2/service_accounts/{svc_account_id}/tokens/{token_id}" }; } @@ -100,7 +100,7 @@ service ServiceAccountService { // Deletes all service account tokens rpc DeleteServiceAccountTokens(DeleteServiceAccountTokensRequest) returns (DeleteServiceAccountTokensResponse){ option (google.api.http) = { - delete : "/v2/service_account/{svc_account_id}/tokens" + delete : "/v2/service_accounts/{svc_account_id}/tokens" }; } @@ -111,7 +111,7 @@ service ServiceAccountService { // Deletes a service account (by id) rpc DeleteServiceAccount(DeleteServiceAccountRequest) returns (DeleteServiceAccountResponse){ option (google.api.http) = { - delete : "/v2/service_account/{svc_account_id}" + delete : "/v2/service_accounts/{svc_account_id}" }; } @@ -123,7 +123,7 @@ service ServiceAccountService { rpc GetS3CredentialsSvcAccount(GetS3CredentialsSvcAccountRequest) returns (GetS3CredentialsSvcAccountResponse) { option (google.api.http) = { - get : "/v2/service_account/{svc_account_id}/s3_credentials" + get : "/v2/service_accounts/{svc_account_id}/s3_credentials" }; } @@ -133,10 +133,11 @@ service ServiceAccountService { // Status: ALPHA // // Gets token for a specific user and data_proxy - rpc GetDataproxyTokenSvcAccount(GetDataproxyTokenSvcAccountRequest) - returns (GetDataproxyTokenSvcAccountResponse) { + rpc CreateDataproxyTokenSvcAccount(CreateDataproxyTokenSvcAccountRequest) + returns (CreateDataproxyTokenSvcAccountResponse) { option (google.api.http) = { - get : "/v2/user/{user_id}/svc_proxy_token" + post : "/v2/service_accounts/{svc_account_id}/proxy_tokens/{endpoint_id}" + body : "*" }; } } @@ -233,12 +234,12 @@ message GetS3CredentialsSvcAccountResponse { } -message GetDataproxyTokenSvcAccountRequest { - string user_id = 1; +message CreateDataproxyTokenSvcAccountRequest { + string svc_account_id = 1; string endpoint_id = 2; storage.models.v2.Context context = 3; } -message GetDataproxyTokenSvcAccountResponse { +message CreateDataproxyTokenSvcAccountResponse { string token = 1; } diff --git a/aruna/api/storage/services/v2/user_service.proto b/aruna/api/storage/services/v2/user_service.proto index ab66d823..3faf28ec 100644 --- a/aruna/api/storage/services/v2/user_service.proto +++ b/aruna/api/storage/services/v2/user_service.proto @@ -61,7 +61,7 @@ service UserService { // Creates an API token to authenticate rpc CreateAPIToken(CreateAPITokenRequest) returns (CreateAPITokenResponse) { option (google.api.http) = { - post : "/v2/user/token" + post : "/v2/user/tokens" body : "*" }; } @@ -73,7 +73,7 @@ service UserService { // Returns one API token by id rpc GetAPIToken(GetAPITokenRequest) returns (GetAPITokenResponse) { option (google.api.http) = { - get : "/v2/user/token/{token_id}" + get : "/v2/user/tokens/{token_id}" }; } @@ -95,7 +95,7 @@ service UserService { // Deletes the specified API Token rpc DeleteAPIToken(DeleteAPITokenRequest) returns (DeleteAPITokenResponse) { option (google.api.http) = { - delete : "/v2/user/token/{token_id}" + delete : "/v2/user/tokens/{token_id}" }; } @@ -107,7 +107,7 @@ service UserService { rpc DeleteAPITokens(DeleteAPITokensRequest) returns (DeleteAPITokensResponse) { option (google.api.http) = { - delete : "/v2/user/tokens" + delete : "/v2/user/tokens/{token_id}" }; } @@ -132,7 +132,7 @@ service UserService { // Redacts personal information like name or email rpc GetUserRedacted(GetUserRedactedRequest) returns (GetUserRedactedResponse) { option (google.api.http) = { - get : "/v2/user/redacted" + get : "/v2/user/{user_id}/redacted" }; } @@ -157,7 +157,7 @@ service UserService { rpc UpdateUserEmail(UpdateUserEmailRequest) returns (UpdateUserEmailResponse) { option (google.api.http) = { - patch : "/v2/user/{user_id}/email" + patch : "/v2/user/email" body : "*" }; } @@ -170,7 +170,7 @@ service UserService { rpc GetNotActivatedUsers(GetNotActivatedUsersRequest) returns (GetNotActivatedUsersResponse) { option (google.api.http) = { - get : "/v2/user/not_activated" + get : "/v2/user/list/not_activated" }; } @@ -182,7 +182,7 @@ service UserService { rpc GetAllUsers(GetAllUsersRequest) returns (GetAllUsersResponse) { option (google.api.http) = { - get : "/v2/user/all" + get : "/v2/user/list" }; } @@ -231,7 +231,7 @@ service UserService { rpc AcknowledgePersonalNotifications(AcknowledgePersonalNotificationsRequest) returns (AcknowledgePersonalNotificationsResponse) { option (google.api.http) = { - get : "/v2/user/acknowledge" + get : "/v2/user/notifications/acknowledge" }; } diff --git a/aruna/api/storage/services/v2/workspace_service.proto b/aruna/api/storage/services/v2/workspace_service.proto index 41ebd0ca..6e639238 100644 --- a/aruna/api/storage/services/v2/workspace_service.proto +++ b/aruna/api/storage/services/v2/workspace_service.proto @@ -20,7 +20,7 @@ service WorkspaceService { rpc CreateWorkspaceTemplate(CreateWorkspaceTemplateRequest) returns (CreateWorkspaceTemplateResponse) { option (google.api.http) = { - post : "/v2/workspace/template" + post : "/v2/workspaces/templates" body : "*" }; } @@ -32,7 +32,7 @@ service WorkspaceService { rpc GetWorkspaceTemplate(GetWorkspaceTemplateRequest) returns (GetWorkspaceTemplateResponse) { option (google.api.http) = { - get: "/v2/workspace/template/{template_id}" + get: "/v2/workspaces/templates/{template_id}" }; } // ListOwnedWorkspaceTemplates @@ -43,7 +43,7 @@ service WorkspaceService { rpc ListOwnedWorkspaceTemplates(ListOwnedWorkspaceTemplatesRequest) returns (ListOwnedWorkspaceTemplatesResponse) { option (google.api.http) = { - get: "/v2/workspace/template" + get: "/v2/workspaces/templates" }; } // DeleteWorkspaceTemplates @@ -54,7 +54,7 @@ service WorkspaceService { rpc DeleteWorkspaceTemplate(DeleteWorkspaceTemplateRequest) returns (DeleteWorkspaceTemplateResponse) { option (google.api.http) = { - delete: "/v2/workspace/template/{template_id}" + delete: "/v2/workspaces/templates/{template_id}" body : "*" }; } @@ -67,7 +67,7 @@ service WorkspaceService { rpc CreateWorkspace(CreateWorkspaceRequest) returns (CreateWorkspaceResponse) { option (google.api.http) = { - post : "/v2/workspace" + post : "/v2/workspaces" body : "*" }; } @@ -81,7 +81,7 @@ service WorkspaceService { rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (DeleteWorkspaceResponse) { option (google.api.http) = { - delete : "/v2/workspace/{workspace_id}" + delete : "/v2/workspaces/{workspace_id}" body : "*" }; } @@ -94,7 +94,7 @@ service WorkspaceService { rpc ClaimWorkspace(ClaimWorkspaceRequest) returns (ClaimWorkspaceResponse) { option (google.api.http) = { - post : "/v2/workspace/{workspace_id}/claim" + post : "/v2/workspaces/{workspace_id}/claim" body : "*" }; }