From 91cbe353dc959da9f8a68b65b763c28b5b95d2c9 Mon Sep 17 00:00:00 2001 From: finalerock44 Date: Mon, 16 Nov 2026 18:24:25 +0000 Subject: [PATCH 1/2] docs: team settings in the API, CLI and MCP reference Documents the new read-only way to see how a team is set up: - REST API: a Team Settings page for GET /org/settings, with the endpoint, its schema and examples in public/openapi.yaml. - CLI: a `dcd settings` page. - MCP: `dcd_get_team_settings` in the Tools Reference and the overview table. Each page says which settings are shown only to owners and admins (sign-in requirement, retry escalation and overage limit): a standard member gets them as null, with `restricted: true`. Publish with the CLI release that ships `dcd settings`, after the API change reaches production. --- SUMMARY.md | 2 + api/overview.md | 1 + api/team-settings.md | 76 +++++++++++++++ cli/dcd-settings.md | 60 ++++++++++++ mcp/overview.md | 3 +- mcp/tools.md | 8 ++ public/openapi.yaml | 216 ++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 363 insertions(+), 3 deletions(-) create mode 100644 api/team-settings.md create mode 100644 cli/dcd-settings.md diff --git a/SUMMARY.md b/SUMMARY.md index efb21ee..cb73e34 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -68,6 +68,7 @@ * [Artifacts](cli/dcd-artifacts.md) * [Upload](cli/dcd-upload.md) * [List](cli/dcd-list.md) +* [Settings](cli/dcd-settings.md) * [Login & Accounts](cli/dcd-login.md) * [Devices](cli/dcd-device.md) * [Exit Codes](advanced/exit-codes.md) @@ -79,6 +80,7 @@ * [Uploads](api/uploads.md) * [Results](api/results.md) * [Flows](api/flows.md) +* [Team Settings](api/team-settings.md) * [Device Sessions](api/device-sessions.md) * [IP Addresses](api/ip-addresses.md) diff --git a/api/overview.md b/api/overview.md index fce51c2..8960f01 100644 --- a/api/overview.md +++ b/api/overview.md @@ -69,6 +69,7 @@ Check the `statusCode` field in the body as well as the HTTP status. A malformed | [Uploads](uploads.md) | List uploads and poll run status | | [Results](results.md) | Fetch results, reports, and artifacts for an upload | | [Flows](flows.md) | Aggregated analytics and run history per flow file | +| [Team Settings](team-settings.md) | How your team is set up: concurrency, test runtime, integrations and more | | [Device Sessions](device-sessions.md) | Start a device and drive it, for AI agents | | [IP Addresses](ip-addresses.md) | Current egress IPs for firewall allow-listing (no API key required) | diff --git a/api/team-settings.md b/api/team-settings.md new file mode 100644 index 0000000..6610559 --- /dev/null +++ b/api/team-settings.md @@ -0,0 +1,76 @@ +# Team Settings + +The team settings endpoint returns how your team is set up: its concurrency limits, test runtime, sign-in requirement, retry escalation, overage limit and connected integrations. These are the settings the console shows under **Settings**. + +It is read-only. Change settings in the console. + +--- + +## Get team settings + +``` +GET /org/settings +``` + +Takes no parameters. An API key or any team member's login session can call it. + +Some settings are shown only to team owners and admins in the console, and the API follows the same rule. For a standard member, `restricted` is `true` and `signInRequirement`, `retryEscalation` and `overage` are `null`. API keys see every setting. + +**Example** + +```bash +curl "https://api.devicecloud.dev/org/settings" \ + -H "x-app-api-key: " +``` + +**Response** + +```json +{ + "orgId": 7, + "name": "Acme", + "restricted": false, + "concurrency": { + "runners": [ + { "platform": "ios", "runnerType": "m4", "min": 0, "max": 2 }, + { "platform": "android", "runnerType": "gpu1", "min": 0, "max": 0 } + ], + "pools": [ + { + "name": "standard", + "min": 2, + "max": 12, + "members": [ + { "platform": "ios", "runnerType": "default" }, + { "platform": "android", "runnerType": "cpu1" } + ] + } + ] + }, + "testRuntime": { "defaultMinutes": 10, "extendedMinutes": 20 }, + "integrations": { "webhook": true, "slack": false, "github": true }, + "signInRequirement": "passkey", + "retryEscalation": { "available": true, "target": "m1", "enabled": true }, + "overage": { "hasSubscription": true, "limitUsd": 200 } +} +``` + +**Fields** + +| Field | Description | +|-------|-------------| +| `orgId` | Your team's ID. It's the value a login session sends in `x-dcd-org`. | +| `name` | Your team's name, or `null` if it has none. | +| `restricted` | `true` when the caller is a standard member. The owner and admin settings below are then `null`. | +| `concurrency.runners` | Each runner type with its own limit. `min` is how many tests can always run at once, and `max` is how many can run when capacity allows. `max: 0` means the runner type isn't enabled for your team. See [Concurrency & Parallel Runs](../getting-started/concurrency-and-parallel-runs.md). | +| `concurrency.pools` | Limits that several runner types share. A runner type in a pool is listed under the pool, not in `runners`. | +| `testRuntime.defaultMinutes` | How long a flow can run by default. | +| `testRuntime.extendedMinutes` | How long a flow can run with [Extended Runtime](../configuration/extended-runtime.md), or `null` when extended runtime is off for your team. | +| `integrations` | Whether a [webhook](../notifications/webhook-notifications.md), [Slack](../notifications/slack-notifications.md) and [GitHub](../ci-cd/github-checks.md) are connected. | +| `signInRequirement` | How members must sign in to reach the team: `off`, `two_factor`, `passkey` or `passkey_and_code`. Owners and admins only. | +| `retryEscalation` | Owners and admins only. `available` says whether retry escalation can be turned on for your team. `target` is the runner type an Android test moves to when it is retried after an infrastructure failure (`m1` or `gpu1`). `enabled` says whether it is on. | +| `overage` | Owners and admins only. `hasSubscription` says whether the team has an active subscription. `limitUsd` is your [Overage Limit](../billing/overage.md#overage-limit) in US dollars per billing period, on top of your included credits, or `null` when it's uncapped or there's no subscription. | + +A key limited to **Device sessions only** can't call this endpoint. It gets `403` with `"error": "API_KEY_SCOPE"`. + +From the CLI, run [`dcd settings`](../cli/dcd-settings.md). AI agents can call the [`dcd_get_team_settings`](../mcp/tools.md#dcd-get-team-settings) MCP tool. diff --git a/cli/dcd-settings.md b/cli/dcd-settings.md new file mode 100644 index 0000000..5363ecb --- /dev/null +++ b/cli/dcd-settings.md @@ -0,0 +1,60 @@ +# dcd settings + +Show how your team is set up: concurrency limits, test runtime, sign-in requirement, retry escalation, overage limit and connected integrations. It reads the same settings the console shows under **Settings**. + +`dcd settings` is read-only. Change settings in the console. + +```bash +dcd settings +``` + +``` +⏺ Team + ⎿ name Acme + org id 7 + sign-in requirement a passkey + +⏺ Concurrency + ⎿ iOS m4 min 0 · max 2 + Android gpu1 not enabled + standard pool min 2 · max 12 + standard pool is shared by iOS default and Android cpu1 + min: always available · max: when capacity allows + +⏺ Test Runtime + ⎿ default 10 min per flow + extended 20 min per flow with EXTENDED_RUNTIME, charged at twice the rate + +⏺ Retries & Billing + ⎿ retry escalation on · Android retries move to M1 runners + overage limit $200 per billing period, on top of included credits + +⏺ Integrations + ⎿ webhook connected + slack not connected + github connected +``` + +## Owner and admin settings + +The sign-in requirement, retry escalation and overage limit are shown only to team owners and admins, as in the console. A standard member sees `owner or admin only` for those three. An API key sees every setting. + +## Flags + +| Flag | Description | +|------|-------------| +| `--json` | Print the settings as one JSON object, the same object [`GET /org/settings`](../api/team-settings.md#get-team-settings) returns. | +| `--api-key` | API key to use instead of your `dcd login` session. Defaults to the `DEVICE_CLOUD_API_KEY` environment variable. | +| `--api-url` | API to talk to. Defaults to the one you logged in to, then `https://api.devicecloud.dev`. | + +Without an API key, `dcd settings` uses your `dcd login` session and shows the team you have selected. Switch teams with `dcd switch-org`. See [Login & Accounts](dcd-login.md). + +```bash +dcd settings --json | jq '.concurrency' +``` + +## Related + +* [Concurrency & Parallel Runs](../getting-started/concurrency-and-parallel-runs.md) +* [Extended Runtime](../configuration/extended-runtime.md) +* [Overage Limit](../billing/overage.md#overage-limit) diff --git a/mcp/overview.md b/mcp/overview.md index 944ef5f..4361cd9 100644 --- a/mcp/overview.md +++ b/mcp/overview.md @@ -47,7 +47,7 @@ A `dcd login` session ends 30 days after you log in, or after 7 days without use ## Tools -The server exposes five tools. Four are read-only; `dcd_run_cloud_test` submits a run and is billable. +The server exposes six tools. Five are read-only; `dcd_run_cloud_test` submits a run and is billable. | Tool | What it does | |------|--------------| @@ -55,6 +55,7 @@ The server exposes five tools. Four are read-only; `dcd_run_cloud_test` submits | [`dcd_list_runs`](tools.md#dcd-list-runs) | List recent test runs (filter by name/date, paginated) | | [`dcd_get_status`](tools.md#dcd-get-status) | Get the status and per-test results of a run | | [`dcd_download_artifacts`](tools.md#dcd-download-artifacts) | Download a run's artifacts zip, and optionally a report, to disk | +| [`dcd_get_team_settings`](tools.md#dcd-get-team-settings) | Read your team's settings: concurrency, test runtime, integrations and more | | [`dcd_run_cloud_test`](tools.md#dcd-run-cloud-test) | Submit a flow to run on the cloud (**billable**) | See [Cloud Test Tools](tools.md) for every parameter, default, and return shape. diff --git a/mcp/tools.md b/mcp/tools.md index 3c642b7..06c4e1b 100644 --- a/mcp/tools.md +++ b/mcp/tools.md @@ -57,6 +57,14 @@ Download a completed run's artifacts zip (videos, logs and screenshots) to local Returns `{ uploadId, artifactsPath, reportPath, warnings }`. A **non-empty `warnings` array means a download could not be produced** — most often because the run has no results yet. An empty array means success. See [Artifacts & Downloads](../artifacts/artifacts.md) and [Report Formats](../artifacts/report-formats.md). +## dcd_get_team_settings + +Read how your team is set up: concurrency limits, test runtime, sign-in requirement, retry escalation, overage limit and connected integrations. It changes nothing, so it stays available in [read-only mode](connect.md#read-only-mode). An agent can use it to check limits before it plans a run. + +Takes no parameters. + +Returns `{ orgId, name, restricted, concurrency: { runners, pools }, testRuntime: { defaultMinutes, extendedMinutes }, integrations: { webhook, slack, github }, signInRequirement, retryEscalation, overage }`, the same object as [`GET /org/settings`](../api/team-settings.md#get-team-settings) and `dcd settings --json`. When `restricted` is `true` (a standard team member), `signInRequirement`, `retryEscalation` and `overage` are `null`. Owners, admins and API keys see them. + ## dcd_run_cloud_test Submit a Maestro flow, or a directory of flows, to run on DeviceCloud. diff --git a/public/openapi.yaml b/public/openapi.yaml index 71a6e56..3546ba9 100644 --- a/public/openapi.yaml +++ b/public/openapi.yaml @@ -7,11 +7,11 @@ openapi: 3.1.0 info: title: DeviceCloud REST API version: 1.0.0 - summary: Test results, run status, flow analytics and device sessions for DeviceCloud. + summary: Test results, run status, flow analytics, team settings and device sessions for DeviceCloud. description: | The DeviceCloud REST API gives you programmatic access to the same data as the console: test runs and their results, reports and artifacts, flow analytics, - and device sessions for AI agents. + your team's settings, and device sessions for AI agents. To start test runs, use the [`dcd` CLI](https://docs.devicecloud.dev/cli-reference/cloud) or one of the CI integrations. This API reads their results. @@ -87,6 +87,13 @@ tags: leaving out cancelled and unfinished runs. externalDocs: url: https://docs.devicecloud.dev/rest-api/flows + - name: Team settings + description: | + How your team is set up: concurrency limits, test runtime, sign-in + requirement, retry escalation, overage limit and connected integrations. + Read-only. Change settings in the console. + externalDocs: + url: https://docs.devicecloud.dev/rest-api/team-settings - name: Device sessions description: >- Start, list, read and stop device sessions (cloud iOS simulators and Android emulators), and list the @@ -658,6 +665,73 @@ paths: $ref: '#/components/responses/ServerError' '503': $ref: '#/components/responses/KeyCheckUnavailable' + /org/settings: + get: + operationId: getTeamSettings + tags: [Team settings] + summary: Get team settings + description: | + Your team's settings, the ones the console shows under **Settings**. An + API key or any team member's login session can read them. + + Some settings are shown only to team owners and admins in the console, + and the API follows the same rule. For a standard member, `restricted` + is `true` and `signInRequirement`, `retryEscalation` and `overage` are + `null`. API keys see every setting. + responses: + '200': + description: The team's settings. + content: + application/json: + schema: + $ref: '#/components/schemas/TeamSettings' + examples: + owner: + summary: An owner, an admin or an API key + value: + orgId: 7 + name: Acme + restricted: false + concurrency: + runners: + - { platform: ios, runnerType: m4, min: 0, max: 2 } + - { platform: android, runnerType: gpu1, min: 0, max: 0 } + pools: + - name: standard + min: 2 + max: 12 + members: + - { platform: ios, runnerType: default } + - { platform: android, runnerType: cpu1 } + testRuntime: { defaultMinutes: 10, extendedMinutes: 20 } + integrations: { webhook: true, slack: false, github: true } + signInRequirement: passkey + retryEscalation: { available: true, target: m1, enabled: true } + overage: { hasSubscription: true, limitUsd: 200 } + standardMember: + summary: A standard member + value: + orgId: 7 + name: Acme + restricted: true + concurrency: + runners: + - { platform: ios, runnerType: default, min: 1, max: 5 } + - { platform: android, runnerType: cpu1, min: 1, max: 5 } + pools: [] + testRuntime: { defaultMinutes: 10, extendedMinutes: null } + integrations: { webhook: false, slack: true, github: false } + signInRequirement: null + retryEscalation: null + overage: null + '403': + $ref: '#/components/responses/Forbidden' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/ServerError' + '503': + $ref: '#/components/responses/KeyCheckUnavailable' /device/models: get: tags: [Device sessions] @@ -3601,6 +3675,144 @@ components: description: The upload the run belongs to. uploadName: type: [string, 'null'] + TeamSettings: + type: object + required: + - orgId + - name + - restricted + - concurrency + - testRuntime + - integrations + - signInRequirement + - retryEscalation + - overage + properties: + orgId: + type: integer + description: Your team's ID. It's the value a login session sends in `x-dcd-org`. + name: + type: [string, 'null'] + description: Your team's name. + restricted: + type: boolean + description: | + `true` when the caller is a standard member. `signInRequirement`, + `retryEscalation` and `overage` are then `null`. Owners, admins and + API keys see them. + concurrency: + type: object + description: | + How many tests the team can run at once. `min` can always run, and + `max` can run when capacity allows. + required: [runners, pools] + properties: + runners: + type: array + description: Runner types with their own limit. A runner type in a pool is listed under the pool instead. + items: + type: object + required: [platform, runnerType, min, max] + properties: + platform: + type: string + enum: [ios, android] + runnerType: + type: string + description: For example `default` or `m4` on iOS, `cpu1` or `gpu1` on Android. + min: + type: integer + max: + type: integer + description: '`0` means the runner type isn''t enabled for the team.' + pools: + type: array + description: Limits that several runner types share. + items: + type: object + required: [name, min, max, members] + properties: + name: + type: string + example: standard + min: + type: integer + max: + type: integer + members: + type: array + description: The runner types that share this limit. + items: + type: object + required: [platform, runnerType] + properties: + platform: + type: string + enum: [ios, android] + runnerType: + type: string + testRuntime: + type: object + required: [defaultMinutes, extendedMinutes] + properties: + defaultMinutes: + type: integer + description: How long a flow can run by default. + extendedMinutes: + type: [integer, 'null'] + description: | + How long a flow can run with the `EXTENDED_RUNTIME` override, which + is charged at twice the rate. `null` when extended runtime is off + for the team. + integrations: + type: object + required: [webhook, slack, github] + properties: + webhook: + type: boolean + description: Whether a webhook is set up. + slack: + type: boolean + description: Whether Slack is connected. + github: + type: boolean + description: Whether the GitHub App is connected. + signInRequirement: + type: [string, 'null'] + enum: ['off', two_factor, passkey, passkey_and_code, null] + description: How members must sign in to reach the team. Owners and admins only. + retryEscalation: + type: [object, 'null'] + description: Owners and admins only. + required: [available, target, enabled] + properties: + available: + type: boolean + description: Whether retry escalation can be turned on for the team. + target: + type: [string, 'null'] + enum: [m1, gpu1, null] + description: | + The runner type an Android test moves to when it is retried after + an infrastructure failure. `null` when retry escalation isn't + available. + enabled: + type: boolean + description: Whether retry escalation is on. + overage: + type: [object, 'null'] + description: Owners and admins only. + required: [hasSubscription, limitUsd] + properties: + hasSubscription: + type: boolean + description: Whether the team has an active subscription. + limitUsd: + type: [number, 'null'] + description: | + The overage the team can run up per billing period, in US dollars, + on top of its included credits. `null` when it's uncapped or there's + no subscription. IpAddresses: type: object required: [updatedAt, ipAddresses, ranges] From 23b45620c1a8246889aa39c45473819014371d4f Mon Sep 17 00:00:00 2001 From: finalerock44 Date: Tue, 17 Nov 2026 17:50:22 +0000 Subject: [PATCH 2/2] docs: align team settings with the reordered docs List Settings after Login & Accounts in the CLI Reference, name the team-settings tool on Connect an AI Agent, and type FlowRun.uploadName as a string: an upload without a name reports Unknown, never null. --- SUMMARY.md | 2 +- mcp/connect.md | 2 +- public/openapi.yaml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SUMMARY.md b/SUMMARY.md index cb73e34..c9d2e8c 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -68,8 +68,8 @@ * [Artifacts](cli/dcd-artifacts.md) * [Upload](cli/dcd-upload.md) * [List](cli/dcd-list.md) -* [Settings](cli/dcd-settings.md) * [Login & Accounts](cli/dcd-login.md) +* [Settings](cli/dcd-settings.md) * [Devices](cli/dcd-device.md) * [Exit Codes](advanced/exit-codes.md) * [Live Sessions](cli/dcd-live.md) diff --git a/mcp/connect.md b/mcp/connect.md index 75c7210..91081be 100644 --- a/mcp/connect.md +++ b/mcp/connect.md @@ -120,7 +120,7 @@ With a `dcd login` session, the server works in your active team, the one [`dcd The `dcd_*` tools are in beta, so they may change. ::: -`dcd mcp` serves the `dcd_*` tools: list devices, submit a cloud test run, list recent runs, check a run's status and download its artifacts. [Cloud Test Tools](tools.md) describes each one. +`dcd mcp` serves the `dcd_*` tools: list devices, submit a cloud test run, list recent runs, check a run's status, download its artifacts and read your team's settings. [Cloud Test Tools](tools.md) describes each one. If your team is in the [Agent Devices](agent-devices.md) beta, `dcd mcp` also serves the device tools, which start and drive cloud devices. It passes them through from the hosted server, and adds what only a local process can do: `install_app` takes `app_path`, a build on your machine, and `run` takes `path`, a flow file or a directory of flows. [Agent Devices Tools](agent-devices-tools.md) describes each one. diff --git a/public/openapi.yaml b/public/openapi.yaml index 3546ba9..e8e9f8c 100644 --- a/public/openapi.yaml +++ b/public/openapi.yaml @@ -3674,7 +3674,8 @@ components: format: uuid description: The upload the run belongs to. uploadName: - type: [string, 'null'] + type: string + description: The upload's name, or `Unknown` when it has none. TeamSettings: type: object required: