Target Variants
Access and modify Scan Target Variants
List a collection of Scan Target Variants
Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Page number to fetch (starting from 0)
0Example: 4Number of results per page
30Example: 50Resource name
NodeGoatHarness personal or service access token
Laboriosam magnam.OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/targets/{targetId}/variants?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pagination": {
"link": "",
"page": 4,
"pageSize": 20,
"totalItems": 230,
"totalPages": 12
},
"results": [
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
},
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
},
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
},
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
}
]
}Create a new Scan Target Variant
Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness personal or service access token
Labore nesciunt necessitatibus magnam fugit et debitis.Git Commit or Container Image hash
deadbeefdeadbeefdeadbeefdeadbeefdeadbeefOK response.
Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
POST /gateway/sto/api/v2/targets/{targetId}/variants?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"parameters": {
"branch": "main"
}
}{
"id": "abcdef1234567890ghijkl"
}Find Scan Target Variant by ID
Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$The ID of the Scan Target Variant to retrieve
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness personal or service access token
Deleniti maxime ut labore.OK response.
Information about a Scan Target Variant
Unix timestamp at which the resource was created
1651578240Git Commit or Container Image hash
deadbeefdeadbeefdeadbeefdeadbeefdeadbeefResource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/targets/{targetId}/variants/{id}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
}Update an existing Scan Target Variant
Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$The ID of the Scan Target Variant to update
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness personal or service access token
Veniam consequatur cum nihil dolor deserunt possimus.Git Commit or Container Image hash
deadbeefdeadbeefdeadbeefdeadbeefdeadbeefOK response.
Information about a Scan Target Variant
Unix timestamp at which the resource was created
1651578240Git Commit or Container Image hash
deadbeefdeadbeefdeadbeefdeadbeefdeadbeefResource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Associated Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
PUT /gateway/sto/api/v2/targets/{targetId}/variants/{id}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"parameters": {
"branch": "main"
}
}{
"created": 1651578240,
"hash": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"id": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"parameters": {
"branch": "main"
},
"targetId": "abcdef1234567890ghijkl"
}Last updated
Was this helpful?