Add SNMP credential profiles
This commit is contained in:
@@ -10,6 +10,9 @@ import type {
|
||||
NotificationChannelCreate,
|
||||
NotificationChannelUpdate,
|
||||
PingMonitorCreate,
|
||||
SnmpCredentialProfile,
|
||||
SnmpCredentialProfileCreate,
|
||||
SnmpCredentialProfileUpdate,
|
||||
TcpMonitorCreate,
|
||||
User,
|
||||
WebsiteMonitorCreate,
|
||||
@@ -121,4 +124,19 @@ export const api = {
|
||||
request<void>(`/notifications/channels/${channelId}`, token, {
|
||||
method: "DELETE",
|
||||
}),
|
||||
snmpCredentialProfiles: (token: string) => request<SnmpCredentialProfile[]>("/credentials/snmp", token),
|
||||
createSnmpCredentialProfile: (token: string, payload: SnmpCredentialProfileCreate) =>
|
||||
request<SnmpCredentialProfile>("/credentials/snmp", token, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(payload),
|
||||
}),
|
||||
updateSnmpCredentialProfile: (token: string, profileId: number, payload: SnmpCredentialProfileUpdate) =>
|
||||
request<SnmpCredentialProfile>(`/credentials/snmp/${profileId}`, token, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(payload),
|
||||
}),
|
||||
deleteSnmpCredentialProfile: (token: string, profileId: number) =>
|
||||
request<void>(`/credentials/snmp/${profileId}`, token, {
|
||||
method: "DELETE",
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user