> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/security-testing-agent-apis/security-testing-orchestration/ingestion-activity.md).

# Ingestion Activity

Internal APIs for ingestion worker activity on external Qwiet scans

## Get ingestion activity summary

> Return recorded statuses, ingestion\_started attempt count, and Harness scan IDs for one external scan identity

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"IngestionActivity","description":"Internal APIs for ingestion worker activity on external Qwiet scans"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"jwt_header_Authorization":["sto_internal_use_only"]}],"components":{"securitySchemes":{"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"IngestionActivityGetSummaryResponseBody":{"$ref":"#/components/schemas/IngestionActivitySummary"},"IngestionActivitySummary":{"type":"object","properties":{"harness_scan_ids":{"type":"array","items":{"type":"string"},"description":"Distinct non-null Harness scan ids recorded on activity rows"},"ingestion_started_count":{"type":"integer","description":"Number of ingestion_started rows, including retries","format":"int64"},"statuses":{"type":"array","items":{"type":"string"},"description":"Distinct activity statuses recorded for this identity"}},"required":["statuses","ingestion_started_count","harness_scan_ids"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/ingestion-activity":{"get":{"description":"Return recorded statuses, ingestion_started attempt count, and Harness scan IDs for one external scan identity","operationId":"IngestionActivity#GetSummary","parameters":[{"allowEmptyValue":true,"description":"Harness Account ID","in":"query","name":"accountId","required":true,"schema":{"description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$","type":"string"}},{"allowEmptyValue":true,"description":"Harness Organization ID","in":"query","name":"orgId","required":true,"schema":{"description":"Harness Organization ID","maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},{"allowEmptyValue":true,"description":"Harness Project ID","in":"query","name":"projectId","required":true,"schema":{"description":"Harness Project ID","maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},{"allowEmptyValue":true,"description":"STO product name","in":"query","name":"productId","required":true,"schema":{"description":"STO product name","maxLength":32,"minLength":1,"type":"string"}},{"allowEmptyValue":true,"in":"query","name":"externalTargetName","required":true,"schema":{"maxLength":256,"minLength":1,"type":"string"}},{"allowEmptyValue":true,"in":"query","name":"externalScanId","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionActivityGetSummaryResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"BadRequest: Bad Request response."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"Unauthorized: Unauthorized response."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"Forbidden: Forbidden response."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"NotFound: Not Found response."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"TooManyRequests: Too Many Requests response."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"InternalServerError: Internal Server Error response."}},"summary":"Get ingestion activity summary","tags":["IngestionActivity"]}}}}
```

## Record ingestion worker status

> Append ingestion\_started or ingestion\_exhausted for one external scan identity

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"IngestionActivity","description":"Internal APIs for ingestion worker activity on external Qwiet scans"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"jwt_header_Authorization":["sto_internal_use_only"]}],"components":{"securitySchemes":{"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"IngestionActivityRecordWorkerStatusResponseBody":{"$ref":"#/components/schemas/RecordIngestionActivityResult"},"RecordIngestionActivityResult":{"type":"object","properties":{"recorded":{"type":"boolean","description":"True when a new row was inserted; false when a once-only status was already recorded"}},"required":["recorded"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/ingestion-activity":{"post":{"description":"Append ingestion_started or ingestion_exhausted for one external scan identity","operationId":"IngestionActivity#RecordWorkerStatus","parameters":[{"allowEmptyValue":true,"description":"Harness Account ID","in":"query","name":"accountId","required":true,"schema":{"description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$","type":"string"}},{"allowEmptyValue":true,"description":"Harness Organization ID","in":"query","name":"orgId","required":true,"schema":{"description":"Harness Organization ID","maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},{"allowEmptyValue":true,"description":"Harness Project ID","in":"query","name":"projectId","required":true,"schema":{"description":"Harness Project ID","maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"external_scan_id":{"format":"int64","minimum":1,"type":"integer"},"external_target_name":{"maxLength":256,"minLength":1,"type":"string"},"harness_scan_id":{"description":"Harness scan id created for this attempt, when available","pattern":"^[a-zA-Z0-9_-]{22}$","type":"string"},"metadata":{"additionalProperties":true,"description":"Optional error or attempt context","type":"object"},"product_id":{"description":"STO product name","maxLength":32,"minLength":1,"type":"string"},"status":{"enum":["ingestion_started","ingestion_exhausted"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionActivityRecordWorkerStatusResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"BadRequest: Bad Request response."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"Unauthorized: Unauthorized response."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"Forbidden: Forbidden response."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"NotFound: Not Found response."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"TooManyRequests: Too Many Requests response."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}},"description":"InternalServerError: Internal Server Error response."}},"summary":"Record ingestion worker status","tags":["IngestionActivity"]}}}}
```
