AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import {
AuthenticationResponse,
PlatformResponse,
UpdatePlatformRequestBody,
} from '@activepieces/shared';
import { api } from '@/lib/api';
import { authenticationSession } from '@/lib/authentication-session';
export const platformApi = {
createPlatform({ name }: { name: string }) {
return api.post<AuthenticationResponse>('/v1/platforms', { name });
},
deletePlatform() {
return api.delete<void>(
`/v1/platforms/${authenticationSession.getPlatformId()}`,
);
},
getCurrentPlatform() {
const platformId = authenticationSession.getPlatformId();
if (!platformId) {
throw Error('No platform id found');
}
return api.get<PlatformResponse>(`/v1/platforms/${platformId}`);
},
activateLicenseKey(licenseKey: string) {
return api.post<void>(`/v1/platform-billing/activate`, {
licenseKey,
});
},
update(req: UpdatePlatformRequestBody, platformId: string) {
return api.post<PlatformResponse>(`/v1/platforms/${platformId}`, req);
},
updateWithFormData(formdata: FormData, platformId: string) {
return api.post<PlatformResponse>(
`/v1/platforms/${platformId}`,
formdata,
{},
{
'Content-Type': 'multipart/form-data',
},
);
},
};