API reference / Tests and incidents
Change a place to test
Changes its name, address, test accounts, what the QA tester may press there, or its schedule: send only what changes. accounts replaces the whole list. A new address, or a change of what it allows, makes the QA tester test each test there again before Troopy replays it. Owners and admins.
/api/v1/test-environments/{id}Other ways to call it
troopy tests update-environmentIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
id*stringA 24-character id
Body
application/jsonnamestringAt least 1 characters · At most 60 characters
urlstringWhere 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
allowActionsbooleanscheduleobject | nullWhen the QA tester checks it by itself, or null for no schedule
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
200 · 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