GETTING STARTED
Overview
This page will help you to get started with using the Self-Service Events API.
You can use the Self-Service Events API to:
Receive real-time notifications on vulnerabilities for your projects, and export them into your vulnerability management and/or ticketing systems.
Receive real-time notifications on vulnerabilities for your projects, and update your existing dashboard applications with live notifications.
Receive real-time notifications on new projects and changes to existing projects.
Receive real-time notifications when testing starts & stops daily on your projects.
Receive real-time notifications when vulnerabilities are ready for retesting, closed or re-opened.
Receive real-time notifications on audit logs and user activities.
Prerequisites
In order to receive events, you must first get access to events by your administrators.
Authentication to the Self-Service Events API is controlled using an API key.
If you do not already have an existing API key, you can generate one within the AttackForge application.
You can also check which events you have access to within the AttackForge application.
In order to access the Self-Service Events API, you must meet the following conditions:
You must have a valid Self-Service API key;
You must be provided with access to Events by the Administrators;
You must have Network access to your AttackForge Enterprise tenant
Your key is static and does not expire. You can request a new key at any time within the application.
All requests to the Events API must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate all requests.
Accessing the Events API
Access to the Events API, including scope of data available, is restricted to the users' data within the application. This means that an Administrators' API key cannot access all events or data in the system.
Every user in the application does not have access to any of the Events, by default.
Access to the Events API must be provided explicitly by an Administrator, and is controlled on an individual event basis.
A user can see their access to the Events API by viewing the My Events
section within the SSAPI module in the application. An Administrator can provide access to the Events API for a user by accessing the Users module.
Setting up your client
In order to receive events, you must first set up your client and subscribe the client to events which you have access to.
To help make the setup process simple & fast, we have included ready-to-use clients which take only minutes to set up and start using.
Each client is production-ready, includes step-by-step instructions and is provided in multiple programming languages - to ensure compatibility & ease of use with your technologies and teams.
NodeJS
Python
.NET
Java
Go
NodeJS
Prerequisites
In order to use the NodeJS client, you must have:
NodeJS v10+ installed
NPM installed
Network access to your AttackForge Enterprise tenant
Step 1: Download the NodeJS client
You can download or clone the NodeJS client from AttackForge public Git repository:
Website
Clone
Direct download
Step 2: Install dependancies
Using a terminal, navigate to the directory when you downloaded the client in Step 1.
Using NPM, install dependancies from package.json.
Step 3: Run client
Run following command, substituting variables below with your configuration details:
An example is included below for reference:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open index.js with a text editor - the file is located in your client directory. Your code will replace the following section within this file:
Python
Prerequisites
In order to use the Python client, you must have:
Python3 installed
PIP installed
Network access to your AttackForge Enterprise tenant
Step 1: Download the Python client
You can download or clone the Python client from our public Git repository:
Website
Clone
Direct Download
Step 2: Install dependancies
Using a terminal, navigate to the directory when you downloaded the client in Step 1.
Using PIP, install dependancies from main.py.
Step 3: Run client
Run following command, substituting variables below with your configuration details:
An example is included below for reference:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open main.py with a text editor - the file is located in your client directory. Your code will replace the following section within this file:
.NET
Prerequisites
In order to use the .NET client, you must have:
.NET 5.0 SDK installed
Network access to your AttackForge Enterprise tenant
Step 1: Download the .NET 5.0 client
You can download or clone the .NET 5.0 client from our public Git repository:
Website
Clone
Direct Download
Step 2: Run client
Run following command, substituting variables below with your configuration details:
An example is included below for reference:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open Program.cs with a text editor from your client directory. Your code will replace the following section within this file:
Java
Prerequisites
In order to use the Java client, you must have:
OpenJDK 11 installed
Maven installed
Network access to your AttackForge Enterprise tenant
Step 1: Download the Java client
You can download or clone the Java client from our public Git repository:
Website
Clone
Direct Download
Step 2: Install dependancies
Using a terminal, navigate to the directory when you downloaded the client in Step 1.
Using Maven, install dependancies and build the Java client as a JAR.
Step 3: Run client
Run following command, substituting variables below with your configuration details:
An example is included below for reference:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open ./src/main/java/com/attackforge/App.java with a text editor from your client directory. Your code will replace the following section within this file:
Go
Prerequisites
In order to use the Go client, you must have:
Go installed
Network access to your AttackForge Enterprise tenant
Step 1: Download the Go client
You can download or clone the Go client from our public Git repository:
Website
Clone
Direct Download
Step 2: Build client
Using a terminal, navigate to the directory when you downloaded the client in Step 1.
Using Go, install dependancies and build the client.
Step 3: Run client
Run following command, substituting variables below with your configuration details:
An example is included below for reference:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open main.go with a text editor from your client directory. Your code will replace the following section within this file:
Last updated