Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Getting Started

Manabu Niseki edited this page Feb 20, 2022 · 1 revision

Note: using HTTPie in the following sections.

Create an API key

$ http localhost:8000/api/api_keys/new secret-api-key:uzen

{
    "apiKey": "YOUR_API_KEY",
    "createdAt": "2022-02-20T09:16:39.435731+00:00",
    "isActive": true,
    "lastQueriedAt": null,
    "totalQueries": 0
}

Then you will get your API key.

Take a snapshot

$ http localhost:8000/api/snapshots/ url=http://example.com api-key:YOUR_API_KEY
{
    "id": "017f166a-ca4e-993f-45c2-d5794f726226",
    "type": "snapshot"
}

# then a snapshot job is queued
# you can check a status of the queued job
$ http localhost:8000/api/jobs/snapshots/017f166a-ca4e-993f-45c2-d5794f726226
{
    "definition": {
        "enqueueTime": "2022-02-20T09:16:11.734000+00:00",
        "payload": {
            "deviceName": null,
            "enableHar": false,
            "headers": {},
            "ignoreHttpsErrors": null,
            "tags": null,
            "timeout": null,
            "url": "http://example.com",
            "waitUntil": "load"
        }
    },
    "id": "017f166a-ca4e-993f-45c2-d5794f726226",
    "isRunning": false,
    "result": {
        "snapshotId": "01FWB6YNZYDTMACJRPND9Z9JYC"
    }
}

# finally you can get a snapshot
$ http localhost:8000/api/snapshots/01FWB6YNZYDTMACJRPND9Z9JYC
Clone this wiki locally