API Scenarios

Seeker REST APIs can be used for automation of various administration scenarios.

Project Administration

/api/{ver}/projects POST
Creates a new project with the specified properties. You can also use this operation to copy any of the configurations of an existing source project to the new project by specifying the sourceProjectKey parameter and true values for the configurations that you want to copy, such as logLevel or codeExclusion.
/api/{ver}/projects PUT
Updates the configurations of multiple target projects by any of the configurations of a source project. You need to specify the sourceProjectKey and targetProjectKeys parameters, and true values for the configurations that you want to copy, such as logLevel or codeExclusion.
Tip: If you need to define multiple projects, a good practice is to create and configure a template project, and then use this operation to copy its configurations to other projects in a batch.
/api/{ver}/projects/{key}/reset PUT
Resets a project, which means deleting all the vulnerability detections for this project but keeping all the configurations.
/api/{ver}/projects/{key}/settings/features/activeverification PUT
Enables or disables Active Verification for a project.

User Administration

/api/{ver}/users GET
Returns a list of existing users along with the groups to which they are assigned.
/api/{ver}/users POST
Creates a new user with the specified properties, including the global roles and groups to which the user is assigned.
/api/{ver}/groups GET
Returns a list of existing groups along with their assigned users and global roles.
/api/{ver}/groups POST
Creates a new group with the specified properties, including the lists of assigned users and global roles.

Agent Administration

/api/{ver}/agents GET
Returns a list of currently connected agents along with their properties.
/api/{ver}/installers/agents/binaries/{technology} GET
Downloads an Agent installer binary archive for the specified technology.

You can request a specific version of the Agent by passing one of the following parameters:

  • projectKey: Pass it to request the Agent version that is defined for this project.
  • agentVersion: Requested Agent version, or latest. If not passed, the default version is the latest or the version defined in the SEEKER_DEFAULT_AGENT_VERSION variable. This parameter is ignored if passed together with a projectKey.

Save the archive on the machine where you want to install the Agent, and follow the technology-specific instructions in Connect Agents Directly.

/api/{ver}/installers/agents/scripts/{technology} GET
Downloads an Agent autoinstall script for the specified technology.

Vulnerability Management

/api/{ver}/vulnerabilities GET
Returns a list of detected vulnerabilities according to the specified filters.
Tip:

You can use this call in an application build script as a condition to cause a build failure upon detection of any critical or high vulnerability. This is an alternative to defining an additional build step, as described in Install and Configure Seeker Jenkins Plugin.