A scriptable widget for monitoring your services/websites that gives you peace-of-mind 🧘🏻♂️.
- Download
script.js
to you iCloud scriptable directory. It will be synced onto your device. - Add your services and tests to the top of the file.
- Add a small scriptable widget to your home screen. See scriptable docs, if help is needed.
const services = [
{
name: "my-service",
path: "https://example.com/api",
type: "json",
test: (body) => true
}
];
property | required | description |
---|---|---|
name | yes | Display name of your service/site |
path | yes | Url of endpoint to check |
type | Tells the script how to parse the response for you: undefined (not at all), json , string , statusCode |
|
test | yes | A function to test your API. Gets the response as a parameter. Must return true /false |
You can use advanved options to modify the request:
const services = [
{
...
options: {
headers: {},
allowInsecureRequest: true,
}
}
];
property | required | description |
---|---|---|
headers | Add request headers {string: string} |
|
allowInsecureRequest | Skip certificate checks (for self-signed certs) |