You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/kubernetes/rest/serviceAccount.js

17 lines
479 B

import axios, { parseAxiosError } from '@/portainer/services/axios';
export async function getServiceAccounts(environmentId, namespaceId) {
try {
const {
data: { items },
} = await axios.get(urlBuilder(environmentId, namespaceId));
return items;
} catch (error) {
throw parseAxiosError(error);
}
}
function urlBuilder(environmentId, namespaceId) {
return `endpoints/${environmentId}/kubernetes/api/v1/namespaces/${namespaceId}/serviceaccounts`;
}