syntax = "proto3";

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

import "google/api/annotations.proto";
import "storage/node.proto";

package v1;

message ListNodesRequest {
    string cluster_id = 1;
}

message ListNodesResponse {
    repeated storage.Node nodes = 1;
}

message GetNodeRequest {
    string cluster_id = 1;
    string node_id = 2;
}

// storage.Node represents information about a node in the cluster.
service NodeService {

    rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) {
        option (google.api.http) = {
            get: "/v1/nodes/{cluster_id}"
        };
    }

    rpc GetNode(GetNodeRequest) returns (storage.Node) {
        option (google.api.http) = {
            get: "/v1/nodes/{cluster_id}/{node_id}"
        };
    }
}
