openapi: 3.1.0 info: title: InsightAppSec Accounts Scan Template API description: '

Welcome to the reference documentation for the public APIs available for InsightAppSec.

Here are a few resources to help you learn how to start using our APIs:

After you''ve got the basics down, you can use this API guide to find examples of requests and responses.

Permissions

This API uses the platform role of a user''s API key to inherit a set of permissions.

Notes:

  • Platform Admins do not require explicit access to an App in order to see it, or anything associated with it
  • Organization keys will inherit Product Admin permissions.
  • RolePermissions
    Product Admin
  • Manage Apps
  • Read Attack Templates
  • Manage Targets
  • Manage Scan Configs
  • Manage Scans
  • Manage Vulnerabilities
  • Administer Vulnerability Comments
  • Manage Engines
  • Manage Engine Groups
  • Manage Schedules
  • Manage Blackouts
  • Manage Global Blackouts
  • Manage Files
  • Manage Tags
  • Manage PDF Report
  • Read Write
  • Manage Apps
  • Read Attack Templates
  • Read Targets
  • Manage Scan Configs
  • Manage Scans
  • Manage Vulnerabilities
  • Manage Vulnerability Comments
  • Read Engines
  • Read Engine Groups
  • Manage Schedules
  • Manage Blackouts
  • Manage Files
  • Manage Tags
  • Manage PDF Report
  • Read Only
  • Read Apps
  • Read Attack Templates
  • Read Targets
  • Read Scan Configs
  • Read Scans
  • Read Vulnerabilities
  • Read Vulnerability Comments
  • Read Engines
  • Read Engine Groups
  • Read Schedules
  • Read Blackouts
  • Read Files
  • Read Tags
  • Read PDF Report
  • Pagination Parameters

    The following query parameters can be used to control the order, offset and size of the returned data

    ParameterDescriptionExample
    index

    The 0-based index of the page of data desired (default: 0)

    ?index=2
    size

    The size of the page of data desired (min: 1, max: 1000, default: 50)

    ?size=10
    sort

    The sort terms and (optional) directions for the desired ordering of data (default: specific to each resource)

    ?sort=scan.submit_time,DESC,scan.status
    page-token

    The page token, used as an alternative to index (default: Not provided)

    ?page-token=NDM0NTk0NTIyOjo6X1M6OjpiYW5hbmFz

    Paging using a page token

    When intending to page beyond the 10,000th result, or as an alternative to using the index query parameter, the page-token option may be used instead. After retrieving the first page, the page_token will be present in the metadata section of the response.
    For example, with size=99, index=0 to index=99 may be used. To load the next page, use the page_token value used in the response e.g. ?page-token=NDM0NTk0NTIyO

    Creating resources

    As is generally the accepted practice with REST-ful APIs, creating a resource can be performed by sending an appropriately formatted POST request. Any ID provided for a new resource in a POST request body will simply be ignored (and a new one generated internally and returned as part of the resource in subsequent GET requests), and POST requests to URLs following a format similar to .../resource/ are unsupported and should respond with 415 Method Not Allowed. All requests which successfully create a resource and respond with 201 Created will contain a Location header the value of which is an absolute URI for the resource (the ID of which can be determined as the last section of the path in the given URI). For example:
    Location: https://us.api.insight.rapid7.com/ias/v1/scans/12345678-1234-5678-90AB-1234567890AB

    Date, Time and Timezone Support

    The value of date and date-time type properties are fixed to the common ISO-8601 format. Unless otherwise specified, all date or date-time data in response bodies are expressed in UTC, and it is also expected that data provided in request bodies are also expressed in UTC.

    Schedules and Blackouts

    The first_start and first_end properties of both Blackouts and Schedules, and the last_start property of Blackouts may be specified with a timezone. If the timezone is not specified, it is assumed to be UTC. For example:
    2019-08-12T14:00:00.000000Z[Asia/Tokyo]
    It is also possible to specify the timezone as an offset of either GMT or UTC. For example:
    2019-09-04T15:00:00.000000Z[GMT+03:00]

    ValueFormatNotes
    DateYYYY-MM-DDDefaults to 12 am UTC (if used for a date & time)
    Date & time onlyYYYY-MM-DD''T''hh:mm:ss[.nnn]Defaults to UTC
    Date & time in UTCYYYY-MM-DD''T''hh:mm:ss[.nnn]Z
    Date & time with specific timezoneYYYY-MM-DD''T''hh:mm:ss[.nnn]Z[TimeZoneId]

    Searching and Filtering

    One characteristic of a powerful API is support for complex search and filtering of resources using a flexible query language. It is entirely possible to provide basic search and filtering functionality on standard GET resource collection operations using HTTP query parameters, but this becomes restrictive when attempting to encode boolean logic. Other solutions are also possible but come with equally restrictive compromises. The most effective way to facilitate this complex search and filtering is to provide it as a top-level API with a robust Domain-Specific Language (DSL).

    For simple data retrieval that supports paging and sorting functionality, use the traditional resource-specific GET collection operations; for more complex data retrieval that supports a user-crafted query DSL, use the global Search operation.

    Errors

    Any response from the API with an HTTP Status Code in the 4xx or 5xx range indicates an error. If in the 4xx range it indicates a client-side error, where in the 5xx range it indicates a server-side error. All responses indicating an error should be JSON formatted, and contain both a "status" and a "message" property indicating the cause of the error, a "r7-correlation-id" header should also always be returned in the format of a UUID, which uniquely identifies the HTTP exchange that took place and caused the error (this header is present on every request). On some occasions, an "error_code" property will be included in the response body, which can provide the support team further context into the cause of the error in cases where the message is not explicitly clear.

    When contacting support about error responses received from the API, please attempt to include, at minimum:

    Validation Errors

    Specifically, when a response with an HTTP Status Code of 422 is returned, this indicates a validation error, almost always received in a response from a non-idempotent request (normally PUT, POST or DELETE). In this case, there should be an additional "errors" property included in the JSON response body that should describe the cause of the validation exception; this will almost always require a modification to the request body to resolve.

    ' version: v1 servers: - url: https://[region].api.insight.rapid7.com/ias/v1 tags: - name: Scan Template description: Scan Template Resource Controller paths: /api/3/scan_templates: get: tags: - Scan Template summary: Scan Templates description: Returns all scan templates. operationId: getScanTemplates schemes: [] consumes: - application/json produces: - application/json;charset=UTF-8 parameters: [] responses: '200': description: OK schema: $ref: '#/definitions/Resources«ScanTemplate»' examples: {} headers: {} '401': description: Unauthorized schema: $ref: '#/definitions/UnauthorizedError' examples: {} headers: {} '404': description: Not Found schema: $ref: '#/definitions/NotFoundError' examples: {} headers: {} '500': description: Internal Server Error schema: $ref: '#/definitions/InternalServerError' examples: {} headers: {} '503': description: Service Unavailable schema: $ref: '#/definitions/ServiceUnavailableError' examples: {} headers: {} security: [] post: tags: - Scan Template summary: Scan Templates description: Creates a new scan template. operationId: createScanTemplate schemes: [] consumes: - application/json produces: - application/json;charset=UTF-8 parameters: - in: body name: scanTemplate description: The details of the scan template. required: false schema: $ref: '#/definitions/ScanTemplate' responses: '200': description: OK schema: $ref: '#/definitions/CreatedReference«ScanTemplateID,Link»' examples: {} headers: {} '400': description: Bad Request schema: $ref: '#/definitions/BadRequestError' examples: {} headers: {} '401': description: Unauthorized schema: $ref: '#/definitions/UnauthorizedError' examples: {} headers: {} '500': description: Internal Server Error schema: $ref: '#/definitions/InternalServerError' examples: {} headers: {} '503': description: Service Unavailable schema: $ref: '#/definitions/ServiceUnavailableError' examples: {} headers: {} security: [] /api/3/scan_templates/{id}: get: tags: - Scan Template summary: Scan Template description: Returns a scan template. operationId: getScanTemplate schemes: [] consumes: - application/json produces: - application/json;charset=UTF-8 parameters: - name: id in: path description: The identifier of the scan template required: true type: string responses: '200': description: OK schema: $ref: '#/definitions/ScanTemplate' examples: {} headers: {} '401': description: Unauthorized schema: $ref: '#/definitions/UnauthorizedError' examples: {} headers: {} '404': description: Not Found schema: $ref: '#/definitions/NotFoundError' examples: {} headers: {} '500': description: Internal Server Error schema: $ref: '#/definitions/InternalServerError' examples: {} headers: {} '503': description: Service Unavailable schema: $ref: '#/definitions/ServiceUnavailableError' examples: {} headers: {} security: [] put: tags: - Scan Template summary: Scan Template description: Updates a scan template. operationId: updateScanTemplate schemes: [] consumes: - application/json produces: - application/json;charset=UTF-8 parameters: - name: id in: path description: The identifier of the scan template required: true type: string - in: body name: scanTemplate description: The details of the scan template. required: false schema: $ref: '#/definitions/ScanTemplate' responses: '200': description: OK schema: $ref: '#/definitions/Links' examples: {} headers: {} '400': description: Bad Request schema: $ref: '#/definitions/BadRequestError' examples: {} headers: {} '401': description: Unauthorized schema: $ref: '#/definitions/UnauthorizedError' examples: {} headers: {} '404': description: Not Found schema: $ref: '#/definitions/NotFoundError' examples: {} headers: {} '500': description: Internal Server Error schema: $ref: '#/definitions/InternalServerError' examples: {} headers: {} '503': description: Service Unavailable schema: $ref: '#/definitions/ServiceUnavailableError' examples: {} headers: {} security: [] delete: tags: - Scan Template summary: Scan Template description: Deletes a scan template. operationId: deleteScanTemplate schemes: [] consumes: - application/json produces: - application/json;charset=UTF-8 parameters: - name: id in: path description: The identifier of the scan template required: true type: string responses: '200': description: OK schema: $ref: '#/definitions/Links' examples: {} headers: {} '401': description: Unauthorized schema: $ref: '#/definitions/UnauthorizedError' examples: {} headers: {} '404': description: Not Found schema: $ref: '#/definitions/NotFoundError' examples: {} headers: {} '500': description: Internal Server Error schema: $ref: '#/definitions/InternalServerError' examples: {} headers: {} '503': description: Service Unavailable schema: $ref: '#/definitions/ServiceUnavailableError' examples: {} headers: {} security: [] definitions: ScanTemplateDiscoveryPerformanceParallelism: type: object properties: maximum: type: integer format: int32 example: 0 description: The maximum number of discovery connection requests send in parallel. Defaults to `0`. minimum: 0 maximum: 1000 minimum: type: integer format: int32 example: 0 description: The minimum number of discovery connection requests send in parallel. Defaults to `0`. minimum: 0 maximum: 1000 description: '' NotFoundError: type: object required: - status properties: links: type: array description: Hypermedia links to corresponding or related resources. items: $ref: '#/definitions/Link' message: type: string example: An error has occurred. description: The messages indicating the cause or reason for failure. status: type: string example: '404' description: The HTTP status code for the error (same as in the HTTP response). enum: - '404' description: '' InternalServerError: type: object required: - status properties: links: type: array description: Hypermedia links to corresponding or related resources. items: $ref: '#/definitions/Link' message: type: string example: An error has occurred. description: The messages indicating the cause or reason for failure. status: type: string example: '500' description: The HTTP status code for the error (same as in the HTTP response). enum: - '500' description: '' ScanTemplateVulnerabilityChecks: type: object properties: categories: example: '' description: The vulnerability check categories enabled or disabled during a scan. $ref: '#/definitions/ScanTemplateVulnerabilityCheckCategories' correlate: type: boolean example: false description: Whether an extra step is performed at the end of the scan where more trust is put in OS patch checks to attempt to override the results of other checks which could be less reliable. individual: example: '' description: The individual vulnerability checks enabled or disabled during a scan. $ref: '#/definitions/ScanTemplateVulnerabilityCheckIndividual' links: type: array description: Hypermedia links to corresponding or related resources. readOnly: true items: $ref: '#/definitions/Link' potential: type: boolean example: false description: Whether checks that result in potential vulnerabilities are assessed during a scan. types: example: '' description: The vulnerability check types enabled or disabled during a scan. $ref: '#/definitions/VulnerabilityCheckType' unsafe: type: boolean example: false description: Whether checks considered "unsafe" are assessed during a scan. description: '' ScanTemplateDatabase: type: object properties: db2: type: string example: database description: Database name for DB2 database instance. links: type: array description: Hypermedia links to corresponding or related resources. readOnly: true items: $ref: '#/definitions/Link' oracle: type: array example: default description: Database name (SID) for an Oracle database instance. items: type: string postgres: type: string example: postgres description: Database name for PostgesSQL database instance. description: '' CreatedReference«ScanTemplateID,Link»: type: object properties: id: type: string example: '1' description: The identifier of the resource created. links: type: array description: Hypermedia links to corresponding or related resources. items: $ref: '#/definitions/Link' description: '' Links: type: object properties: links: type: array description: Hypermedia links to corresponding or related resources. items: $ref: '#/definitions/Link' description: '' ScanTemplateVulnerabilityCheckCategories: type: object properties: disabled: type: array description: The categories of vulnerability checks to disable during a scan. items: type: string enabled: type: array description: The categories of vulnerability checks to enable during a scan. items: type: string links: type: array description: Hypermedia links to corresponding or related resources. readOnly: true items: $ref: '#/definitions/Link' description: '' ScanTemplateServiceDiscoveryTcp: type: object properties: additionalPorts: type: array example: 3078,8000-8080 description: Additional TCP ports to scan. Individual ports can be specified as numbers or a string, but port ranges must be strings (e.g. `"7892-7898"`). Defaults to empty. items: type: object excludedPorts: type: array example: '1024' description: TCP ports to exclude from scanning. Individual ports can be specified as numbers or a string, but port ranges must be strings (e.g. `"7892-7898"`). Defaults to empty. items: type: object links: type: array description: Hypermedia links to corresponding or related resources. readOnly: true items: $ref: '#/definitions/Link' method: type: string example: SYN description: The method of TCP discovery. Defaults to `SYN`. enum: - SYN - SYN+RST - SYN+FIN - SYN+ECE - Full ports: type: string example: well-known description: The TCP ports to scan. Defaults to `well-known`. enum: - all - well-known - custom - none description: '' UnauthorizedError: type: object required: - status properties: links: type: array description: Hypermedia links to corresponding or related resources. items: $ref: '#/definitions/Link' message: type: string example: An error has occurred. description: The messages indicating the cause or reason for failure. status: type: string example: '401' description: The HTTP status code for the error (same as in the HTTP response). enum: - '401' description: '' ScanTemplateAssetDiscovery: type: object properties: collectWhoisInformation: type: boolean example: false description: Whether to query Whois during discovery. Defaults to `false`. fingerprintMinimumCertainty: type: number format: double example: 0.16 description: The minimum certainty required for a fingerprint to be considered valid during a scan. Defaults to `0.16`. minimum: 0 maximum: 1 fingerprintRetries: type: integer format: int32 example: 0 description: The number of fingerprinting attempts made to determine the operating system fingerprint. Defaults to `4`. minimum: 0 maximum: 1000 ipFingerprintingEnabled: type: boolean example: true description: Whether to fingerprint TCP/IP stacks for hardware, operating system and software information. sendArpPings: type: boolean example: true description: Whether ARP pings are sent during asset discovery. Defaults to `true`. sendIcmpPings: type: boolean example: true description: Whether ICMP pings are sent during asset discovery. Defaults to `false`. tcpPorts: type: array description: TCP ports to send packets and perform discovery. Defaults to no ports. items: type: integer format: int32 treatTcpResetAsAsset: type: boolean example: true description: Whether TCP reset responses are treated as live assets. Defaults to `true`. udpPorts: type: array description: UDP ports to send packets and perform discovery. Defaults to no ports. items: type: integer format: int32 description: '' ScanTemplateDiscoveryPerformancePacketsRate: type: object properties: defeatRateLimit: type: boolean example: true description: Whether defeat rate limit (defeat-rst-ratelimit) is enforced on the minimum packet setting, which can improve scan speed. If it is disabled, the minimum packet rate setting may be ignored when a target limits its rate of RST (reset) responses to a port scan. This can increase scan accuracy by preventing the scan from missing ports. Defaults to `true`. maximum: type: integer format: int32 example: 15000 description: The minimum number of packets to send each second during discovery attempts. Defaults to `0`. minimum: 0 maximum: 15000 minimum: type: integer format: int32 example: 450 description: The minimum number of packets to send each second during discovery attempts. Defaults to `0`. minimum: 0 maximum: 15000 description: '' ServiceUnavailableError: type: object required: - status properties: links: type: array description: Hypermedia links to corresponding or related resources. items: $ref: '#/definitions/Link' message: type: string example: An error has occurred. description: The messages indicating the cause or reason for failure. status: type: string example: '503' description: The HTTP status code for the error (same as in the HTTP response). enum: - '503' description: '' ScanTemplateDiscoveryPerformance: type: object properties: packetRate: example: '' description: The number of packets to send per second during scanning. $ref: '#/definitions/ScanTemplateDiscoveryPerformancePacketsRate' parallelism: example: '' description: The number of discovery connection requests to be sent to target host simultaneously. These settings has no effect if values have been set for `scanDelay`. $ref: '#/definitions/ScanTemplateDiscoveryPerformanceParallelism' retryLimit: type: integer format: int32 example: 3 description: The maximum number of attempts to contact target assets. If the limit is exceeded with no response, the given asset is not scanned. Defaults to `3`. minimum: 1 maximum: 15 scanDelay: example: '' description: The duration to wait between sending packets to each target host during a scan. $ref: '#/definitions/ScanTemplateDiscoveryPerformanceScanDelay' timeout: example: '' description: The duration to wait between retry attempts. $ref: '#/definitions/ScanTemplateDiscoveryPerformanceTimeout' description: '' ScanTemplateWebSpiderPerformance: type: object properties: httpDaemonsToSkip: type: array description: The names of HTTP Daemons (HTTPd) to skip when spidering. For example, `"CUPS"`. items: type: string maximumDirectoryLevels: type: integer format: int32 example: 6 description: The directory depth limit for web spidering. Limiting directory depth can save significant time, especially with large sites. A value of `0` signifies unlimited directory traversal. Defaults to `6`. minimum: 1 maximum: 100 maximumForeignHosts: type: integer format: int32 example: 100 description: The maximum number of unique host names that the spider may resolve. This function adds substantial time to the spidering process, especially with large Web sites, because of frequent cross-link checking involved. Defaults to `100`. maximumLinkDepth: type: integer format: int32 example: 6 description: The maximum depth of links to traverse when spidering. Defaults to `6`. minimum: 0 maximum: 100 maximumPages: type: integer format: int32 example: 3000 description: The maximum the number of pages that are spidered. This is a time-saving measure for large sites. Defaults to `3000`. minimum: 0 maximum: 1000000 maximumRetries: type: integer format: int32 example: 2 description: The maximum the number of times to retry a request after a failure. A value of `0` means no retry attempts are made. Defaults to `2`. minimum: 0 maximum: 999 maximumTime: type: string example: PT0S description: The maximum length of time to web spider. This limit prevents scans from taking longer than the allotted scan schedule. A value of `PT0S` means no limit is applied. The acceptable range is `PT1M` to `PT16666.6667H`. responseTimeout: type: string example: PT2M description: The duration to wait for a response from a target web server. The value is specified as a ISO8601 duration and can range from `PT0S` (0ms) to `P1H` (1 hour). Defaults to `PT2M`. threadsPerServer: type: integer format: int32 example: 3 description: The number of threads to use per web server being spidered. Defaults to `3`. minimum: 0 maximum: 999 description: '' VulnerabilityCheckType: type: object properties: disabled: type: array description: The types of vulnerability checks to disable during a scan. items: type: string enabled: type: array description: The types of vulnerability checks to enable during a scan. items: type: string links: type: array description: Hypermedia links to corresponding or related resources. readOnly: true items: $ref: '#/definitions/Link' description: '' ScanTemplate: type: object properties: checks: example: '' description: "Settings for which vulnerability checks to run during a scan.
    \nThe rules for inclusion of checks is as follows: \n