Report pull request preview
Record the deploy status of a named preview for a pull request, typically from CI. The status is applied to every Inspect session currently linked to the pull request; sessions linked later receive the next reported status. Retries are safe: an update whose `occurred_at` is older than the stored status for the same preview is ignored. A `deploying` or `failed` status keeps the last successful URL.
Record the deploy status of a named preview for a pull request, typically from CI. The status is applied to every Inspect session currently linked to the pull request; sessions linked later receive the next reported status. Retries are safe: an update whose occurred_at is older than the stored status for the same preview is ignored. A deploying or failed status keeps the last successful URL.
bearerAuthAuthorizationBearer <token>API key authentication. Use your API key as the bearer token.
owner*stringGitHub repository owner.
1 <= lengthrepo*stringGitHub repository name.
1 <= lengthpull_number*integerPull request number.
int640 < valuename*stringPreview name chosen by the caller, e.g. default or storybook. Lowercase kebab-case where each segment starts with a letter, at most 64 characters. The default preview is the session's primary preview.
^[a-z][a-z0-9]*(?:-[a-z][a-z0-9]*)*$length <= 64application/json- body
Unknown properties are rejected. String values are trimmed before length limits are checked.
status*Previews.PreviewStatus"deploying""deployed""failed"url?|Preview URL (http or https). Required when status is deployed.
commit_sha?|Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated.
1 <= length <= 64label?|Display name for the preview. Omit to keep the current label.
1 <= length <= 100job_url?|Link to the CI job or run.
error?|Failure details, recorded when status is failed.
length <= 2000occurred_at?stringWhen the status change occurred. Defaults to receipt time.
date-timeThe status was accepted
application/json- response
data*curl -X PUT 'https://your-org.inspect.com/api/public/v1/repositories/string/string/pulls/1/previews/string' \ -H 'Content-Type: application/json' \ -d '{ "status": "deploying"}'{ "data": { "name": "string", "label": "string", "status": "deploying", "url": "http://example.com", "commit_sha": "string", "deployed_commit_sha": "string", "last_succeeded_at": "2019-08-24T14:15:22Z", "job_url": "http://example.com", "error": "string", "occurred_at": "2019-08-24T14:15:22Z", "session_ids": [ "string" ] }}