> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.http.Uptime

- Component: `appmixer.utils.http.Uptime`
- Kind: Trigger
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.http 1.7.5](https://connectors.appmixer.com/connector/appmixer.utils.http/1.7.5.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.http/1.7.5/component/appmixer.utils.http.Uptime>

Periodically checks if a site is up or down. Message is sent to output port when site's availability is changed (site goes up or down).

## Properties

| Field | Type | Description |
| --- | --- | --- |
| Site URL (`target`) | text | A site URL to check for uptime. Must start with either http:// or https:// protocol. |

## Output ports

### Port `up`

| Field | Type | Description |
| --- | --- | --- |
| Target URL (`target`) | string | - |
| Down time (ms) (`downTimeMs`) | integer | - |
| Down time (text) (`downTimeText`) | string | - |
| Status code (`statusCode`) | integer | - |

### Port `down`

| Field | Type | Description |
| --- | --- | --- |
| Target URL (`target`) | string | - |
| Status code (`statusCode`) | integer | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.http.Uptime",
  "author": "David Durman <david@client.io>",
  "description": "Periodically checks if a site is up or down. Message is sent to output port when site's availability is changed (site goes up or down).",
  "tick": true,
  "outPorts": [
    {
      "name": "up",
      "options": [
        {
          "label": "Target URL",
          "value": "target",
          "schema": {
            "type": "string",
            "example": "https://www.example.com/"
          }
        },
        {
          "label": "Down time (ms)",
          "value": "downTimeMs",
          "schema": {
            "type": "integer",
            "example": 300000
          }
        },
        {
          "label": "Down time (text)",
          "value": "downTimeText",
          "schema": {
            "type": "string",
            "example": "5 minutes"
          }
        },
        {
          "label": "Status code",
          "value": "statusCode",
          "schema": {
            "type": "integer",
            "example": 200
          }
        }
      ]
    },
    {
      "name": "down",
      "options": [
        {
          "label": "Target URL",
          "value": "target",
          "schema": {
            "type": "string",
            "example": "https://www.example.com/"
          }
        },
        {
          "label": "Status code",
          "value": "statusCode",
          "schema": {
            "type": "integer",
            "example": 503
          }
        }
      ]
    }
  ],
  "properties": {
    "schema": {
      "properties": {
        "target": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "target"
      ]
    },
    "inspector": {
      "inputs": {
        "target": {
          "type": "text",
          "label": "Site URL",
          "index": 1,
          "tooltip": "A site URL to check for uptime. Must start with either http:// or https:// protocol."
        }
      }
    }
  },
  "icon": "(data URI omitted)"
}
```
