syntax = "proto3";

option go_package = "v1";
option java_package = "io.stackrox.proto.api.v1";

import "google/api/annotations.proto";
import "api/v1/common.proto";
import "api/v1/search_service.proto";
import "storage/secret.proto";

package v1;

// API specific objects.
////////////////////////

// A list of secrets (free of scoped information)
// Next Tag: 2
message SecretList {
    repeated storage.Secret secrets = 1;
}

// A list of secrets with their relationships.
// Next Tag: 2
message ListSecretsResponse {
    repeated storage.ListSecret secrets = 1;
}

service SecretService {

    rpc GetSecret (ResourceByID) returns (storage.Secret) {
        option (google.api.http) = {
            get: "/v1/secrets/{id}"
        };
    }

    rpc ListSecrets (RawQuery) returns (ListSecretsResponse) {
        option (google.api.http) = {
            get: "/v1/secrets"
        };
    }

}