# Get Artifact Results by ID

> Retrieve artifact check results by internal_artifact_id or external_artifact_id.

`GET /api/artifact/get_by_id`

Base URLs: `https://eu.whitecircle.com`, `https://us.whitecircle.com`

OpenAPI: [2025-12-01/openapi.json](https://whitecircle.com/docs/2025-12-01/openapi.json)

Retrieve the results of a previously submitted [artifact check](https://whitecircle.com/docs/2025-12-01/artifact/check-artifact.md). Use this endpoint to look up artifact policy check results using either the system-generated ID or your custom tracking identifier.

## Query Parameters

| Parameter                | Required | Description                                                                                           |
| ------------------------ | -------- | ----------------------------------------------------------------------------------------------------- |
| `internal_artifact_id`   |  ✓*      | System-generated UUID returned in the [artifact check](https://whitecircle.com/docs/2025-12-01/artifact/check-artifact.md) response.     |
| `external_artifact_id`   |  ✓*      | Your custom tracking ID passed when [checking the artifact](https://whitecircle.com/docs/2025-12-01/artifact/check-artifact.md).         |
| `deployment_id`          |          | Override deployment resolved from your API key. Defaults to the deployment associated with your API key.   |

*Exactly one of `internal_artifact_id` or `external_artifact_id` is required.

> [!TIP]
> For precise lookups, prefer `internal_artifact_id` over `external_artifact_id`.

> [!NOTE]
> When using `external_artifact_id` with multiple matches, the most recently created artifact within the same deployment is returned.

## Example Requests

Using the internal artifact ID:

```bash
curl -X GET "https://eu.whitecircle.com/api/artifact/get_by_id?internal_artifact_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "Authorization: Bearer wc-your-api-key" \
  -H "whitecircle-version: 2025-12-01"
```

Using your external artifact ID:

```bash
curl -X GET "https://eu.whitecircle.com/api/artifact/get_by_id?external_artifact_id=user-avatar-42" \
  -H "Authorization: Bearer wc-your-api-key" \
  -H "whitecircle-version: 2025-12-01"
```

## Response Overview

| Field                   | Type            | Description                                                                                 |
| ----------------------- | --------------- | ------------------------------------------------------------------------------------------- |
| `flagged`               | boolean \| null | `true` if any policy was violated. `null` while processing or on failure.                   |
| `policies`              | object          | Map of policy IDs to their violation statuses                                                |
| `kind`                  | string          | Content type of the artifact (e.g., `"image"`)                                               |
| `status`                | string          | Check status: `"completed"`, `"processing"`, or `"failed"`                                   |
| `updated_at`            | string          | ISO 8601 last update timestamp                                                               |
| `internal_artifact_id`  | string          | System-generated UUID for this artifact                                                      |
| `external_artifact_id`  | string          | Your custom artifact tracking ID (if provided)                                               |
| `external_session_id`   | string          | External ID of the linked session (if attached)                                              |
| `internal_session_id`   | string          | System-generated UUID of the linked session (if attached)                                    |
| `created_at`            | string          | ISO 8601 creation timestamp                                                                  |
| `note`                  | string          | Informational message, included when applicable (e.g. why an image fetch failed)                      |

Each policy in the `policies` object includes:

* `name` — Human-readable policy name
* `flagged` — Whether this specific policy was violated
* `flagged_source` — Array of content types that triggered the violation (e.g., `["image"]`)

## Authorizations

- `Authorization` (`string`, header, required): API Key required. Format: Bearer wc-your-api-key.

## Headers

- `whitecircle-version` (`string`, required): API Version. Example: `"2025-12-01"`.

## Query Parameters

- `internal_artifact_id` (`string | null`, optional)
- `external_artifact_id` (`string | null`, optional)
- `deployment_id` (`string | null`, optional)

## Request example

```bash
curl --request GET \
  --url 'https://eu.whitecircle.com/api/artifact/get_by_id?internal_artifact_id=<internal_artifact_id>' \
  --header "Authorization: Bearer $WHITECIRCLE_API_KEY" \
  --header 'whitecircle-version: 2025-12-01'
```

## Response

### 200

Artifact found

`application/json`

Artifact check result.

- `status` (`string`, required): Check status: "completed".
- `policies` (`object`, required): Map of policy ID to violation result.
- `policies.{key}` (`object`, optional): Policy violation result for an artifact check.
- `policies.{key}.flagged` (`boolean`, required): Whether this policy was violated.
- `policies.{key}.flagged_source` (`string[]`, required): Content types that triggered the violation (e.g., ["image"]).
- `policies.{key}.name` (`string`, required): Policy display name.
- `internal_artifact_id` (`string`, required): System-generated UUID for this artifact.
- `kind` (`string`, required): Echo of content.kind from request.
- `flagged` (`boolean | null`, optional): true if any policy was violated.
- `external_artifact_id` (`string | null`, optional): Your custom artifact ID (if provided).
- `internal_session_id` (`string | null`, optional): Internal ID of the linked session (if attached).
- `external_session_id` (`string | null`, optional): External ID of the linked session (if provided).
- `created_at` (`string | null`, optional): ISO 8601 creation timestamp.
- `updated_at` (`string | null`, optional): ISO 8601 last update timestamp.
- `note` (`string | null`, optional): Informational note (only present when applicable).

**Example**

```json
{
  "flagged": true,
  "policies": {
    "7eb45909-35a3-4bcb-81b9-049fc7413dba": {
      "name": "No Explicit Content",
      "flagged": true,
      "flagged_source": [
        "image"
      ]
    },
    "ad1f958e-e167-4e06-befc-434fd42563c9": {
      "name": "No Violence",
      "flagged": false,
      "flagged_source": []
    }
  },
  "kind": "image",
  "status": "completed",
  "created_at": "2025-12-01T10:30:00Z",
  "updated_at": "2025-12-01T10:30:00Z",
  "internal_artifact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "external_artifact_id": "user-avatar-42",
  "internal_session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "external_session_id": "user-session-123"
}
```

### 400

Bad Request
