API reference / Tests and incidents
Add a place to test
Adds a place where the QA tester checks the product: production (the live product, one at most) or staging (a copy of it), at an https address of its own. A host that many businesses share, like vercel.app on its own, is refused. Test accounts are logins in the vault, by a label that tests name. On production the QA tester only looks and checks. On staging, allowActions lets it press buttons that change data. It never pays. A schedule makes the QA tester check it by itself, each hour, day or week. Owners and admins.
/api/v1/test-environmentsOther ways to call it
troopy tests add-environmentIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Body
application/jsonname*stringAt least 1 characters · At most 60 characters
kind*enum<string>productionstaging
url*stringWhere the product starts, like https://staging.example.com. Only https
At least 1 characters · At most 300 characters
accountsarray<object>At most 5 items
2 properties
label*stringWhat tests call the account, like admin or customer
At least 1 characters · At most 40 characters
item*stringA login in the vault
allowActionsbooleanStaging only: whether the QA tester may press buttons that change data there. Off unless set
scheduleobject | nullWhen the QA tester checks it by itself. With no QA tester, Troopy only looks whether it loads
7 properties
every*enum<string>hour: each hour at the minute. day: each day at the hour and minute. week: each week on the weekday, at the hour and minute
hourdayweek
hourintegerA daily or weekly check's hour
Default 8 · At least 0 · At most 23
minuteintegerDefault 0 · At least 0 · At most 59
weekdayintegerA weekly check's day: 0 is Sunday
Default 1 · At least 0 · At most 6
timezonestringThe IANA time zone of the hour, like Europe/Berlin. Left out: the workspace's, or UTC
At most 64 characters
testsenum<string>main: the tests on the main path. all: every active test. On production, only the tests that are safe there
mainall
Default "main"
pausedbooleanA paused schedule starts no check
Default false
Response
201 · application/jsondata*object13 properties
id*stringA 24-character id
name*stringkind*enum<string>production: the live product. staging: a copy of it to test on
productionstaging
url*stringWhere the product starts, on https
accounts*array<object>The test accounts that the QA tester signs in with. Their passwords stay in the vault
2 properties
label*stringWhat tests call the account, like admin or customer
item*objectThe login in the vault
2 properties
id*stringA 24-character id
name*string | nullnull when the login is gone from the vault
allowActions*booleanWhether the QA tester may press buttons that change data there: staging only. It never pays
schedule*object | nullWhen the QA tester checks the place by itself. null: only when someone asks
7 properties
every*enum<string>hour: each hour at the minute. day: each day at the hour and minute. week: each week on the weekday, at the hour and minute
hourdayweek
hour*integerA daily or weekly check's hour
Default 8 · At least 0 · At most 23
minute*integerDefault 0 · At least 0 · At most 59
weekday*integerA weekly check's day: 0 is Sunday
Default 1 · At least 0 · At most 6
timezonestringThe IANA time zone of the hour, like Europe/Berlin. Left out: the workspace's, or UTC
At most 64 characters
tests*enum<string>main: the tests on the main path. all: every active test. On production, only the tests that are safe there
mainall
Default "main"
paused*booleanA paused schedule starts no check
Default false
nextRunAt*string | nullWhen its next scheduled check starts. null with no schedule, or a paused one
failing*object | nullIts scheduled checks began to fail then. A scheduled check that passes ends it, and so do a pause and the end of the schedule
2 properties
since*stringISO 8601 date and time
run*stringThe latest scheduled test run that failed
missed*object | nullThe latest scheduled check that couldn't start, and why, like the daily limit of test runs. A check that starts clears it
2 properties
at*stringISO 8601 date and time
why*stringcreatedBy*objectWho wrote it
3 properties
type*enum<string>personagentapi
id*stringname*stringcreatedAt*stringISO 8601 date and time
updatedAt*stringISO 8601 date and time