Skip to content

Commit

Permalink
change name to owner and move to api key spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkim committed May 13, 2024
1 parent 8355aa8 commit 553b152
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 6 additions & 10 deletions temporal/api/cloud/cloudservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ message GetAPIKeysRequest {
int32 page_size = 1;
// The page token if this is continuing from another response - optional.
string page_token = 2;
// Filter api keys by identity id - optional.
string identity_id = 3;
// Filter api keys by identity type - optional.
string identity_type = 4;
// Filter api keys by owner id - optional.
string owner_id = 3;
// Filter api keys by owner type - optional.
string owner_type = 4;
}

message GetAPIKeysResponse {
Expand All @@ -265,14 +265,10 @@ message GetAPIKeyResponse {
}

message CreateAPIKeyRequest {
// The id of the identity to create the API key for
string identity_id = 1;
// The type of the identity to create the API key for
string identity_type = 2;
// The spec for the API key to invite
temporal.api.cloud.identity.v1.APIKeySpec spec = 3;
temporal.api.cloud.identity.v1.APIKeySpec spec = 1;
// The id to use for this async operation - optional
string async_operation_id = 4;
string async_operation_id = 2;
}

message CreateAPIKeyResponse {
Expand Down
6 changes: 3 additions & 3 deletions temporal/api/cloud/cloudservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ service CloudService {
// Get an API key
rpc GetAPIKey (GetAPIKeyRequest) returns (GetAPIKeyResponse) {
option (google.api.http) = {
get: "/api/v1/cloud/api-keys/{api_key_id}",
get: "/api/v1/cloud/api-keys/{key_id}",
};
}

Expand All @@ -151,15 +151,15 @@ service CloudService {
// Update an API key
rpc UpdateAPIKey (UpdateAPIKeyRequest) returns (UpdateAPIKeyResponse) {
option (google.api.http) = {
post: "/api/v1/cloud/api-keys/{api_key_id}",
post: "/api/v1/cloud/api-keys/{key_id}",
body: "*"
};
}

// Delete an API key
rpc DeleteAPIKey (DeleteAPIKeyRequest) returns (DeleteAPIKeyResponse) {
option (google.api.http) = {
delete: "/api/v1/cloud/api-keys/{api_key_id}",
delete: "/api/v1/cloud/api-keys/{key_id}",
};
}
}
14 changes: 9 additions & 5 deletions temporal/api/cloud/identity/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,16 @@ message APIKey {
}

message APIKeySpec {
// The name of the API key
string name = 1;
// The id of the owner the api key belongs to
string owner_id = 1;
// The type of the owner the api key belongs to
string owner_type = 2;
// The display name of the API key
string display_name = 3;
// The description of the API key
string description = 2;
string description = 4;
// The expiry time of the API key
google.protobuf.Timestamp expiry_time = 3;
google.protobuf.Timestamp expiry_time = 5;
// True if the API key is disabled
bool disabled = 4;
bool disabled = 6;
}

0 comments on commit 553b152

Please sign in to comment.