> For the complete documentation index, see [llms.txt](https://docs.halosecurity.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.halosecurity.com/api/endpoints/http.md).

# HTTP

## Get a list of HTTP records

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

Returns a paginated list of HTTP records.

[https://app.halosecurity.com/user/security/firewall/http/list](https://app.halosecurity.com/user/security/firewall/http/list?)

#### Query Parameters

| Name       | Type    | Description                                                              |
| ---------- | ------- | ------------------------------------------------------------------------ |
| sort       | String  | <p><code>0</code></p><p>= none (default)</p>                             |
| sort\_desc | Integer | <p><code>0</code> = No <em>(default)</em></p><p><code>1</code> = Yes</p> |
| port       | Integer | Filter by port                                                           |

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

```javascript
{
    "list": [
        {
            "http": {
                "html_count_js": 0,
                "headers": [
                    {
                        "date": "Sun, 06 Feb 2022 18:45:56 GMT"
                    },
                    {
                        "content-type": "text/html; charset=utf-8"
                    },
                    {
                        "content-length": "90"
                    },
                    {
                        "connection": "keep-alive"
                    },
                    {
                        "server": "Apache"
                    },
                    {
                        "set-cookie": "JSESSIONID=123; path=/"
                    }
                ],
                "code": 503,
                "target_name": "",
                "monitor_state": 1,
                "target_id": 1,
                "url": "http://www.example.com",
                "target": "www.example.com",
                "platforms": [],
                "html_count_css": 0,
                "size": 90,
                "port": 80,
                "code_detail": "Service Unavailable",
                "scope": 1,
                "risk": "none",
                "location": "http://example.com",
                "scan_id": "id1",
                "html_count_link": 0
            },
            "target": {
                "target_name": "",
                "target_id": 1,
                "target": "www.example.com"
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get the details of an HTTP record.

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

Returns the details of an HTTP record.

[https://app.halosecurity.com/user/security/firewall/http/list](https://app.halosecurity.com/user/security/firewall/http/list?)

#### Query Parameters

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

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

```javascript
{
    "success": 1,
    "http": {
        "html_count_js": 0,
        "headers": [
            {
                "date": "Sun, 06 Feb 0000 00:00:00 GMT"
            },
            {
                "content-type": "text/html; charset=utf-8"
            },
            {
                "content-length": "90"
            },
            {
                "connection": "keep-alive"
            },
            {
                "server": "Apache"
            },
            {
                "set-cookie": "JSESSIONID=abc; path=/"
            }
        ],
        "code": 503,
        "target_name": "",
        "monitor_state": 1,
        "target_id": 1,
        "url": "http://www.example.com",
        "target": "www.example.com",
        "platforms": [],
        "html_count_css": 0,
        "size": 90,
        "port": 80,
        "code_detail": "Service Unavailable",
        "scope": 1,
        "risk": "none",
        "location": "http://www.example.com",
        "scan_id": "id1",
        "html_count_link": 0
    }
}
```

{% endtab %}

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

```javascript
{
    "code": 0,
    "message": "target_id required"
}
```

{% endtab %}

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

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

{% endtab %}

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

```javascript
{
    "code": 0,
    "message": "firewall not scanned"
}
```

{% endtab %}

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

```javascript
{
    "code": 0,
    "message": "http server not found"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/http.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.
