> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectdiscovery.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Scan History

> Get scan history detial by scanId



## OpenAPI

````yaml get /v1/scans/{scanId}/history
openapi: 3.1.0
info:
  title: PDCP API
  version: '1.0'
  summary: ProjectDiscovery Cloud Platform
  description: >-
    For more details, checkout
    https://docs.projectdiscovery.io/api-reference/editor/scan
servers:
  - url: https://api.projectdiscovery.io
    description: Production
  - url: https://api.dev.projectdiscovery.io
    description: Development
  - url: http://localhost:8085
    description: Localhost
security:
  - X-API-Key: []
paths:
  /v1/scans/{scanId}/history:
    parameters:
      - schema:
          type: string
        name: scanId
        in: path
        required: true
    get:
      tags:
        - scans
      summary: Get Scan History
      description: Get scan history detial by scanId
      operationId: get-v1-scans-scanId-history
      parameters:
        - schema:
            type: integer
          in: query
          name: offset
          description: number of rows to skip
        - schema:
            type: integer
          in: query
          name: limit
          description: number of rows to get
        - schema:
            type: string
            format: date
          in: query
          name: start_date
          description: start date from which you want to get history
        - schema:
            type: string
            format: date
          in: query
          name: end_date
          description: end date till which you want to get history
        - schema:
            type: string
            enum:
              - current_month
              - last_month
              - last_3_months
              - last_6_months
              - last_12_months
              - all_time
          in: query
          name: time_range
          description: time range to get history
        - schema:
            type: string
          in: header
          description: >-
            Retrieve the Team ID from:
            https://cloud.projectdiscovery.io/settings/team
          name: X-Team-Id
      responses:
        '200':
          $ref: '#/components/responses/GetScansHistoryResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      security:
        - X-API-Key: []
components:
  responses:
    GetScansHistoryResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - current_page
              - result_count
              - total_results
              - total_pages
              - message
              - data
            properties:
              message:
                type: string
              current_page:
                type: integer
              result_count:
                type: integer
              total_results:
                type: integer
              total_pages:
                type: integer
              data:
                type: array
                items:
                  $ref: '#/components/schemas/ScansHistoryItems'
              total_completed_request:
                type: integer
              total_scan_run:
                type: integer
              total_unique_scan_run:
                type: integer
    ErrorResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
              kind:
                type: string
              code:
                type: string
              error:
                type: string
              error_id:
                type: string
              param:
                type: string
              status:
                type: integer
  schemas:
    ScansHistoryItems:
      title: ScansHistoryItems
      type: object
      properties:
        completed_request:
          type: integer
        name:
          type: string
        scan_id:
          type: string
        scan_time:
          type: string
        severity:
          type: object
        status:
          type: string
        time:
          type: string
        total_request:
          type: integer
        total_result:
          type: integer
        total_target:
          type: integer
        total_templates:
          type: integer
        error_details:
          type: string
  securitySchemes:
    X-API-Key:
      name: X-API-Key
      type: apiKey
      in: header

````