Files
threshold/internal/proto/controller/api/services/v1/scope_service.proto
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

135 lines
4.2 KiB
Protocol Buffer
Raw Normal View History

2020-07-22 00:14:28 -04:00
syntax = "proto3";
package controller.api.services.v1;
2020-08-10 17:15:02 -04:00
import "controller/api/resources/scopes/v1/scope.proto";
2020-07-22 00:14:28 -04:00
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
2020-08-10 17:15:02 -04:00
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Boundary Controller HTTP API"
}
schemes: HTTPS
schemes: HTTP
};
2020-07-22 00:14:28 -04:00
service ScopeService {
2020-07-22 00:14:28 -04:00
// GetScope returns a stored Scope if present. The provided request
// must include the scope ID for the scope being retrieved. If
// that ID is missing, malformed or references a non existing
2020-07-22 00:14:28 -04:00
// resource an error is returned.
rpc GetScope(GetScopeRequest) returns (GetScopeResponse) {
option (google.api.http) = {
get: "/v1/scopes/{id}"
response_body: "item"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single Scope."
2020-07-22 00:14:28 -04:00
};
}
// ListScopes returns a list of stored Scopes which exist inside the provided
// parent Scope id.
2020-07-22 00:14:28 -04:00
rpc ListScopes(ListScopesRequest) returns (ListScopesResponse) {
option (google.api.http) = {
get: "/v1/scopes"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all Scopes within the Scope provided in the request."
2020-07-22 00:14:28 -04:00
};
}
// CreateScope creates and stores a Scope in boundary. The provided request
// must include the Scope ID in which the new scope will be created. If the Scope
2020-07-22 00:14:28 -04:00
// ID is missing, malformed or references a non existing scope, an error is
// returned. If a name is provided that is in use in another Scope in the same
2020-07-22 00:14:28 -04:00
// parent scope, an error is returned.
rpc CreateScope(CreateScopeRequest) returns (CreateScopeResponse) {
option (google.api.http) = {
post: "/v1/scopes"
body: "item"
response_body: "item"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a single Scope."
2020-07-22 00:14:28 -04:00
};
}
// UpdateScope updates an existing Scope in boundary. The provided
// Scope must not have any read only fields set. The update mask must be
2020-07-22 00:14:28 -04:00
// included in the request and contain at least 1 mutable field. To unset
// a field's value, include the field in the update mask and don't set it
// in the provided scope. An error is returned if the Scope Id is
// missing or reference a non-existing resource. An error
2020-07-22 00:14:28 -04:00
// is also returned if the request attempts to update the name to one that is
// already in use by another scope in the parent scope.
2020-07-22 00:14:28 -04:00
rpc UpdateScope(UpdateScopeRequest) returns (UpdateScopeResponse) {
option (google.api.http) = {
patch: "/v1/scopes/{id}"
body: "item"
response_body: "item"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates a Scope."
2020-07-22 00:14:28 -04:00
};
}
// DeleteScope remotes a Scope and all child resources from Boundary. If the
// provided Scope IDs are malformed or not provided an error is returned.
2020-07-22 00:14:28 -04:00
rpc DeleteScope(DeleteScopeRequest) returns (DeleteScopeResponse) {
option (google.api.http) = {
delete: "/v1/scopes/{id}"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes a Scope."
2020-07-22 00:14:28 -04:00
};
}
}
message GetScopeRequest {
string id = 1;
}
message GetScopeResponse {
resources.scopes.v1.Scope item = 1;
}
message ListScopesRequest {
string scope_id = 1;
2021-01-25 19:37:40 -05:00
bool recursive = 20 [json_name = "recursive"];
2021-02-22 10:09:25 -07:00
string filter = 30 [json_name = "filter"];
2020-07-22 00:14:28 -04:00
}
message ListScopesResponse {
repeated resources.scopes.v1.Scope items = 1;
}
message CreateScopeRequest {
bool skip_admin_role_creation = 1;
bool skip_default_role_creation = 2;
resources.scopes.v1.Scope item = 3;
2020-07-22 00:14:28 -04:00
}
message CreateScopeResponse {
string uri = 1;
resources.scopes.v1.Scope item = 2;
}
message UpdateScopeRequest {
string id = 1;
resources.scopes.v1.Scope item = 2;
2020-09-26 08:30:27 -04:00
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
2020-07-22 00:14:28 -04:00
}
message UpdateScopeResponse {
resources.scopes.v1.Scope item = 1;
}
message DeleteScopeRequest {
string id = 1;
}
2020-09-08 23:57:26 -04:00
message DeleteScopeResponse {}