Preview a site
Finds a site's pages (its sitemaps, else its links) without creating anything, so you can try rules on urls before POST /v1/resources with type: "site". Pages forbidden by robots.txt are left out.
POST/v1/sites/preview
Requires resources:write.
Nothing is created and nothing is charged. It needs the same scope as creating a resource, because it fetches pages for you.
Lookio looks for the site’s sitemaps, then falls back to following links, and leaves out pages that robots.txt forbids. A site is capped at 10,000 pages, and truncated tells you when the cap was reached: narrow the rules.
Use the urls you get back to try your rules, then create the site with Create a resource. An address that cannot be analysed fails with invalid_request.
Authorizations
Authorizationbearerin headerrequiredHeader parameters
Idempotency-Keystringlength: 1–255 charsA unique key for this request, such as a UUID, 1 to 255 visible ASCII characters. Send the same key when you retry: the first response is returned (with Idempotent-Replayed: true) instead of running the request again, for 24 hours, per credential. The same key on a different request is a 409 conflict. A streamed answer is not recorded.
Body
application/jsonrequiredurlstringrequiredlength: 4–2000 charsThe site, a section such as https://docs.acme.com/guide, or its sitemap.
Response
Preview a site before importing it
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked, invalid_access_key
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, permission_denied
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, assistant_has_no_resources
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired