1. Create a read-only token
Sign in to your workspace as an active Owner or Admin. Open Account → API tokens, choose Create token, name it, and select only Read tests (control_test:read). Choose an expiry of 7, 30, or 90 days and copy the secret from the one-time dialog. If you lack access, ask a workspace Owner or Admin to issue the token.
Set API_BASE_URL to your Resguarda application origin without a trailing slash (for example https://resguarda.security-consultant.com). Load the secret into your terminal as RESGUARDA_API_TOKEN from your secret store. Keep the secret out of browser code, URLs, source control, and shared logs.
2. List eligible tests
Run this in Bash or a compatible shell.
curl --fail-with-body \
--header "Authorization: Bearer ${RESGUARDA_API_TOKEN}" \
"${API_BASE_URL}/api/v1/tests?page=1&pageSize=1"HTTP 200 confirms the read. Here is a response from a workspace with no eligible tests.
{
"items": [],
"page": 1,
"pageSize": 1,
"hasMore": false
}If hasMore is true, continue to the next page even when items is empty. For 401, check the token, its expiry, and the issuer's status. For 403, confirm the token has control_test:read. See errors and retries for details.
3. Read one test
Set RESGUARDA_TEST_ID to an ID from the list and encode it as a single URL path segment. The detail response contains eligible test metadata. A missing or inaccessible test returns 404.
curl --fail-with-body \
--header "Authorization: Bearer ${RESGUARDA_API_TOKEN}" \
"${API_BASE_URL}/api/v1/tests/${RESGUARDA_TEST_ID}"Next, read a register or submit evidence for an existing request.