API

PullRequestSetting

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/verify/pull_request_settings create PR verification response
POST /api/v1/organizations/{organization_id}/verify/pull_request_settings/detect_preview create What was found on recent requests
GET /api/v1/organizations/{organization_id}/verify/pull_request_settings load PR verification response

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

pull_request_setting, err := client.PullRequestSetting(nil).Load(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(pull_request_setting)
created, err := client.PullRequestSetting(nil).Create(map[string]any{"organization_id": "example", "bots": []any{}, "demo_videos": true, "deployment": "example", "enabled": true, "environment": "example", "imessage_comment_prefix": "example", "imessage_number": "example", "imessage_number_source": "example", "limits": map[string]any{}, "link_pattern": "example", "links": "example", "messaging_tester_number": "example", "pr_check": true, "preview_comment_wildcard": "example", "preview_profile": "example", "previews": "example", "project_id": "example", "provider": "example", "repository": "example", "repository_id": "example", "repository_kind": "example", "service": "example", "target_mode": "example", "trigger_label": "example", "triggers": map[string]any{}, "verify_environment_id": "example", "write_scenarios": true}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local pull_request_setting, err = client:PullRequestSetting():load({ organization_id = "example" })
local created, err = client:PullRequestSetting():create({ organization_id = "example", bots = {}, demo_videos = true, deployment = "example", enabled = true, environment = "example", imessage_comment_prefix = "example", imessage_number = "example", imessage_number_source = "example", limits = {}, link_pattern = "example", links = "example", messaging_tester_number = "example", pr_check = true, preview_comment_wildcard = "example", preview_profile = "example", previews = "example", project_id = "example", provider = "example", repository = "example", repository_id = "example", repository_kind = "example", service = "example", target_mode = "example", trigger_label = "example", triggers = {}, verify_environment_id = "example", write_scenarios = true })

PHP

Construct client as shown in the PHP setup, then call the operations:

$pull_request_setting = $client->PullRequestSetting()->load(["organization_id" => "example"]);
$created = $client->PullRequestSetting()->create(["organization_id" => "example", "bots" => [], "demo_videos" => true, "deployment" => "example", "enabled" => true, "environment" => "example", "imessage_comment_prefix" => "example", "imessage_number" => "example", "imessage_number_source" => "example", "limits" => [], "link_pattern" => "example", "links" => "example", "messaging_tester_number" => "example", "pr_check" => true, "preview_comment_wildcard" => "example", "preview_profile" => "example", "previews" => "example", "project_id" => "example", "provider" => "example", "repository" => "example", "repository_id" => "example", "repository_kind" => "example", "service" => "example", "target_mode" => "example", "trigger_label" => "example", "triggers" => [], "verify_environment_id" => "example", "write_scenarios" => true]);

Python

Construct client as shown in the Python setup, then call the operations:

pull_request_setting = client.PullRequestSetting().load({"organization_id": "example"})
created = client.PullRequestSetting().create({ "organization_id": "example", "bots": [], "demo_videos": True, "deployment": "example", "enabled": True, "environment": "example", "imessage_comment_prefix": "example", "imessage_number": "example", "imessage_number_source": "example", "limits": {}, "link_pattern": "example", "links": "example", "messaging_tester_number": "example", "pr_check": True, "preview_comment_wildcard": "example", "preview_profile": "example", "previews": "example", "project_id": "example", "provider": "example", "repository": "example", "repository_id": "example", "repository_kind": "example", "service": "example", "target_mode": "example", "trigger_label": "example", "triggers": {}, "verify_environment_id": "example", "write_scenarios": True })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

pull_request_setting = client.PullRequestSetting.load({ "organization_id" => "example" })
created = client.PullRequestSetting.create({ "organization_id" => "example", "bots" => [], "demo_videos" => true, "deployment" => "example", "enabled" => true, "environment" => "example", "imessage_comment_prefix" => "example", "imessage_number" => "example", "imessage_number_source" => "example", "limits" => {}, "link_pattern" => "example", "links" => "example", "messaging_tester_number" => "example", "pr_check" => true, "preview_comment_wildcard" => "example", "preview_profile" => "example", "previews" => "example", "project_id" => "example", "provider" => "example", "repository" => "example", "repository_id" => "example", "repository_kind" => "example", "service" => "example", "target_mode" => "example", "trigger_label" => "example", "triggers" => {}, "verify_environment_id" => "example", "write_scenarios" => true })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const pull_request_setting = await client.PullRequestSetting().load({ organization_id: "example" })
const created = await client.PullRequestSetting().create({ organization_id: "example", bots: [], demo_videos: true, deployment: "example", enabled: true, environment: "example", imessage_comment_prefix: "example", imessage_number: "example", imessage_number_source: "example", limits: {}, link_pattern: "example", links: "example", messaging_tester_number: "example", pr_check: true, preview_comment_wildcard: "example", preview_profile: "example", previews: "example", project_id: "example", provider: "example", repository: "example", repository_id: "example", repository_kind: "example", service: "example", target_mode: "example", trigger_label: "example", triggers: {}, verify_environment_id: "example", write_scenarios: true })

Fields

Field Type Required Description
app_preview_profile_id one,string,null No App Preview Profile Id
app_service_id one,string,null No App Service Id
bots array Yes hosting: bot accounts that comment the preview link, such as netlify[bot].
browser_options_available boolean Yes Whether browser demo and scenario-writing options apply to this saved repository setup.
ci_preview one,object,null Yes The latest preview the project's CI handed over, while the saved setting uses CI
concurrency integer No Up to 50 parallel browsers per run, lowered only by an explicit administrator override.
configured_repository any Yes Configured Repository
demo_videos boolean Yes Record a short walkthrough of the change and add it to the PR comment.
demo_videos_enabled boolean No Record a short walkthrough of the change and add it to the PR comment.
deployment one,string,null Yes hosting: the deployment environment name the host reports on each PR, such as Preview.
deployment_environment string No Deployment Environment
enabled boolean Yes Test PRs automatically.
environment string Yes The environment whose test accounts sign in to the previews.
environments array Yes Environments
github_check_enabled boolean No Report the Composal Verify check on GitHub pull requests.
hosting_presets array Yes Hosting services that build PR previews and the setup answers each needs
id string Yes Id
imessage_comment_prefix one,string,null Yes Imessage Comment Prefix
imessage_number one,string,null Yes International destination number; blank or null clears it on an added environment.
imessage_number_source string Yes Imessage Number Source
limits object Yes Limits
link_pattern one,string,null Yes hosting: a regular expression for the preview link, as preview detection returns it.
links one,string,null Yes hosting: the preview address with * for the part that changes, such as https://deploy-preview-*--shop.netlify.app.
max_seconds integer No Max Seconds
messaging_enabled boolean Yes Messaging Enabled
messaging_tester_number one,string,null Yes One configured tester number.
non_product_paths array No Non Product Paths
permissions object Yes Permissions
pr_check boolean Yes Report a Composal Verify check on GitHub PRs.
preview_access string No Preview Access
preview_comment_authors array No Preview Comment Authors
preview_comment_pattern string No Preview Comment Pattern
preview_comment_wildcard one,string,null Yes A preview address with * for the part that changes, such as https://*.vercel.app.
preview_profile one,string,null Yes composal: the preview profile that builds each PR.
preview_profiles array Yes Preview Profiles
previews string Yes Who builds each PR's preview: a hosting service such as Vercel or Netlify, your CI workflow, or Composal hosting.
project_id string Yes Composal project owning this PR Testing configuration.
project_repositories array Yes Project Repositories
provider string Yes Provider
repositories array Yes Repositories
repository string Yes Repository ID; see repositories for its name.
repository_id string Yes Repository Id
repository_kind string Yes Auto assesses each diff; MFE supports browser previews; API analyzes changes and offers manual runs against the configured test environment.
selected_repository any Yes Selected Repository
service one,string,null Yes composal: the public service the browsers open.
settings array Yes Settings
setup any Yes The project's saved setup as answers, when it has one.
setup_defaults object Yes The answers a new setup starts from
source_repository string Yes Source Repository
target_mode string Yes Target Mode
tester_numbers array Yes Tester Numbers
trigger_label string Yes Label whose addition triggers verification when trigger_on_label is enabled.
trigger_on_comment boolean No Trigger On Comment
trigger_on_label boolean No Trigger On Label
trigger_on_push boolean No Trigger On Push
trigger_on_ready boolean No Trigger On Ready
triggers object Yes When runs start.
verify_environment_id string Yes Verify Environment Id
write_scenarios boolean Yes Draft and validate focused scenarios for each change on its preview.

create

POST /api/v1/organizations/{organization_id}/verify/pull_request_settings

Operation ID: post_api_v1_organizations_organization_id_verify_pull_request_settings.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

The request body is object or object.

Responses

200: PR verification response

application/json

The response is object and object and object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/organizations/{organization_id}/verify/pull_request_settings/detect_preview

Operation ID: detect_preview_api_v1_pull_request_settings.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

Property Type Required Description
project_id string Yes Project slug or ID.
repository_id string No Repository slug, ID or owner/name. Defaults to the project's configured or only repository.

Responses

200: What was found on recent requests

application/json

Property Type Required Description
bots array of string No The bots answer
deployment string No The deployment answer
example_url string No
imessage_comment_prefix string No
imessage_number string No International destination number; blank or null clears it on an added environment.
kind enum: deployment, comment, none Yes
link_pattern string No The link_pattern answer
provider string No Who builds the previews, such as Vercel or GitLab
request_number integer No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{organization_id}/verify/pull_request_settings

Operation ID: api_v1_pull_request_settings.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
provider query enum: github, gitlab No Limit repositories to one source provider
project_id query string No Scope configuration options to this Composal project.
repository_id query string No Select the configured repository in a multi-repository project.

Responses

200: PR verification response

application/json

Property Type Required Description
ci_preview object Yes The latest preview the project's CI handed over, while the saved setting uses CI
ci_preview.received_at string (date-time) Yes
ci_preview.request_number integer Yes
configured_repository object Yes
environments array of object Yes
environments[].external boolean Yes
environments[].id string Yes
environments[].name string Yes
environments[].previews array of enum: hosting, ci, composal Yes The previews answers this environment can sign in to
environments[].repository_id string Yes
environments[].test_accounts array of string Yes Names of the test accounts this environment signs in with
hosting_presets array of object Yes Hosting services that build PR previews and the setup answers each needs
hosting_presets[].answers object Yes
hosting_presets[].answers.bots array of string No
hosting_presets[].answers.deployment string No
hosting_presets[].answers.link_pattern string No
hosting_presets[].answers.links string No
hosting_presets[].name string Yes
messaging_enabled boolean Yes
permissions object Yes
permissions.manage boolean Yes
preview_profiles array of object Yes
preview_profiles[].id string Yes
preview_profiles[].name string Yes
preview_profiles[].repository_id string Yes
preview_profiles[].services array of object Yes
preview_profiles[].services[].id string Yes
preview_profiles[].services[].name string Yes
project_repositories array of object Yes
project_repositories[].automatic_testing_enabled boolean Yes
project_repositories[].can_configure boolean Yes
project_repositories[].configured boolean Yes
project_repositories[].id string Yes
project_repositories[].name string Yes
project_repositories[].preview_source string Yes
project_repositories[].provider enum: github, gitlab Yes
project_repositories[].source_importing boolean Yes The source is still importing (GitLab): linked, but PR testing can't be configured until it finishes.
project_repositories[].source_repository string Yes
repositories array of object Yes
repositories[].associated boolean Yes
repositories[].automatic_testing_enabled boolean Yes
repositories[].id string Yes
repositories[].name string Yes
repositories[].provider enum: github, gitlab Yes
repositories[].source_host string No
repositories[].source_repository string Yes
selected_repository object Yes
settings array of object and object Yes
settings[].imessage_comment_prefix string Yes
settings[].imessage_number string Yes International destination number; blank or null clears it on an added environment.
settings[].imessage_number_source enum: configured, deployment Yes
settings[].messaging_tester_number string Yes One configured tester number. Copied to each preview; may be overridden locally before preparation.
setup object Yes The project's saved setup as answers, when it has one.
setup_defaults object Yes The answers a new setup starts from
setup_defaults.demo_videos boolean Yes
setup_defaults.deployment string Yes
setup_defaults.limits object Yes
setup_defaults.limits.max_minutes number Yes Longest a run may take.
setup_defaults.limits.skip_paths array of string Yes Relative file globs; a change touching only these is not tested.
setup_defaults.pr_check boolean Yes
setup_defaults.trigger_label string Yes The label a label trigger starts with
setup_defaults.triggers object Yes When runs start. GitHub only; GitLab runs on every MR update out of draft.
setup_defaults.triggers.comment boolean Yes Run on /verify comments.
setup_defaults.triggers.label string Yes Run when this label is added; null turns label runs off.
setup_defaults.triggers.push boolean Yes Run on every push to an open PR.
setup_defaults.triggers.ready boolean Yes Run when a draft PR is marked ready.
setup_defaults.write_scenarios boolean Yes Draft and validate focused scenarios for each change on its preview. Off by default.
tester_numbers array of string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway