# PCI

## Retrieve a summary of PCI reports and their status.

<mark style="color:blue;">`GET`</mark> `https://api.halosecurity.com/api/v1/pci/summary.json`

Retrieve a summary of PCI reports and their status.

[https://app.halosecurity.com/user/security/pci/](https://app.halosecurity.com/user/security/pci/?)

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "report_count": 1,
    "last_report_id": 123,
    "status": "pending"
}
```

{% endtab %}
{% endtabs %}

## Start PCI attestation process.

<mark style="color:blue;">`GET`</mark> `https://api.halosecurity.com/api/v1/pci/start.json`

Start PCI attestation process and receive questions which must be attested to.

[https://app.halosecurity.com/user/security/pci/](https://app.halosecurity.com/user/security/pci/?)

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    'id':'UUID',
    'attestation':'text you must agree to',
    'target_count':10,
    'target_hosts_oos':1,
    'target_ids_require_scan':[1,2], //these targets must be scanned before attest
    'target_ids_has_vuln':[1,2], //these targets have issues that must be resolved before attest
    'questions':[{ //answers to these questions must be provided in attest
       'id':1,
       'text':'question 1 text?',
       'type':'yesno'
    },{...}],
    'notes':[{ //acceptance of these notes must be provided in attest
       'id':1,
       'issue_id':100,
       'issue_name':'XSS',
       'target_id':5,
       'target_host':'example.com',
       'text':'note text',
       'type':'note type'
    },{...}]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "code": 0,
    "message": "no targets in pci scope"
}
```

{% endtab %}
{% endtabs %}

## Attest to a given PCI report.

<mark style="color:green;">`POST`</mark> `https://api.halosecurity.com/api/v1/pci/attest.json`

Attest to a given PCI report. Requires the `id` returned from the `start.json` method.

[https://app.halosecurity.com/user/security/pci/](https://app.halosecurity.com/user/security/pci/?)

#### Request Body

| Name                                                    | Type       | Description                                                                                                                                                                  |
| ------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id<mark style="color:red;">\*</mark>                    | UUID       |                                                                                                                                                                              |
| report\_name<mark style="color:red;">\*</mark>          | String     |                                                                                                                                                                              |
| attest\_person\_name<mark style="color:red;">\*</mark>  | String     |                                                                                                                                                                              |
| attest\_person\_title<mark style="color:red;">\*</mark> | String     |                                                                                                                                                                              |
| questions<mark style="color:red;">\*</mark>             | JSON Array | \[{'id':1,answer:'yes'}]                                                                                                                                                     |
| notes<mark style="color:red;">\*</mark>                 | JSON Array | <p>\[{</p><p>'target\_<em>id':'1',</em></p><p><em>'issue\_id':'2',</em></p><p><em>'secure':'1',</em></p><p><em>'response':'your response message'</em></p><p><em>}]</em></p> |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "success": 1,
    "report": {
        "attest_name": "Attest Name",
        "target_count": 1,
        "name": "Report Name",
        "pci_report_id": 12345,
        "attest_title": "Attest Title",
        "status": "draft"
    }
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    "code": 0,
    "message": "pci attestation not found"
}
```

{% endtab %}
{% endtabs %}

## List details about PCI reports.

<mark style="color:blue;">`GET`</mark> `https://api.halosecurity.com/api/v1/pci/report-list.json`

List details about PCI reports including their names and `pci_report_id`.

[https://app.halosecurity.com/user/security/pci/](https://app.halosecurity.com/user/security/pci/?)

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "request": {
        "target_count": 3,
        "sort": "1"
    },
    "pagination": {
        "total": 1,
        "start": 0,
        "limit": 100
    },
    "list": [
        {
            "report": {
                "attest_name": "Attest Name",
                "target_count": 1,
                "name": "Report Name",
                "pci_report_id": 127345,
                "attest_title": "Attest Title",
                "status": "draft"
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get details about a specific PCI report.

<mark style="color:blue;">`GET`</mark> `https://api.halosecurity.com/api/v1/pci/report-get.json`

Get details about a specific PCI report. Requires the `pci_report_id` returned from the `report-list.json` method.

[https://app.halosecurity.com/user/security/pci/](https://app.halosecurity.com/user/security/pci/?)

#### Query Parameters

| Name                                              | Type    | Description |
| ------------------------------------------------- | ------- | ----------- |
| pci\_report\_id<mark style="color:red;">\*</mark> | Integer |             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "request": {
        "target_count": 3,
        "sort": "1"
    },
    "report": {
        "attest_name": "Attest Name",
        "target_count": 1,
        "notes": [],
        "name": "Report Name",
        "pci_report_id": 12345,
        "attest_title": "Attest Title",
        "target_ids": [
            1234
        ],
        "status": "draft"
    }
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    "code": 0,
    "message": "Report Not Found"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.halosecurity.com/api/endpoints/pci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
