---
updatedAt: 2026-07-02T14:39:48.000Z
---

# Retrieve last completed scans on a site

This operation returns an object containing information on the last completed scan instances for the specified site. It returns information for up to 10 scans unless 'query_instance_count' is specified.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "Site API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/site/{site_id}/last_completed_scans": {
      "get": {
        "tags": [
          "Site API v1.0"
        ],
        "summary": "Retrieve last completed scans on a site",
        "description": "This operation returns an object containing information on the last completed scan instances for the specified site. It returns information for up to 10 scans unless 'query_instance_count' is specified.",
        "operationId": "getLastCompletedScansForSite",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "description": "Site ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "query_instance_count",
            "in": "query",
            "description": "Specifies the number of scan instances to retrieve. If not specified, up to 10 will be retrieved.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The response representation format for results.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "json",
              "example": "json",
              "enum": [
                "json"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provides the information on the last completed scan instances for the given site.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LastCompletedScans"
                }
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "LastCompletedScan": {
        "properties": {
          "cred_group_name": {
            "type": "string",
            "nullable": true
          },
          "is_non_auth": {
            "type": "number"
          },
          "end_date": {
            "type": "string"
          },
          "scan_instance_id": {
            "type": "string"
          },
          "auth_schema_id": {
            "type": "number"
          }
        }
      },
      "LastCompletedScans": {
        "properties": {
          "collection": {
            "items": {
              "$ref": "#/components/schemas/LastCompletedScan"
            }
          },
          "href": {
            "type": "string"
          },
          "has_running_scan": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "slot_id": {
            "type": "string"
          }
        }
      }
    }
  }
}
```