2023-07-31 01:26:38 -07:00
|
|
|
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class CarbonBlackApi implements ICredentialType {
|
|
|
|
name = 'carbonBlackApi';
|
|
|
|
|
|
|
|
displayName = 'Carbon Black API';
|
|
|
|
|
2024-06-06 04:34:30 -07:00
|
|
|
icon = { light: 'file:icons/vmware.svg', dark: 'file:icons/vmware.dark.svg' } as const;
|
2023-07-31 01:26:38 -07:00
|
|
|
|
|
|
|
documentationUrl = 'carbonblack';
|
|
|
|
|
2023-11-13 03:11:16 -08:00
|
|
|
httpRequestNode = {
|
|
|
|
name: 'Carbon Black',
|
|
|
|
docsUrl: 'https://developer.carbonblack.com/reference',
|
|
|
|
apiBaseUrl: '',
|
|
|
|
};
|
|
|
|
|
2023-07-31 01:26:38 -07:00
|
|
|
properties: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'URL',
|
|
|
|
name: 'apiUrl',
|
|
|
|
type: 'string',
|
|
|
|
placeholder: 'https://defense.conferdeploy.net/',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token',
|
|
|
|
name: 'accessToken',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: { password: true },
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
'X-Auth-Token': '={{$credentials.accessToken}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
// test: ICredentialTestRequest = {
|
|
|
|
// request: {
|
|
|
|
// baseURL: '={{$credentials.apiUrl}}',
|
|
|
|
// url: 'integrationServices/v3/auditlogs',
|
|
|
|
// },
|
|
|
|
// };
|
|
|
|
}
|