暦
Schedules API
7 operationsjobs:readjobs:write
Cron schedules that fire a job on every tick, with no overlap, pause and resume, and declarative upsert by name.
| GET | /schedules | List schedules. |
| POST | /schedules | Create a cron schedule that fires a job on every tick. |
| PUT | /schedules | Create or update a schedule by name, for declarative sync. |
| DELETE | /schedules/{scheduleId} | Delete a schedule. |
| GET | /schedules/{scheduleId} | Get a schedule with its next run time. |
| PATCH | /schedules/{scheduleId} | Update, pause or resume a schedule. |
| POST | /schedules/{scheduleId}/run | Run a schedule now, by hand, such as a saved flow with input values for this run. Refused while its last run is still queued or running. |
List schedules.
GET
/v1/schedulesscope jobs:read
Parameters
pageinteger | |
limitinteger | |
withTotalboolean | |
typestring |
Response
45 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | Schedule[] |
browser | BrowserRequest | null |
actions | Action[] |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
clientRef | string |
createdAt | integer (int64) |
cron | string |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
jitterSeconds | integer (int32) |
lastRunAt | integer (int64) | null |
maxAttempts | integer (int32) |
metadata | map |
name | string |
nextRunAt | integer (int64) | null |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
tunnel | string |
status | string |
timezone | string |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/schedules" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/schedules", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/schedules", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "browser": null, "clientRef": "…", "createdAt": 0, "cron": "…", "flow": null, "jitterSeconds": 0, "lastRunAt": null, "maxAttempts": 0, "metadata": {}, "name": "…", "nextRunAt": null, "request": null, "scheduleId": "abc123", "script": null, "skills": null, "status": "…", "timezone": "…", "updatedAt": 0 } ] }
Create a cron schedule that fires a job on every tick.
POST
/v1/schedulesscope jobs:write
Request body
browserBrowserRequest | null | |
actionsAction[] | |
envstring[] | |
inputmap | |
profileIdstring | |
timeoutSecondsinteger (int32) | |
tunnelstring | |
urlstring required | |
cronstring | |
flowFlowRequest | null | |
inputmap | |
stepsFlowStep[] required | |
jitterSecondsinteger (int32) | |
maxAttemptsinteger (int32) | |
metadatamap | |
namestring required | |
requestHttpRequest | null | |
bodystring | |
headersmap | |
methodstring required | |
timeoutSecondsinteger (int32) | |
urlstring required | |
scriptScriptRequest | null | |
envstring[] | |
runtimestring required | |
sourcestring required | |
timeoutSecondsinteger (int32) | |
skillsSkillsRequest | null | |
maxMinutesinteger (int32) | |
profileIdstring | |
stepsSkillStep[] required | |
tunnelstring | |
timezonestring |
Response
67 fields
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
clientRef | string |
createdAt | integer (int64) |
cron | string |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
jitterSeconds | integer (int32) |
lastRunAt | integer (int64) | null |
maxAttempts | integer (int32) |
metadata | map |
name | string |
nextRunAt | integer (int64) | null |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
status | string |
timezone | string |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/schedules" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "timezone": "…" }'
const res = await fetch("https://api.hoshime.com/v1/schedules", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "timezone": "…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/schedules", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": None, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": None, "browser": None, "check": None, "endpoint": None, "id": "abc123", "if": "…", "maxAttempts": 0, "request": None, "script": None, "skills": None, "wait": None } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": False, "params": None, "skill": "…" } ], "tunnel": "…" }, "timezone": "…" }, ) body = res.json()
{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "clientRef": "…", "createdAt": 0, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "lastRunAt": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "nextRunAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…", "updatedAt": 0 }
Create or update a schedule by name, for declarative sync.
PUT
/v1/schedulesscope jobs:write
Request body
browserBrowserRequest | null | |
actionsAction[] | |
envstring[] | |
inputmap | |
profileIdstring | |
timeoutSecondsinteger (int32) | |
tunnelstring | |
urlstring required | |
cronstring | |
flowFlowRequest | null | |
inputmap | |
stepsFlowStep[] required | |
jitterSecondsinteger (int32) | |
maxAttemptsinteger (int32) | |
metadatamap | |
namestring required | |
requestHttpRequest | null | |
bodystring | |
headersmap | |
methodstring required | |
timeoutSecondsinteger (int32) | |
urlstring required | |
scriptScriptRequest | null | |
envstring[] | |
runtimestring required | |
sourcestring required | |
timeoutSecondsinteger (int32) | |
skillsSkillsRequest | null | |
maxMinutesinteger (int32) | |
profileIdstring | |
stepsSkillStep[] required | |
tunnelstring | |
statusstring | |
timezonestring |
Response
67 fields
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
clientRef | string |
createdAt | integer (int64) |
cron | string |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
jitterSeconds | integer (int32) |
lastRunAt | integer (int64) | null |
maxAttempts | integer (int32) |
metadata | map |
name | string |
nextRunAt | integer (int64) | null |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
status | string |
timezone | string |
updatedAt | integer (int64) |
curl -X PUT "https://api.hoshime.com/v1/schedules" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…" }'
const res = await fetch("https://api.hoshime.com/v1/schedules", { method: "PUT", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.put( "https://api.hoshime.com/v1/schedules", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": None, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": None, "browser": None, "check": None, "endpoint": None, "id": "abc123", "if": "…", "maxAttempts": 0, "request": None, "script": None, "skills": None, "wait": None } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": False, "params": None, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…" }, ) body = res.json()
{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "clientRef": "…", "createdAt": 0, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "lastRunAt": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "nextRunAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…", "updatedAt": 0 }
Delete a schedule.
DELETE
/v1/schedules/{scheduleId}scope jobs:write
Parameters
scheduleIdstring · path required |
Response
1 fields
status | boolean |
curl -X DELETE "https://api.hoshime.com/v1/schedules/{scheduleId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/schedules/{scheduleId}", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.delete( "https://api.hoshime.com/v1/schedules/{scheduleId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "status": false }
Get a schedule with its next run time.
GET
/v1/schedules/{scheduleId}scope jobs:read
Parameters
scheduleIdstring · path required |
Response
67 fields
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
clientRef | string |
createdAt | integer (int64) |
cron | string |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
jitterSeconds | integer (int32) |
lastRunAt | integer (int64) | null |
maxAttempts | integer (int32) |
metadata | map |
name | string |
nextRunAt | integer (int64) | null |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
status | string |
timezone | string |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/schedules/{scheduleId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/schedules/{scheduleId}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/schedules/{scheduleId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "clientRef": "…", "createdAt": 0, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "lastRunAt": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "nextRunAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…", "updatedAt": 0 }
Update, pause or resume a schedule.
PATCH
/v1/schedules/{scheduleId}scope jobs:write
Parameters
scheduleIdstring · path required |
Request body
browserBrowserRequest | null | |
actionsAction[] | |
envstring[] | |
inputmap | |
profileIdstring | |
timeoutSecondsinteger (int32) | |
tunnelstring | |
urlstring required | |
cronstring | null | |
flowFlowRequest | null | |
inputmap | |
stepsFlowStep[] required | |
jitterSecondsinteger (int32) | null | |
maxAttemptsinteger (int32) | |
metadatamap | |
namestring | |
requestHttpRequest | null | |
bodystring | |
headersmap | |
methodstring required | |
timeoutSecondsinteger (int32) | |
urlstring required | |
scriptScriptRequest | null | |
envstring[] | |
runtimestring required | |
sourcestring required | |
timeoutSecondsinteger (int32) | |
skillsSkillsRequest | null | |
maxMinutesinteger (int32) | |
profileIdstring | |
stepsSkillStep[] required | |
tunnelstring | |
statusstring | |
timezonestring |
Response
67 fields
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
clientRef | string |
createdAt | integer (int64) |
cron | string |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
jitterSeconds | integer (int32) |
lastRunAt | integer (int64) | null |
maxAttempts | integer (int32) |
metadata | map |
name | string |
nextRunAt | integer (int64) | null |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
status | string |
timezone | string |
updatedAt | integer (int64) |
curl -X PATCH "https://api.hoshime.com/v1/schedules/{scheduleId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…" }'
const res = await fetch("https://api.hoshime.com/v1/schedules/{scheduleId}", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.patch( "https://api.hoshime.com/v1/schedules/{scheduleId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": None, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": None, "browser": None, "check": None, "endpoint": None, "id": "abc123", "if": "…", "maxAttempts": 0, "request": None, "script": None, "skills": None, "wait": None } ] }, "jitterSeconds": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": False, "params": None, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…" }, ) body = res.json()
{ "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "clientRef": "…", "createdAt": 0, "cron": "…", "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "jitterSeconds": 0, "lastRunAt": 0, "maxAttempts": 0, "metadata": {}, "name": "…", "nextRunAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "status": "…", "timezone": "…", "updatedAt": 0 }
Run a schedule now, by hand, such as a saved flow with input values for this run. Refused while its last run is still queued or running.
POST
/v1/schedules/{scheduleId}/runscope jobs:write
Bills 1 unit when the run is queued, plus what the run bills, as POST /v1/jobs does.
Parameters
scheduleIdstring · path required |
Request body
inputmap |
Response
117 fields
attempt | integer (int32) |
browser | BrowserRequest | null |
actions | Action[] |
height | integer (int32) |
key | string |
maxLoops | integer (int32) |
ms | integer (int32) |
optional | boolean | null |
script | string |
selector | string |
text | string |
type | string |
url | string |
urlPattern | string |
values | string[] |
width | integer (int32) |
env | string[] |
input | map |
profileId | string |
timeoutSeconds | integer (int32) |
tunnel | string |
url | string |
browserResult | BrowserResult | null |
durationMs | integer (int32) |
evaluateResults | string[] |
finalUrl | string |
httpStatus | integer (int32) |
clientRef | string |
createdAt | integer (int64) |
error | string |
export | ExportRequest | null |
endpoint | string |
maxItems | integer (int32) |
params | map |
platform | string |
exportResult | ExportResult | null |
complete | boolean |
items | integer (int64) |
pages | integer (int32) |
units | integer (int64) |
finishedAt | integer (int64) | null |
flow | FlowRequest | null |
input | map |
steps | FlowStep[] |
ai | FlowAI | null |
browser | BrowserRequest | null |
check | FlowCheck | null |
endpoint | FlowEndpoint | null |
id | string |
if | string |
maxAttempts | integer (int32) |
request | HttpRequest | null |
script | ScriptRequest | null |
skills | SkillsRequest | null |
wait | FlowWait | null |
flowResult | FlowResult | null |
steps | FlowStepResult[] |
attempts | integer (int32) |
error | string |
finishedAt | integer (int64) | null |
id | string |
output | any | null |
startedAt | integer (int64) |
status | string |
idempotencyKey | string | null |
jobId | string |
maxAttempts | integer (int32) |
metadata | map |
nextAttemptAt | integer (int64) |
request | HttpRequest | null |
body | string |
headers | map |
method | string |
timeoutSeconds | integer (int32) |
url | string |
result | HttpResult | null |
bodyPreview | string |
latencyMs | integer (int32) |
statusCode | integer (int32) |
runAt | integer (int64) |
scheduleId | string |
script | ScriptRequest | null |
env | string[] |
runtime | string |
source | string |
timeoutSeconds | integer (int32) |
scriptResult | ScriptResult | null |
durationMs | integer (int32) |
exitCode | integer (int32) |
stderr | string |
stdout | string |
skills | SkillsRequest | null |
maxMinutes | integer (int32) |
profileId | string |
steps | SkillStep[] |
optional | boolean |
params | object | null |
skill | string |
tunnel | string |
skillsResult | SkillsResult | null |
durationMs | integer (int32) |
steps | SkillStepResult[] |
attempts | integer (int32) |
code | string |
durationMs | integer (int64) |
error | string |
healed | SkillHeal[] |
result | object | null |
skill | string |
startedAt | integer (int64) |
status | string |
url | string |
startedAt | integer (int64) | null |
status | string |
ttl | integer (int64) |
type | string |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/schedules/{scheduleId}/run" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "input": {} }'
const res = await fetch("https://api.hoshime.com/v1/schedules/{scheduleId}/run", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "input": {} }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/schedules/{scheduleId}/run", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "input": {} }, ) body = res.json()
{ "attempt": 0, "browser": { "actions": [ { "height": 0, "key": "…", "maxLoops": 0, "ms": 0, "optional": null, "script": "…", "selector": "…", "text": "…", "type": "…", "url": "https://…", "urlPattern": "…", "values": [], "width": 0 } ], "env": [ "…" ], "input": {}, "profileId": "abc123", "timeoutSeconds": 0, "tunnel": "…", "url": "https://…" }, "browserResult": { "durationMs": 0, "evaluateResults": [ "…" ], "finalUrl": "https://…", "httpStatus": 0 }, "clientRef": "…", "createdAt": 0, "error": "…", "export": { "endpoint": "…", "maxItems": 0, "params": {}, "platform": "…" }, "exportResult": { "complete": false, "items": 0, "pages": 0, "units": 0 }, "finishedAt": 0, "flow": { "input": {}, "steps": [ { "ai": null, "browser": null, "check": null, "endpoint": null, "id": "abc123", "if": "…", "maxAttempts": 0, "request": null, "script": null, "skills": null, "wait": null } ] }, "flowResult": { "steps": [ { "attempts": 0, "error": "…", "finishedAt": null, "id": "abc123", "output": null, "startedAt": 0, "status": "…" } ] }, "idempotencyKey": "…", "jobId": "abc123", "maxAttempts": 0, "metadata": {}, "nextAttemptAt": 0, "request": { "body": "…", "headers": {}, "method": "…", "timeoutSeconds": 0, "url": "https://…" }, "result": { "bodyPreview": "…", "latencyMs": 0, "statusCode": 0 }, "runAt": 0, "scheduleId": "abc123", "script": { "env": [ "…" ], "runtime": "…", "source": "…", "timeoutSeconds": 0 }, "scriptResult": { "durationMs": 0, "exitCode": 0, "stderr": "…", "stdout": "…" }, "skills": { "maxMinutes": 0, "profileId": "abc123", "steps": [ { "optional": false, "params": null, "skill": "…" } ], "tunnel": "…" }, "skillsResult": { "durationMs": 0, "steps": [ { "attempts": 0, "code": "…", "durationMs": 0, "error": "…", "healed": [], "result": null, "skill": "…", "startedAt": 0, "status": "…", "url": "https://…" } ] }, "startedAt": 0, "status": "…", "ttl": 0, "type": "…", "updatedAt": 0 }