diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_CreateOrReplace.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_CreateOrReplace.json new file mode 100644 index 000000000000..02a942aec214 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_CreateOrReplace.json @@ -0,0 +1,35 @@ +{ + "title": "AccessTokens_CreateOrReplace", + "operationId": "AccessTokens_CreateOrReplace", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "accessTokenId": "00000000-0000-0000-0000-000000000000", + "resource": { + "name": "sampleAccessToken", + "expiryAt": "2022-09-28T12:32:33Z" + } + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "jwtToken": "sampleJwtToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + }, + "201": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "jwtToken": "sampleJwtToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_Delete.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_Delete.json new file mode 100644 index 000000000000..9b27d85e7f04 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_Delete.json @@ -0,0 +1,12 @@ +{ + "title": "AccessTokens_Delete", + "operationId": "AccessTokens_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "accessTokenId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "204": {} + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_Get.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_Get.json new file mode 100644 index 000000000000..ff9d9d26ff81 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_Get.json @@ -0,0 +1,20 @@ +{ + "title": "AccessTokens_Get", + "operationId": "AccessTokens_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "accessTokenId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_List.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_List.json new file mode 100644 index 000000000000..1ff88ea72560 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/AccessTokens_List.json @@ -0,0 +1,24 @@ +{ + "title": "AccessTokens_List", + "operationId": "AccessTokens_List", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/TestRuns_CreateOrUpdate.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/TestRuns_CreateOrUpdate.json new file mode 100644 index 000000000000..bbef8be4c9bf --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/TestRuns_CreateOrUpdate.json @@ -0,0 +1,86 @@ +{ + "title": "TestRuns_CreateOrUpdate", + "operationId": "TestRuns_CreateOrUpdate", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "runId": "00000000-0000-0000-0000-000000000000", + "resource": { + "displayName": "sampleTestRun" + } + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "displayName": "sampleTestRun", + "creatorId": "string", + "creatorName": "string", + "config": { + "framework": { + "name": "string", + "version": "string", + "runnerName": "string" + }, + "sdkLanguage": "JAVASCRIPT", + "maxWorkers": 10 + }, + "ciConfig": { + "providerName": "string", + "branch": "string", + "author": "string", + "commitId": "string", + "revisionUrl": "string" + }, + "summary": { + "status": "RUNNING", + "billableTime": 0, + "numBrowserSessions": 1, + "maxConcurrentBrowserSessions": 10, + "startTime": "2025-06-06T11:43:28.954Z", + "endTime": "2025-06-06T11:43:28.954Z", + "duration": 0, + "errorMessages": [ + "string" + ] + } + } + }, + "201": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "displayName": "sampleTestRun", + "creatorId": "string", + "creatorName": "string", + "config": { + "framework": { + "name": "string", + "version": "string", + "runnerName": "string" + }, + "sdkLanguage": "JAVASCRIPT", + "maxWorkers": 10 + }, + "ciConfig": { + "providerName": "string", + "branch": "string", + "author": "string", + "commitId": "string", + "revisionUrl": "string" + }, + "summary": { + "status": "RUNNING", + "billableTime": 0, + "numBrowserSessions": 1, + "maxConcurrentBrowserSessions": 10, + "startTime": "2025-06-06T11:43:28.954Z", + "endTime": "2025-06-06T11:43:28.954Z", + "duration": 0, + "errorMessages": [ + "string" + ] + } + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/TestRuns_List.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/TestRuns_List.json new file mode 100644 index 000000000000..ec181aa958df --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/TestRuns_List.json @@ -0,0 +1,51 @@ +{ + "title": "TestRuns_List", + "operationId": "TestRuns_List", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "displayName": "string", + "creatorId": "string", + "creatorName": "string", + "config": { + "framework": { + "name": "string", + "version": "string", + "runnerName": "string" + }, + "sdkLanguage": "JAVASCRIPT", + "maxWorkers": 10 + }, + "ciConfig": { + "providerName": "string", + "branch": "string", + "author": "string", + "commitId": "string", + "revisionUrl": "string" + }, + "summary": { + "status": "RUNNING", + "billableTime": 0, + "numBrowserSessions": 1, + "maxConcurrentBrowserSessions": 10, + "startTime": "2025-06-06T11:43:28.954Z", + "endTime": "2025-06-06T11:43:28.954Z", + "duration": 0, + "errorMessages": [ + "string" + ] + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/Workspaces_Get.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/Workspaces_Get.json new file mode 100644 index 000000000000..2acd894b0e79 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/Workspaces_Get.json @@ -0,0 +1,25 @@ +{ + "title": "Workspaces_Get", + "operationId": "Workspaces_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/PlaywrightWorkspaces/myWorkspace", + "name": "myPlaywrightWorkspace", + "state": "Active", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "subscriptionState": "Registered", + "tenantId": "00000000-0000-0000-0000-000000000000", + "location": "westus3", + "regionalAffinity": "Enabled", + "localAuth": "Enabled", + "storageUri": "https://examplestorageaccount.blob.core.windows.net" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/Workspaces_GetBrowsers.json b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/Workspaces_GetBrowsers.json new file mode 100644 index 000000000000..2dfe5cba7aa3 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/examples/2026-01-01-preview/Workspaces_GetBrowsers.json @@ -0,0 +1,16 @@ +{ + "title": "Workspaces_GetBrowsers", + "operationId": "Workspaces_GetBrowsers", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "os": "Linux" + }, + "responses": { + "302": { + "headers": { + "location": "wss://{region}.api.playwright.microsoft.com/redirectURL?api-version=2026-01-01-preview&os=Linux" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/main.tsp b/specification/loadtestservice/data-plane/playwright/main.tsp index ce1030e53226..7419ac8d0c0c 100644 --- a/specification/loadtestservice/data-plane/playwright/main.tsp +++ b/specification/loadtestservice/data-plane/playwright/main.tsp @@ -3,7 +3,9 @@ import "@typespec/http"; import "@typespec/versioning"; -import "./routes.tsp"; +import "./typespec/routes.tsp"; +import "./typespec/accesstokens.tsp"; +import "./typespec/testruns.tsp"; using TypeSpec.Http; using TypeSpec.Versioning; @@ -51,4 +53,7 @@ enum Versions { @doc("Stable version 2025-09-01 with general availability features.") v2025_09_01: "2025-09-01", + + @doc("Preview version 2026-01-01-preview with experimental features.") + v2026_01_01_preview: "2026-01-01-preview", } diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_CreateOrReplace.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_CreateOrReplace.json new file mode 100644 index 000000000000..02a942aec214 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_CreateOrReplace.json @@ -0,0 +1,35 @@ +{ + "title": "AccessTokens_CreateOrReplace", + "operationId": "AccessTokens_CreateOrReplace", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "accessTokenId": "00000000-0000-0000-0000-000000000000", + "resource": { + "name": "sampleAccessToken", + "expiryAt": "2022-09-28T12:32:33Z" + } + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "jwtToken": "sampleJwtToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + }, + "201": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "jwtToken": "sampleJwtToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_Delete.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_Delete.json new file mode 100644 index 000000000000..9b27d85e7f04 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_Delete.json @@ -0,0 +1,12 @@ +{ + "title": "AccessTokens_Delete", + "operationId": "AccessTokens_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "accessTokenId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "204": {} + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_Get.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_Get.json new file mode 100644 index 000000000000..ff9d9d26ff81 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_Get.json @@ -0,0 +1,20 @@ +{ + "title": "AccessTokens_Get", + "operationId": "AccessTokens_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "accessTokenId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_List.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_List.json new file mode 100644 index 000000000000..1ff88ea72560 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/AccessTokens_List.json @@ -0,0 +1,24 @@ +{ + "title": "AccessTokens_List", + "operationId": "AccessTokens_List", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "name": "sampleAccessToken", + "createdAt": "2021-09-28T12:32:33Z", + "expiryAt": "2022-09-28T12:32:33Z", + "state": "Active" + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/TestRuns_CreateOrUpdate.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/TestRuns_CreateOrUpdate.json new file mode 100644 index 000000000000..bbef8be4c9bf --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/TestRuns_CreateOrUpdate.json @@ -0,0 +1,86 @@ +{ + "title": "TestRuns_CreateOrUpdate", + "operationId": "TestRuns_CreateOrUpdate", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "runId": "00000000-0000-0000-0000-000000000000", + "resource": { + "displayName": "sampleTestRun" + } + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "displayName": "sampleTestRun", + "creatorId": "string", + "creatorName": "string", + "config": { + "framework": { + "name": "string", + "version": "string", + "runnerName": "string" + }, + "sdkLanguage": "JAVASCRIPT", + "maxWorkers": 10 + }, + "ciConfig": { + "providerName": "string", + "branch": "string", + "author": "string", + "commitId": "string", + "revisionUrl": "string" + }, + "summary": { + "status": "RUNNING", + "billableTime": 0, + "numBrowserSessions": 1, + "maxConcurrentBrowserSessions": 10, + "startTime": "2025-06-06T11:43:28.954Z", + "endTime": "2025-06-06T11:43:28.954Z", + "duration": 0, + "errorMessages": [ + "string" + ] + } + } + }, + "201": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "displayName": "sampleTestRun", + "creatorId": "string", + "creatorName": "string", + "config": { + "framework": { + "name": "string", + "version": "string", + "runnerName": "string" + }, + "sdkLanguage": "JAVASCRIPT", + "maxWorkers": 10 + }, + "ciConfig": { + "providerName": "string", + "branch": "string", + "author": "string", + "commitId": "string", + "revisionUrl": "string" + }, + "summary": { + "status": "RUNNING", + "billableTime": 0, + "numBrowserSessions": 1, + "maxConcurrentBrowserSessions": 10, + "startTime": "2025-06-06T11:43:28.954Z", + "endTime": "2025-06-06T11:43:28.954Z", + "duration": 0, + "errorMessages": [ + "string" + ] + } + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/TestRuns_List.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/TestRuns_List.json new file mode 100644 index 000000000000..ec181aa958df --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/TestRuns_List.json @@ -0,0 +1,51 @@ +{ + "title": "TestRuns_List", + "operationId": "TestRuns_List", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "displayName": "string", + "creatorId": "string", + "creatorName": "string", + "config": { + "framework": { + "name": "string", + "version": "string", + "runnerName": "string" + }, + "sdkLanguage": "JAVASCRIPT", + "maxWorkers": 10 + }, + "ciConfig": { + "providerName": "string", + "branch": "string", + "author": "string", + "commitId": "string", + "revisionUrl": "string" + }, + "summary": { + "status": "RUNNING", + "billableTime": 0, + "numBrowserSessions": 1, + "maxConcurrentBrowserSessions": 10, + "startTime": "2025-06-06T11:43:28.954Z", + "endTime": "2025-06-06T11:43:28.954Z", + "duration": 0, + "errorMessages": [ + "string" + ] + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/Workspaces_Get.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/Workspaces_Get.json new file mode 100644 index 000000000000..2acd894b0e79 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/Workspaces_Get.json @@ -0,0 +1,25 @@ +{ + "title": "Workspaces_Get", + "operationId": "Workspaces_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.LoadTestService/PlaywrightWorkspaces/myWorkspace", + "name": "myPlaywrightWorkspace", + "state": "Active", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "subscriptionState": "Registered", + "tenantId": "00000000-0000-0000-0000-000000000000", + "location": "westus3", + "regionalAffinity": "Enabled", + "localAuth": "Enabled", + "storageUri": "https://examplestorageaccount.blob.core.windows.net" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/Workspaces_GetBrowsers.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/Workspaces_GetBrowsers.json new file mode 100644 index 000000000000..2dfe5cba7aa3 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/examples/Workspaces_GetBrowsers.json @@ -0,0 +1,16 @@ +{ + "title": "Workspaces_GetBrowsers", + "operationId": "Workspaces_GetBrowsers", + "parameters": { + "api-version": "2026-01-01-preview", + "workspaceId": "00000000-0000-0000-0000-000000000000", + "os": "Linux" + }, + "responses": { + "302": { + "headers": { + "location": "wss://{region}.api.playwright.microsoft.com/redirectURL?api-version=2026-01-01-preview&os=Linux" + } + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/playwright.json b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/playwright.json new file mode 100644 index 000000000000..0abc083ddfb1 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/preview/2026-01-01-preview/playwright.json @@ -0,0 +1,1407 @@ +{ + "swagger": "2.0", + "info": { + "title": "Playwright Service API", + "version": "2026-01-01-preview", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Playwright Service API endpoint (protocol and hostname) formatted as https://{region}.api.playwright.microsoft.com.\nThe region corresponds to your Azure Playwright workspace location. You can find this value in your Azure Playwright workspace properties under `dataplaneUri`.", + "required": true, + "type": "string" + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://playwright.microsoft.com/.default" + ], + "OAuth2Auth_": [ + "https://playwright.microsoft.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://playwright.microsoft.com/.default": "" + } + }, + "OAuth2Auth_": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://playwright.microsoft.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/v2.0/oauth2/token" + } + }, + "tags": [], + "paths": { + "/playwrightworkspaces/{workspaceId}": { + "get": { + "operationId": "Workspaces_Get", + "description": "Get details of the Azure resource mapped to a workspace for the given workspace id. Authorization required is Bearer JWT Access token provided by EntraID.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Workspace" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Workspaces_Get": { + "$ref": "./examples/Workspaces_Get.json" + } + } + } + }, + "/playwrightworkspaces/{workspaceId}/access-tokens": { + "get": { + "operationId": "AccessTokens_List", + "description": "Lists access tokens for the specified workspace ID. Supports OData query parameters: $select, $filter, $orderby, $top, and $skip. Default page size is 10. Use nextLink in response to fetch additional results. Requires Bearer JWT access token provided by Entra ID.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedAccessToken" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "AccessTokens_List": { + "$ref": "./examples/AccessTokens_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/playwrightworkspaces/{workspaceId}/access-tokens/{accessTokenId}": { + "get": { + "operationId": "AccessTokens_Get", + "description": "Gets an access token for the workspace with the specified access token ID. Requires Bearer JWT access token provided by Entra ID.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "name": "accessTokenId", + "in": "path", + "description": "The access token ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/AccessToken" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "AccessTokens_Get": { + "$ref": "./examples/AccessTokens_Get.json" + } + } + }, + "put": { + "operationId": "AccessTokens_CreateOrReplace", + "description": "Creates an access token for the workspace with the specified access token ID and name. The ID and name must be unique among active access tokens for the user within a Playwright workspace. Requires Bearer JWT access token provided by Entra ID.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "name": "accessTokenId", + "in": "path", + "description": "The access token ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + }, + { + "name": "resource", + "in": "body", + "description": "The resource instance.", + "required": true, + "schema": { + "$ref": "#/definitions/AccessToken" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/AccessToken" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/AccessToken" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "AccessTokens_CreateOrReplace": { + "$ref": "./examples/AccessTokens_CreateOrReplace.json" + } + } + }, + "delete": { + "operationId": "AccessTokens_Delete", + "description": "Deletes an access token for the workspace with the specified access token ID. Requires Bearer JWT access token provided by Entra ID.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "name": "accessTokenId", + "in": "path", + "description": "The access token ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. ", + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "AccessTokens_Delete": { + "$ref": "./examples/AccessTokens_Delete.json" + } + } + } + }, + "/playwrightworkspaces/{workspaceId}/browsers": { + "get": { + "operationId": "Workspaces_GetBrowsers", + "description": "Gets remote browsers for the specified workspace ID and redirects the client to execute Playwright scripts. Requires Bearer JWT access token provided by Entra ID or Playwright Service.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "name": "os", + "in": "query", + "description": "The operating system for remote script execution.", + "required": true, + "type": "string", + "enum": [ + "Linux", + "Windows" + ], + "x-ms-enum": { + "name": "OS", + "modelAsString": true, + "values": [ + { + "name": "Linux", + "value": "Linux", + "description": "Linux operating system." + }, + { + "name": "Windows", + "value": "Windows", + "description": "Windows operating system." + } + ] + } + }, + { + "name": "runId", + "in": "query", + "description": "The run ID in GUID format.", + "required": false, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + } + ], + "responses": { + "302": { + "description": "Redirection", + "headers": { + "location": { + "type": "string", + "description": "The redirect target URL for executing Playwright scripts on remote browsers." + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Workspaces_GetBrowsers": { + "$ref": "./examples/Workspaces_GetBrowsers.json" + } + } + } + }, + "/playwrightworkspaces/{workspaceId}/test-runs": { + "get": { + "operationId": "TestRuns_List", + "description": "Lists test runs for the specified workspace ID. Supports OData query parameters such as $filter and $top. Default page size is 10. Use nextLink in response to fetch additional results. Requires Bearer JWT access token provided by Entra ID or Playwright Service.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedTestRun" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "TestRuns_List": { + "$ref": "./examples/TestRuns_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/playwrightworkspaces/{workspaceId}/test-runs/{runId}": { + "patch": { + "operationId": "TestRuns_CreateOrUpdate", + "description": "Creates or updates a test run for the workspace with the specified test run ID. Requires Bearer JWT access token provided by Entra ID or Playwright Service.", + "consumes": [ + "application/merge-patch+json" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "workspaceId", + "in": "path", + "description": "The workspace ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "name": "runId", + "in": "path", + "description": "The test run ID in GUID format.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "name": "x-ms-useragent", + "in": "header", + "description": "Optional header to specify additional client information when the standard 'User-Agent' header cannot be explicitly set, such as when using Playwright Client. The value should follow the standard 'User-Agent' header format.", + "required": false, + "type": "string" + }, + { + "name": "resource", + "in": "body", + "description": "The resource instance.", + "required": true, + "schema": { + "$ref": "#/definitions/TestRunCreateOrUpdate" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/TestRun" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/TestRun" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "TestRuns_CreateOrUpdate": { + "$ref": "./examples/TestRuns_CreateOrUpdate.json" + } + } + } + } + }, + "definitions": { + "AccessToken": { + "type": "object", + "description": "Model of an access token linked to a workspace.", + "properties": { + "id": { + "type": "string", + "description": "The access token ID in GUID format.", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The access token name.", + "minLength": 3, + "maxLength": 24, + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "jwtToken": { + "type": "string", + "description": "The access token value in JWT format.", + "readOnly": true + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The access token creation timestamp in UTC.", + "readOnly": true + }, + "expiryAt": { + "type": "string", + "format": "date-time", + "description": "The access token expiration timestamp in UTC.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "state": { + "$ref": "#/definitions/AccessTokenState", + "description": "The access token state.", + "readOnly": true + } + }, + "required": [ + "id", + "name", + "createdAt", + "expiryAt", + "state" + ] + }, + "AccessTokenState": { + "type": "string", + "description": "The access token state.", + "enum": [ + "Active", + "Expired" + ], + "x-ms-enum": { + "name": "AccessTokenState", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "The access token is active and can be used for authentication." + }, + { + "name": "Expired", + "value": "Expired", + "description": "The access token has expired and cannot be used for authentication." + } + ] + } + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CiConfig": { + "type": "object", + "description": "The test run CI configuration.", + "properties": { + "providerName": { + "type": "string", + "description": "The CI provider name.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "branch": { + "type": "string", + "description": "The CI branch name.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "author": { + "type": "string", + "description": "The CI commit author.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "commitId": { + "type": "string", + "description": "The CI commit ID.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "revisionUrl": { + "type": "string", + "description": "The CI revision URL.", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "PagedAccessToken": { + "type": "object", + "description": "Paged collection of AccessToken items", + "properties": { + "value": { + "type": "array", + "description": "The AccessToken items on this page", + "items": { + "$ref": "#/definitions/AccessToken" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PagedTestRun": { + "type": "object", + "description": "Paged collection of TestRun items", + "properties": { + "value": { + "type": "array", + "description": "The TestRun items on this page", + "items": { + "$ref": "#/definitions/TestRun" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "RunConfig": { + "type": "object", + "description": "The run configuration.", + "properties": { + "framework": { + "$ref": "#/definitions/RunFramework", + "description": "The framework used for the test run.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "sdkLanguage": { + "$ref": "#/definitions/SDKLanguage", + "description": "The SDK language used for the test run.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "maxWorkers": { + "type": "integer", + "format": "int64", + "description": "The maximum number of workers required for the test run.", + "minimum": 1, + "maximum": 500, + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "RunFramework": { + "type": "object", + "description": "The test run framework information.", + "properties": { + "name": { + "type": "string", + "description": "The framework name.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "version": { + "type": "string", + "description": "The framework version.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "runnerName": { + "type": "string", + "description": "The framework runner name.", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "RunStatus": { + "type": "string", + "description": "The test run status.", + "enum": [ + "RUNNING", + "CLIENT_COMPLETE", + "SERVER_COMPLETE" + ], + "x-ms-enum": { + "name": "RunStatus", + "modelAsString": true, + "values": [ + { + "name": "RUNNING", + "value": "RUNNING", + "description": "The test run is currently running." + }, + { + "name": "CLIENT_COMPLETE", + "value": "CLIENT_COMPLETE", + "description": "The test run has completed on the client side." + }, + { + "name": "SERVER_COMPLETE", + "value": "SERVER_COMPLETE", + "description": "The test run has completed on the server side." + } + ] + } + }, + "RunSummary": { + "type": "object", + "description": "The test run summary.", + "properties": { + "status": { + "$ref": "#/definitions/RunStatus", + "description": "The test run status.", + "readOnly": true + }, + "billableTime": { + "type": "integer", + "format": "int64", + "description": "The test run billable time in milliseconds.", + "readOnly": true + }, + "numBrowserSessions": { + "type": "integer", + "format": "int64", + "description": "The total number of browser sessions allocated to the test run.", + "readOnly": true + }, + "maxConcurrentBrowserSessions": { + "type": "integer", + "format": "int64", + "description": "The highest number of browser sessions that were running concurrently during the test run.", + "readOnly": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "The test run start time in UTC.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "The test run end time in UTC.", + "readOnly": true + }, + "duration": { + "type": "integer", + "format": "int64", + "description": "The test run duration in milliseconds.", + "readOnly": true + }, + "errorMessages": { + "type": "array", + "description": "The list of error messages corresponding to the test run.", + "items": { + "type": "string" + }, + "readOnly": true + } + }, + "required": [ + "status", + "startTime" + ] + }, + "SDKLanguage": { + "type": "string", + "description": "The SDK language used for the test run.", + "enum": [ + "JAVASCRIPT", + "TYPESCRIPT", + "CSHARP" + ], + "x-ms-enum": { + "name": "SDKLanguage", + "modelAsString": true, + "values": [ + { + "name": "JAVASCRIPT", + "value": "JAVASCRIPT", + "description": "JavaScript SDK" + }, + { + "name": "TYPESCRIPT", + "value": "TYPESCRIPT", + "description": "TypeScript SDK" + }, + { + "name": "CSHARP", + "value": "CSHARP", + "description": "C# SDK" + } + ] + } + }, + "SubscriptionState": { + "type": "string", + "description": "The Azure subscription state.", + "enum": [ + "Registered", + "Warned", + "Suspended", + "Deleted", + "Unregistered" + ], + "x-ms-enum": { + "name": "SubscriptionState", + "modelAsString": true, + "values": [ + { + "name": "Registered", + "value": "Registered", + "description": "The subscription state is Registered." + }, + { + "name": "Warned", + "value": "Warned", + "description": "The subscription state is Warned." + }, + { + "name": "Suspended", + "value": "Suspended", + "description": "The subscription state is Suspended." + }, + { + "name": "Deleted", + "value": "Deleted", + "description": "The subscription state is Deleted." + }, + { + "name": "Unregistered", + "value": "Unregistered", + "description": "The subscription state is Unregistered." + } + ] + } + }, + "TestRun": { + "type": "object", + "description": "Model of a test run used for tracking purposes.", + "properties": { + "id": { + "type": "string", + "description": "The test run ID in GUID format.", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "The test run display name.", + "minLength": 1, + "maxLength": 200, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "creatorId": { + "type": "string", + "description": "The test run creator's ID.", + "readOnly": true + }, + "creatorName": { + "type": "string", + "description": "The test run creator's name.", + "readOnly": true + }, + "config": { + "$ref": "#/definitions/RunConfig", + "description": "The test run configuration.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "ciConfig": { + "$ref": "#/definitions/CiConfig", + "description": "The test run CI configuration.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "summary": { + "$ref": "#/definitions/RunSummary", + "description": "The test run summary.", + "readOnly": true + } + }, + "required": [ + "id", + "displayName", + "creatorId", + "summary" + ] + }, + "TestRunCreateOrUpdate": { + "type": "object", + "description": "Model of a test run used for tracking purposes.", + "properties": { + "displayName": { + "type": "string", + "description": "The test run display name.", + "minLength": 1, + "maxLength": 200, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "config": { + "$ref": "#/definitions/RunConfig", + "description": "The test run configuration.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "ciConfig": { + "$ref": "#/definitions/CiConfig", + "description": "The test run CI configuration.", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "Workspace": { + "type": "object", + "description": "Playwright workspace is the parent resource for most of the other service resources.", + "properties": { + "id": { + "type": "string", + "description": "The workspace ID in GUID format.", + "minLength": 3, + "maxLength": 36, + "pattern": "[A-Za-z0-9]+(-[A-Za-z0-9]+)+", + "readOnly": true + }, + "resourceId": { + "type": "string", + "description": "The fully-qualified Azure resource id for the workspace.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The workspace name.", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/WorkspaceState", + "description": "The state of workspace - Active | Inactive", + "readOnly": true + }, + "subscriptionId": { + "type": "string", + "description": "The Azure subscription id in GUID format for the workspace.", + "readOnly": true + }, + "subscriptionState": { + "$ref": "#/definitions/SubscriptionState", + "description": "The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "The Azure tenant id in GUID format for the workspace.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "The workspace resource location in Azure, for eg. eastus, southeastasia.", + "readOnly": true + }, + "regionalAffinity": { + "type": "string", + "description": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "default": "Enabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EnablementStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "The feature is Enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "The feature is Disabled." + } + ] + }, + "readOnly": true + }, + "localAuth": { + "type": "string", + "description": "When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EnablementStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "The feature is Enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "The feature is Disabled." + } + ] + }, + "readOnly": true + }, + "storageUri": { + "type": "string", + "format": "uri", + "description": "When set on Playwright workspace resource, it provides the URI of the Azure storage account used to store workspace artifacts, test results, and reports.", + "readOnly": true + } + }, + "required": [ + "id", + "resourceId", + "name", + "state", + "subscriptionId", + "subscriptionState", + "tenantId", + "location" + ] + }, + "WorkspaceState": { + "type": "string", + "description": "The Playwright workspace state.", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "WorkspaceState", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "The workspace is Active." + }, + { + "name": "Inactive", + "value": "Inactive", + "description": "The workspace is Inactive." + } + ] + } + } + }, + "parameters": { + "Azure.Core.ClientRequestIdHeader": { + "name": "x-ms-client-request-id", + "in": "header", + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "required": false, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method", + "x-ms-client-name": "clientRequestId" + }, + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/loadtestservice/data-plane/playwright/readme.md b/specification/loadtestservice/data-plane/playwright/readme.md index 9b9eef70acfd..547ec3da0035 100644 --- a/specification/loadtestservice/data-plane/playwright/readme.md +++ b/specification/loadtestservice/data-plane/playwright/readme.md @@ -30,6 +30,20 @@ description: Microsoft Playwright Service Client openapi-type: data-plane tag: package-2025-09-01 ``` +### Tag: package-2026-01-01-preview +These settings apply only when `--tag=2026-01-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2026-01-01-preview' +input-file: + - preview/2026-01-01-preview/playwright.json +suppressions: + - code: ValidResponseCodeRequired + from: playwright.json + reason: Need 302 response code as a product requirement to redirect the client for script execution on remote browsers provided by the service. + where: + - $.paths["/playwrightworkspaces/{workspaceId}/browsers"].get.responses +``` + ### Tag: package-2025-09-01 These settings apply only when `--tag=2025-09-01` is specified on the command line. diff --git a/specification/loadtestservice/data-plane/playwright/typespec/accesstokens.tsp b/specification/loadtestservice/data-plane/playwright/typespec/accesstokens.tsp new file mode 100644 index 000000000000..2b795eaf3a56 --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/typespec/accesstokens.tsp @@ -0,0 +1,73 @@ +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; + +namespace Playwright; + +// Models //////////////////// + +@doc("Model of an access token linked to a workspace.") +@resource("access-tokens") +@parentResource(Workspace) +model AccessToken { + @key("accessTokenId") + @doc("The access token ID in GUID format.") + @minLength(3) + @maxLength(36) + @pattern("[A-Za-z0-9]+(-[A-Za-z0-9]+)+") + @visibility(Lifecycle.Read) + id: string; + + // Standard Azure Resource Name parameter regex pattern - https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/reference/data-types/#Azure.ResourceManager.ResourceNameParameter + @minLength(3) + @maxLength(24) + @pattern("^[a-zA-Z0-9-]{3,24}$") + @doc("The access token name.") + @visibility(Lifecycle.Read, Lifecycle.Create) + name: string; + + @doc("The access token value in JWT format.") + @visibility(Lifecycle.Read) + jwtToken?: string; + + @doc("The access token creation timestamp in UTC.") + @visibility(Lifecycle.Read) + createdAt: utcDateTime; + + @doc("The access token expiration timestamp in UTC.") + @visibility(Lifecycle.Read, Lifecycle.Create) + expiryAt: utcDateTime; + + @doc("The access token state.") + @visibility(Lifecycle.Read) + state: AccessTokenState; +} + +@doc("The access token state.") +union AccessTokenState { + string, + + @doc("The access token is active and can be used for authentication.") + Active: "Active", + + @doc("The access token has expired and cannot be used for authentication.") + Expired: "Expired", +} + +// Operations //////////////////// + +interface AccessTokens { + // AccessToken Operations + @doc("Creates an access token for the workspace with the specified access token ID and name. The ID and name must be unique among active access tokens for the user within a Playwright workspace. Requires Bearer JWT access token provided by Entra ID.") + createOrReplace is Operations.ResourceCreateOrReplace; + + @doc("Gets an access token for the workspace with the specified access token ID. Requires Bearer JWT access token provided by Entra ID.") + get is Operations.ResourceRead; + + @doc("Deletes an access token for the workspace with the specified access token ID. Requires Bearer JWT access token provided by Entra ID.") + delete is Operations.ResourceDelete; + + @doc("Lists access tokens for the specified workspace ID. Supports OData query parameters: $select, $filter, $orderby, $top, and $skip. Default page size is 10. Use nextLink in response to fetch additional results. Requires Bearer JWT access token provided by Entra ID.") + list is Operations.ResourceList; +} diff --git a/specification/loadtestservice/data-plane/playwright/typespec/models.tsp b/specification/loadtestservice/data-plane/playwright/typespec/models.tsp new file mode 100644 index 000000000000..83f434c5136e --- /dev/null +++ b/specification/loadtestservice/data-plane/playwright/typespec/models.tsp @@ -0,0 +1,112 @@ +import "@typespec/rest"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Rest; +namespace Playwright; + +// Models //////////////////// + +@doc("Playwright workspace is the parent resource for most of the other service resources.") +@resource("playwrightworkspaces") +model Workspace { + @key("workspaceId") + @doc("The workspace ID in GUID format.") + @maxLength(36) + @minLength(3) + @pattern("[A-Za-z0-9]+(-[A-Za-z0-9]+)+") + @visibility(Lifecycle.Read) + id: string; + + @doc("The fully-qualified Azure resource id for the workspace.") + @visibility(Lifecycle.Read) + resourceId: string; + + @doc("The workspace name.") + @visibility(Lifecycle.Read) + name: string; + + @doc("The state of workspace - Active | Inactive") + @visibility(Lifecycle.Read) + state: WorkspaceState; + + @doc("The Azure subscription id in GUID format for the workspace.") + @visibility(Lifecycle.Read) + subscriptionId: string; + + @doc("The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted") + @visibility(Lifecycle.Read) + subscriptionState: SubscriptionState; + + @doc("The Azure tenant id in GUID format for the workspace.") + @visibility(Lifecycle.Read) + tenantId: string; + + @doc("The workspace resource location in Azure, for eg. eastus, southeastasia.") + @visibility(Lifecycle.Read) + location: string; + + @doc("This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.") + @visibility(Lifecycle.Read) + regionalAffinity?: EnablementStatus = EnablementStatus.Enabled; + + @doc("When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.") + @visibility(Lifecycle.Read) + localAuth?: EnablementStatus = EnablementStatus.Disabled; + + @doc("When set on Playwright workspace resource, it provides the URI of the Azure storage account used to store workspace artifacts, test results, and reports.") + @visibility(Lifecycle.Read) + storageUri?: url; +} + +@doc("The Playwright workspace state.") +union WorkspaceState { + string, + + @doc("The workspace is Active.") + Active: "Active", + + @doc("The workspace is Inactive.") + Inactive: "Inactive", +} + +@doc("The Azure subscription state.") +union SubscriptionState { + string, + + @doc("The subscription state is Registered.") + Registered: "Registered", + + @doc("The subscription state is Warned.") + Warned: "Warned", + + @doc("The subscription state is Suspended.") + Suspended: "Suspended", + + @doc("The subscription state is Deleted.") + Deleted: "Deleted", + + @doc("The subscription state is Unregistered.") + Unregistered: "Unregistered", +} + +@doc("The enablement status of a feature.") +union EnablementStatus { + string, + + @doc("The feature is Enabled.") + Enabled: "Enabled", + + @doc("The feature is Disabled.") + Disabled: "Disabled", +} + +@doc("The operating system to configure for remote script execution.") +union OS { + string, + + @doc("Linux operating system.") + Linux: "Linux", + + @doc("Windows operating system.") + Windows: "Windows", +} diff --git a/specification/loadtestservice/data-plane/playwright/routes.tsp b/specification/loadtestservice/data-plane/playwright/typespec/routes.tsp similarity index 54% rename from specification/loadtestservice/data-plane/playwright/routes.tsp rename to specification/loadtestservice/data-plane/playwright/typespec/routes.tsp index fa3494d8e8d1..e6c053b2b577 100644 --- a/specification/loadtestservice/data-plane/playwright/routes.tsp +++ b/specification/loadtestservice/data-plane/playwright/typespec/routes.tsp @@ -1,10 +1,12 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/http"; +import "@typespec/versioning"; import "./models.tsp"; using Azure.Core; using Azure.Core.Traits; using TypeSpec.Http; +using TypeSpec.Versioning; namespace Playwright; @@ -22,21 +24,6 @@ alias ServiceTraits = NoRepeatableRequests & alias Operations = Azure.Core.ResourceOperations; -interface AccessTokens { - // AccessToken Operations - @doc("Creates an access token for the workspace with the specified access token ID and name. The ID and name must be unique among active access tokens for the user within a Playwright workspace. Requires Bearer JWT access token provided by Entra ID.") - createOrReplace is Operations.ResourceCreateOrReplace; - - @doc("Gets an access token for the workspace with the specified access token ID. Requires Bearer JWT access token provided by Entra ID.") - get is Operations.ResourceRead; - - @doc("Deletes an access token for the workspace with the specified access token ID. Requires Bearer JWT access token provided by Entra ID.") - delete is Operations.ResourceDelete; - - @doc("Lists access tokens for the specified workspace ID. Supports OData query parameters: $select, $filter, $orderby, $top, and $skip. Default page size is 10. Use nextLink in response to fetch additional results. Requires Bearer JWT access token provided by Entra ID.") - list is Operations.ResourceList; -} - alias GetBrowsersParams = { @path @maxLength(36) @@ -68,6 +55,11 @@ alias GetBrowsersResponse = { interface Workspaces { // Workspaces Operations + + @added(Versions.v2026_01_01_preview) + @doc("Get details of the Azure resource mapped to a workspace for the given workspace id. Authorization required is Bearer JWT Access token provided by EntraID.") + get is Operations.ResourceRead; + #suppress "@azure-tools/typespec-azure-core/no-rpc-path-params" "Operations defined using RpcOperation should not have path parameters. Consider using ResourceAction or ResourceCollectionAction instead." @doc("Gets remote browsers for the specified workspace ID and redirects the client to execute Playwright scripts. Requires Bearer JWT access token provided by Entra ID or Playwright Service.") @route("/playwrightworkspaces/{workspaceId}/browsers") @@ -77,12 +69,3 @@ interface Workspaces { ServiceTraits >; } - -interface TestRuns { - // TestRun Operations - @doc("Creates or updates a test run for the workspace with the specified test run ID. Requires Bearer JWT access token provided by Entra ID or Playwright Service.") - createOrUpdate is Operations.ResourceCreateOrUpdate; - - @doc("Lists test runs for the specified workspace ID. Supports OData query parameters such as $filter and $top. Default page size is 10. Use nextLink in response to fetch additional results. Requires Bearer JWT access token provided by Entra ID or Playwright Service.") - list is Operations.ResourceList; -} diff --git a/specification/loadtestservice/data-plane/playwright/models.tsp b/specification/loadtestservice/data-plane/playwright/typespec/testruns.tsp similarity index 66% rename from specification/loadtestservice/data-plane/playwright/models.tsp rename to specification/loadtestservice/data-plane/playwright/typespec/testruns.tsp index 7c2cdbea6cff..c4eb9ecfdf32 100644 --- a/specification/loadtestservice/data-plane/playwright/models.tsp +++ b/specification/loadtestservice/data-plane/playwright/typespec/testruns.tsp @@ -1,82 +1,10 @@ import "@typespec/rest"; +import "./models.tsp"; using TypeSpec.Rest; namespace Playwright; -// Models //////////////////// - -@doc("Model of an access token linked to a workspace.") -@resource("access-tokens") -@parentResource(Workspace) -model AccessToken { - @key("accessTokenId") - @doc("The access token ID in GUID format.") - @minLength(3) - @maxLength(36) - @pattern("[A-Za-z0-9]+(-[A-Za-z0-9]+)+") - @visibility(Lifecycle.Read) - id: string; - - // Standard Azure Resource Name parameter regex pattern - https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/reference/data-types/#Azure.ResourceManager.ResourceNameParameter - @minLength(3) - @maxLength(24) - @pattern("^[a-zA-Z0-9-]{3,24}$") - @doc("The access token name.") - @visibility(Lifecycle.Read, Lifecycle.Create) - name: string; - - @doc("The access token value in JWT format.") - @visibility(Lifecycle.Read) - jwtToken?: string; - - @doc("The access token creation timestamp in UTC.") - @visibility(Lifecycle.Read) - createdAt: utcDateTime; - - @doc("The access token expiration timestamp in UTC.") - @visibility(Lifecycle.Read, Lifecycle.Create) - expiryAt: utcDateTime; - - @doc("The access token state.") - @visibility(Lifecycle.Read) - state: AccessTokenState; -} - -@doc("The access token state.") -union AccessTokenState { - string, - - @doc("The access token is active and can be used for authentication.") - Active: "Active", - - @doc("The access token has expired and cannot be used for authentication.") - Expired: "Expired", -} - -@doc("The operating system to configure for remote script execution.") -union OS { - string, - - @doc("Linux operating system.") - Linux: "Linux", - - @doc("Windows operating system.") - Windows: "Windows", -} - -@doc("Playwright workspace is the parent resource for most of the other service resources.") -@resource("playwrightworkspaces") -model Workspace { - @key("workspaceId") - @doc("The workspace ID in GUID format.") - @maxLength(36) - @minLength(3) - @pattern("[A-Za-z0-9]+(-[A-Za-z0-9]+)+") - @visibility(Lifecycle.Read) - id: string; -} - @doc("Model of a test run used for tracking purposes.") @resource("test-runs") @parentResource(Workspace) @@ -233,3 +161,14 @@ union RunStatus { @doc("The test run has completed on the server side.") SERVER_COMPLETE: "SERVER_COMPLETE", } + +// Operations //////////////////// + +interface TestRuns { + // TestRun Operations + @doc("Creates or updates a test run for the workspace with the specified test run ID. Requires Bearer JWT access token provided by Entra ID or Playwright Service.") + createOrUpdate is Operations.ResourceCreateOrUpdate; + + @doc("Lists test runs for the specified workspace ID. Supports OData query parameters such as $filter and $top. Default page size is 10. Use nextLink in response to fetch additional results. Requires Bearer JWT access token provided by Entra ID or Playwright Service.") + list is Operations.ResourceList; +}