n8n-nodes-base
Version:
Base nodes of n8n
42 lines • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.N8nApi = void 0;
class N8nApi {
name = 'n8nApi';
displayName = 'n8n API';
documentationUrl = 'https://docs.n8n.io/api/authentication/';
properties = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
default: '',
description: 'The API key for the n8n instance',
},
{
displayName: 'Base URL',
name: 'baseUrl',
type: 'string',
default: '',
placeholder: 'https://<name>.app.n8n.cloud/api/v1',
description: 'The API URL of the n8n instance',
},
];
authenticate = {
type: 'generic',
properties: {
headers: {
'X-N8N-API-KEY': '={{ $credentials.apiKey }}',
},
},
};
test = {
request: {
baseURL: '={{ $credentials.baseUrl }}',
url: '/workflows?limit=5',
},
};
}
exports.N8nApi = N8nApi;
//# sourceMappingURL=N8nApi.credentials.js.map