Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.



Expand Down
4 changes: 2 additions & 2 deletions aruna/api/dataproxy/services/v2/bundler_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 : "*"
};
}
Expand Down
2 changes: 1 addition & 1 deletion aruna/api/dataproxy/services/v2/dataproxy_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion aruna/api/google
Submodule google updated 1126 files
27 changes: 27 additions & 0 deletions aruna/api/health/v2/health.proto
Original file line number Diff line number Diff line change
@@ -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);
}
39 changes: 24 additions & 15 deletions aruna/api/hooks/services/v2/hooks_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -43,39 +43,38 @@ 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) = {
delete : "/v2/hook/callback"
patch : "/v2/hooks/callback"
};
}
}

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;
}


message Trigger {
TriggerType trigger_type = 1;
string key = 2;
string value = 3;
repeated Filter filters = 2;
}

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
}

enum Method {
Expand All @@ -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;
}
}

Expand All @@ -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;
Expand All @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions aruna/api/notification/services/v2/notification_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ service EventNotificationService {
rpc CreateStreamConsumer(CreateStreamConsumerRequest)
returns (CreateStreamConsumerResponse) {
option (google.api.http) = {
post : "/v2/notifications/consumer"
post : "/v2/notifications/consumers"
body : "*"
};
}
Expand Down Expand Up @@ -61,7 +61,7 @@ service EventNotificationService {
rpc AcknowledgeMessageBatch(AcknowledgeMessageBatchRequest)
returns (AcknowledgeMessageBatchResponse) {
option (google.api.http) = {
patch : "/v2/notifications/ack"
patch : "/v2/notifications/acknowledge"
body: "*"
};
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions aruna/api/storage/services/v2/authorization_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ service AuthorizationService {
rpc CreateAuthorization(CreateAuthorizationRequest)
returns (CreateAuthorizationResponse) {
option (google.api.http) = {
post : "/v2/auth"
post : "/v2/authorizations"
body : "*"
};
}
Expand All @@ -34,7 +34,7 @@ service AuthorizationService {
rpc GetAuthorizations(GetAuthorizationsRequest)
returns (GetAuthorizationsResponse) {
option (google.api.http) = {
get : "/v2/auths"
get : "/v2/authorizations/{resource_id}"
};
}

Expand All @@ -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 : "*"
};
}
Expand All @@ -62,7 +62,7 @@ service AuthorizationService {
rpc UpdateAuthorization(UpdateAuthorizationRequest)
returns (UpdateAuthorizationResponse) {
option (google.api.http) = {
patch : "/v2/auth"
patch : "/v2/authorizations/{resource_id}"
body : "*"
};
}
Expand Down
22 changes: 11 additions & 11 deletions aruna/api/storage/services/v2/collection_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ service CollectionService {
rpc CreateCollection(CreateCollectionRequest)
returns (CreateCollectionResponse) {
option (google.api.http) = {
post : "/v2/collection"
post : "/v2/collections"
body : "*"
};
}
Expand All @@ -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}"
};
}

Expand All @@ -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}"
};
}

Expand All @@ -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 : "*"
};
}
Expand All @@ -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 : "*"
};
}
Expand All @@ -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 : "*"
};
}
Expand All @@ -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 : "*"
};
}
Expand All @@ -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 : "*"
};
}
Expand All @@ -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 : "*"
};
}
Expand All @@ -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 {
Expand Down
Loading