# Targets#PatchTarget

Update only certain fields on an existing Test Target

Endpoint: PATCH /sto/api/v2/targets/{id}
Version: 1.0
Security: 

## Query parameters:

  - `accountId` (string, required)
    Harness Account ID
    Example: "abcdef1234567890ghijkl"

  - `orgId` (string, required)
    Harness Organization ID
    Example: "example_org"

  - `projectId` (string, required)
    Harness Project ID
    Example: "example_project"

## Path parameters:

  - `id` (string, required)
    The ID of the Test Target to update
    Example: "abcdef1234567890ghijkl"

## Header parameters:

  - `X-Api-Key` (string)
    Harness personal or service access token
    Example: "Et id commodi."

## Request fields (application/json):

  - `baselineRegEx` (string)
    RegEx to match for dynamically selecting the Baseline for this Scan Target. Must be compatible with the RE2 standard.
    Example: "release_.*"

  - `baselineVariantId` (string)
    ID of baseline Target Variant for Issue comparison
    Example: "abcdef1234567890ghijkl"

  - `directory` (string)
    Directory within the Test Target to be scanned
    Example: "app/src"

  - `name` (string)
    Name of the Test Target
    Example: "NodeGoat"

  - `type` (string)
    Test Target's type
    Enum: "container", "repository", "instance", "configuration"

  - `url` (string)
    URL used to access the Test Target
    Example: "https://github.com/example/repo"

## Response 200 fields (application/json):

  - `baselineRegEx` (string)
    RegEx to match for dynamically selecting the Baseline for this Scan Target. Must be compatible with the RE2 standard.
    Example: "release_.*"

  - `baselineVariantId` (string)
    ID of baseline Target Variant for Issue comparison
    Example: "abcdef1234567890ghijkl"

  - `created` (integer, required)
    Unix timestamp at which the resource was created
    Example: 1651578240

  - `directory` (string)
    Directory within the Test Target to be scanned
    Example: "app/src"

  - `id` (string, required)
    Resource identifier
    Example: "abcdef1234567890ghijkl"

  - `lastModified` (integer, required)
    Unix timestamp at which the resource was most recently modified
    Example: 1651578240

  - `name` (string, required)
    Name of the Test Target
    Example: "NodeGoat"

  - `orgId` (string, required)
    Harness Organization ID
    Example: "example_org"

  - `projectId` (string, required)
    Harness Project ID
    Example: "example_project"

  - `type` (string, required)
    Test Target's type
    Enum: "container", "repository", "instance", "configuration"

  - `url` (string)
    URL used to access the Test Target
    Example: "https://github.com/example/repo"

## Response 400 fields (application/json):

  - `message` (string, required)
    Example: "Not Found"

  - `status` (integer)
    Example: 404


