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 { HttpMethod } from '@activepieces/pieces-common';
import { createAction, Property } from '@activepieces/pieces-framework';
import { ampecoAuth } from '../../../common/auth';
import { handleApiError, makeAmpecoApiCall, prepareQueryParams, processPathParameters } from '../../../common/utils';
import { GetConfigurationTemplateResponse } from '../../../models/responses';
/**
* Generated from API version: 3.96.4
*/
// Endpoint: GET /public-api/resources/configuration-templates/v1.0/{template}
export const getConfigurationTemplateAction = createAction({
auth: ampecoAuth,
name: 'getConfigurationTemplate',
displayName: 'Resources - Configuration Templates - Get Configuration Template',
description: 'Get Configuration Template.',
audience: 'both',
aiMetadata: { description: 'Retrieve a single OCPP configuration template by its numeric id. Read-only and idempotent; use this when you already know the template id, and use List Configuration Templates to search across templates.', idempotent: true },
props: {
template: Property.Number({
displayName: 'Template',
description: '',
required: true,
}),
},
async run(context): Promise<GetConfigurationTemplateResponse> {
try {
const url = processPathParameters('/public-api/resources/configuration-templates/v1.0/{template}', context.propsValue);
const queryParams = prepareQueryParams(context.propsValue, []);
const body = undefined;
return await makeAmpecoApiCall(
context.auth,
url,
HttpMethod.GET,
body,
queryParams
) as GetConfigurationTemplateResponse;
} catch (error) {
handleApiError(error);
}
},
});