Skip to content

Commit

Permalink
✨ Add GetEnvironment endpoint (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiasFrank authored Oct 16, 2024
1 parent 37ac774 commit 91ca9e2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/docs/api/platform-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
| /api.v1.environment.Service/Delete | [DeleteRequest](#api-v1-environment-DeleteRequest) | [DeleteResponse](#api-v1-environment-DeleteResponse) | |
| /api.v1.environment.Service/List | [ListRequest](#api-v1-environment-ListRequest) | [ListResponse](#api-v1-environment-ListResponse) | List available environments. |
| /api.v1.environment.Service/GetNamespaces | [GetNamespacesRequest](#api-v1-environment-GetNamespacesRequest) | [GetNamespacesResponse](#api-v1-environment-GetNamespacesResponse) | |
| /api.v1.environment.Service/Get | [GetRequest](#api-v1-environment-GetRequest) | [GetResponse](#api-v1-environment-GetResponse) | |



Expand Down Expand Up @@ -7501,6 +7502,36 @@ Environment model.



<a name="api-v1-environment-GetRequest"></a>

### GetRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| environment_id | [string](#string) | | |






<a name="api-v1-environment-GetResponse"></a>

### GetResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| environment | [Environment](#api-v1-environment-Environment) | | |






<a name="api-v1-environment-ListRequest"></a>

### ListRequest
Expand Down
1 change: 1 addition & 0 deletions pkg/rbac/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ var EnvironmentActionMap = map[string]string{
environmentconnect.ServiceGetNamespacesProcedure: ActionEnvironmentView,
environmentconnect.ServiceListProcedure: ActionEnvironmentView,
environmentconnect.ServiceUpdateProcedure: ActionEnvironmentEdit,
environmentconnect.ServiceGetProcedure: ActionEnvironmentView,
}

var MetricsActionMap = map[string]string{
Expand Down
9 changes: 9 additions & 0 deletions proto/rig/api/v1/environment/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ service Service {
// List available environments.
rpc List(ListRequest) returns (ListResponse) {}
rpc GetNamespaces(GetNamespacesRequest) returns (GetNamespacesResponse) {}
rpc Get(GetRequest) returns (GetResponse) {}
}

message CreateRequest {
Expand Down Expand Up @@ -85,3 +86,11 @@ message GetNamespacesRequest {
message GetNamespacesResponse {
repeated ProjectEnvironmentNamespace namespaces = 2;
}

message GetRequest {
string environment_id = 1;
}

message GetResponse {
api.v1.environment.Environment environment = 1;
}

0 comments on commit 91ca9e2

Please sign in to comment.