Add APIs + functions to get app. device-profiles and tags.

These API methods can be used to given an application id, retrieve
the list of used device-profiles and device tags.
This commit is contained in:
Orne Brocaar
2025-02-10 15:21:58 +00:00
parent 41d25ae2fb
commit e7644bb2d1
4 changed files with 254 additions and 2 deletions

View File

@ -427,6 +427,20 @@ service ApplicationService {
post : "/api/applications/{application_id}/integrations/mqtt/certificate"
};
}
// List device-profiles used within the given application.
rpc ListDeviceProfiles(ListApplicationDeviceProfilesRequest) returns (ListApplicationDeviceProfilesResponse) {
option (google.api.http) = {
get: "/api/applications/{application_id}/device-profiles"
};
}
// List device tags used within the given application.
rpc ListDeviceTags(ListApplicationDeviceTagsRequest) returns (ListApplicationDeviceTagsResponse) {
option (google.api.http) = {
get: "/api/applications/{application_id}/device-tags"
};
}
}
enum Encoding {
@ -1099,3 +1113,39 @@ message GenerateMqttIntegrationClientCertificateResponse {
// Expires at defines the expiration date of the certificate.
google.protobuf.Timestamp expires_at = 4;
}
message ApplicationDeviceProfileListItem {
// Device-profile ID (UUID).
string id = 1;
// Name.
string name = 2;
}
message ListApplicationDeviceProfilesRequest {
// Application ID (UUID).
string application_id = 1;
};
message ListApplicationDeviceProfilesResponse {
// Device-profiles.
repeated ApplicationDeviceProfileListItem result = 1;
}
message ApplicationDeviceTagListItem {
// Tag key.
string key = 1;
// Used values.
repeated string values = 2;
}
message ListApplicationDeviceTagsRequest {
// Application ID (UUID).
string application_id = 1;
}
message ListApplicationDeviceTagsResponse {
// Device tags.
repeated ApplicationDeviceTagListItem result = 1;
}