---
title: "Update Scan"
method: PATCH
path: "/api/scanner/{id}/"
tags: ["Scanner"]
---

# Update Scan

`PATCH /api/scanner/{id}/`

Update the label of a private scan using its `id`.

## Path parameters

- `id` integer, required — Unique identifier for the scan.

## Request body

- object
  - `name` string — Descriptive label for the scan.

## Response `200`

__Scan Updated__

- PrivateScan
  - `id` integer, required — Unique identifier for the scan.
  - `name` string, required — Descriptive label for the scan.
  - `label` string, required — A system-defined unique label for the index associated with the scan. Used as an identifier.
  - `targets` union[], required — A list of targets for the scan. Valid targets include IP addresses, domain names, and CIDR ranges.
    - union
      - string — A valid IPv4 address.
      - string, hostname — A domain name
      - string — A valid CIDR range.
  - `scan_started_at` string, date-time, nullable — Timestamp indicating when the scan started.
  - `scan_ended_at` string, date-time, nullable — Timestamp indicating when the scan ended.
  - `scan_progress` object[] — Provides real-time details about the scan’s progress.
    - `id` integer, required — Unique identifier for the scan stage.
    - `state` 'pending' | 'scheduled' | 'scanning' | 'finalizing' | 'done' | 'failed', required — The current state of the scan process.
    - `description` string, nullable — Additional details about the progress.
    - `timestamp` string, date-time, required — Timestamp of the scan progress update.
  - `created_at` string, date-time, required — Timestamp indicating when the scan was created.
  - `saved_graph` object, nullable — If the scan is associated with a saved attack surface graph, this field contains its metadata.
    - `graph_id` string, required — Saved graph identifier.
    - `graph_name` string, required — Saved graph name.
    - `graph_version` integer, required — Saved graph version.
  - `estimated_time_to_complete` integer — Estimated time in seconds to complete the scan.
  - `queue_position` integer, nullable — Position of the scan in the processing queue.
  - `count` integer — Number of items in the index (e.g. number of collected responses).
  - `owner` object, required — Information about the owner of the scan.
    - `email` string, email, required — Email address of the scan owner.
    - `first_name` string, required — First name of the scan owner.
    - `last_name` string — Last name of the scan owner.
    - `teams` string[] — List of teams the scan owner belongs to.
  - `is_scan_from_team` boolean, required — Indicates whether the scan was initiated by another team member instead of the current user.
  - `mode` string, required — Scan execution mode.
  - `state` string, required — Current state of the scan.
  - `agent` ScannerAgent, required — Scanner agent that can initiate private scans from a specific geolocation.
    - `id` integer, required — Identifier of the scanner agent to use for the scan.
    - `description` string — Human-readable description of the scanner agent.
    - `name` string, required — Agent name.
    - `label` string, required — Agent label.
    - `location` string, required — Agent geolocation as an ISO 3166-1 alpha-2 country code.
    - `ip_address` Ipv4[], required — Public IP addresses used by the scanner agent.
    - `is_default` boolean — Indicates whether this agent is the default scanner agent for the user.
    - `queue_eta` integer — Estimated queue waiting time for this agent, in seconds.

## Other responses

- `400` — __Bad Request__: Some required parameters were not passed or were not validated
- `401` — __Unauthorized__: The request was rejected due to missing or invalid authentication credentials
- `404` — __Not Found__: The scan with the requested ID was not found
- `500` — __Internal Server Error__: Details are included in the response body

---

[API](https://skmtc.net/netlas/apis/netlas-api.md) · [All operations](https://skmtc.net/netlas/apis/netlas-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netlas/netlas-api/revisions/2b1f84425791/schema)
