syntax = "proto3";
package api;
option go_package = "github.com/brocaar/chirpstack-api/go/v3/as/external/api";
option java_package = "io.chirpstack.api.as.external.api";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
import "as/external/api/profiles.proto";
// ServiceProfileService is the service managing service-profiles.
service ServiceProfileService {
// Create creates the given service-profile.
rpc Create(CreateServiceProfileRequest) returns (CreateServiceProfileResponse) {
option(google.api.http) = {
post: "/api/service-profiles"
body: "*"
};
}
// Get returns the service-profile matching the given id.
rpc Get(GetServiceProfileRequest) returns (GetServiceProfileResponse) {
option(google.api.http) = {
get: "/api/service-profiles/{id}"
};
}
// Update updates the given serviceprofile.
rpc Update(UpdateServiceProfileRequest) returns (google.protobuf.Empty) {
option(google.api.http) = {
put: "/api/service-profiles/{service_profile.id}"
body: "*"
};
}
// Delete deletes the service-profile matching the given id.
rpc Delete(DeleteServiceProfileRequest) returns (google.protobuf.Empty) {
option(google.api.http) = {
delete: "/api/service-profiles/{id}"
};
}
// List lists the available service-profiles.
rpc List(ListServiceProfileRequest) returns (ListServiceProfileResponse) {
option(google.api.http) = {
get: "/api/service-profiles"
};
}
}
message CreateServiceProfileRequest {
// Service-profile object to create.
ServiceProfile service_profile = 1;
}
message CreateServiceProfileResponse{
// Service-profile ID (UUID string).
string id = 1;
}
message GetServiceProfileRequest{
// Service-profile ID (UUID string).
string id = 1;
}
message GetServiceProfileResponse{
// Service-profile object.
ServiceProfile service_profile = 1;
// Created at timestamp.
google.protobuf.Timestamp created_at = 2;
// Last update timestamp.
google.protobuf.Timestamp updated_at = 3;
}
message UpdateServiceProfileRequest{
// Service-profile object to update.
ServiceProfile service_profile = 1;
}
message DeleteServiceProfileRequest{
// Service-profile ID (UUID string).
string id = 1;
}
message ListServiceProfileRequest{
// Max number of items to return.
int64 limit = 1;
// Offset in the result-set (for pagination).
int64 offset = 2;
// Organization id to filter on.
int64 organization_id = 3 [json_name = "organizationID"];
}
message ServiceProfileListItem {
// Service-profile ID (UUID string).
string id = 1;
// Service-profile name.
string name = 2;
// Organization ID of the service-profile.
int64 organization_id = 3 [json_name = "organizationID"];
// Network-server ID of the service-profile.
int64 network_server_id = 4 [json_name = "networkServerID"];
// Created at timestamp.
google.protobuf.Timestamp created_at = 5;
// Last update timestamp.
google.protobuf.Timestamp updated_at = 6;
// Network-server name of the service-profile.
string network_server_name = 7;
}
message ListServiceProfileResponse{
// Total number of service-profiles.
int64 total_count = 1;
repeated ServiceProfileListItem result = 2;
}