Using APIs

Using APIs

The platform REST APIs help you seamlessly integrate the platform with other solutions. To use the APIs, generate an access token.

Notes
You must have Organization Admin privileges to generate an access token.

Step 1: As an Organization Admin, click on the Settings icon on the top right corner of the navigation bar.


Step 2: Scroll down to the API Access Tokens section of the page and enter a name for the API Access Token and click on Generate. Take note of the token displayed in the modal window. You can also select Scopes from the list.


Step 3: You can access the API documentation for all APIs by clicking on the APIs documentation link.

NotesClick on the API documentation (v2) as it is the most recent version.


The API documentation contains information on all of our available API endpoints.



  1. Click on an API to see more details about it.
  2. A description of the selected API will be displayed.
  3. Next, you'll see the parameters associated with the API. In this case, no parameters are required.
  4. You will also find the body of the selected API, where you can change the media type by selecting from the dropdown.
  5. Finally, the responses of the API operation is shown, and you can adjust the media type using the available dropdown.

Using the API’s

There are two options to use the APIs.

Option 1
Option 2
Option 1
You can also download the Swagger file and use it in Postman. To do this, simply navigate to the management API web page and select Download Swagger JSON Definitions” Once downloaded, you can easily import the Swagger file into Postman for use.


Option 2
You can use a curl command on the terminal. Please look at the example below to call the 'technologies' API (replace YOURAPITOKEN
with your access token value):

curl -i -s -k -X
 

GET' -H
 

Host: api.secureflag.com' -H
 

Authorization: Bearer YOURAPITOKEN' -H
 

Content-type: application/json'
 


 

    • Related Articles

    • Threat Modeling SDK

      This feature is available exclusively on the Enterprise Plans. Learn more. This guide will walk you through using the Threat Model Software Development Kit (SDK), an innovative tool that enables you to build Threat Model labs that are both unique to ...
    • Track Assigned Activities

      Once a user has been assigned an activity, the progress of the activity can be tracked on an Organization, Team, or User level. Also, progress made by each user for a selected learning path can also be tracked. For Organization or Team For User By ...
    • Custom Labs: Quick Start Manual

      Custom Labs lets you build tailored Code Review labs in just a few clicks, using your own demonstrative code or snippets. They help challenge developers with vulnerabilities that reflect the technologies and patterns they use every day. In Code ...
    • Setting Assignment Strategy

      You can set assignment strategies for new users in your organization. There are four different assignment strategies available, and you can choose your preferred assignment from the ones below. Overview of Assignment Strategy: None: No activities ...
    • Users

      The platform offers multiple user roles with varying levels of privilege to help you run an efficient, secure coding training program. *Administrative users seeking to run training Labs require a User license. Add a User There are multiple ways to ...