From 174cf4cb1780f2cff06794f52c21de0678eb63e3 Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 10 Aug 2021 14:42:37 +0200 Subject: [PATCH 1/8] Include k6-api status PATCH with info on how to stop test. Resolve #162. --- .../es/07 Misc/04 k6 REST API.md | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md index 36f4360bb7..f8025eb4a1 100644 --- a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md @@ -6,8 +6,8 @@ hideFromSidebar: true --- When k6 starts, it spins up an HTTP server with a REST API that can be used to control some -parameters of the test execution. By default, that server listens on `localhost:6565`, but -that can be modified by the `--address` CLI flag. +parameters of the test execution. By default, that server listens on `localhost:6565`; +this can be modified by the `--address` CLI flag. With this API you can see and control different execution aspects like number of VUs, Max VUs, pause or resume the test, list groups, set and get the setup data and so on. @@ -583,3 +583,39 @@ curl -X PUT \ This endpoint parses the JSON request body and sets the result as Setup data. For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). + +## Modify Setup + +**PATCH** `http://localhost:6565/v1/status` + + + +```bash +curl -X PATCH \ + http://localhost:6565/v1/status \ + -H 'Content-Type': application/json' \ + -d '{ + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } +}' +``` + +```json +{ + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } +} +``` + + +This endpoint parses the JSON request body and updates the setup data in-place. This can also be done for a running test. The example above exemplifies how to stop a test from the API. \ No newline at end of file From 6b84f0e64115da23e83aae8a1631fca24accfbbe Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 10 Aug 2021 18:53:37 +0200 Subject: [PATCH 2/8] Update en version too --- .../en/07 Misc/04 k6 REST API.md | 38 +++++++++++++++++++ .../es/07 Misc/04 k6 REST API.md | 6 ++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md index 129e4be3e0..e06ff09299 100644 --- a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md @@ -582,3 +582,41 @@ curl -X PUT \ This endpoint parses the JSON request body and sets the result as Setup data. For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). + +## Modify Setup + +**PATCH** `http://localhost:6565/v1/status` + + + +```bash +curl -X PATCH \ + http://localhost:6565/v1/status \ + -H 'Content-Type': application/json' \ + -d '{ + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } +}' +``` + +```json +{ + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } +} +``` + + +This endpoint parses the JSON request body and updates the setup data in-place. +This can also be done for a running test. The example above exemplifies how to +stop a test from the API. diff --git a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md index f8025eb4a1..40f7be7582 100644 --- a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md @@ -615,7 +615,9 @@ curl -X PATCH \ } } } -``` +``` -This endpoint parses the JSON request body and updates the setup data in-place. This can also be done for a running test. The example above exemplifies how to stop a test from the API. \ No newline at end of file +This endpoint parses the JSON request body and updates the setup data in-place. +This can also be done for a running test. The example above exemplifies how to +stop a test from the API. From 87cd061f74d7f73d15c9966d82c1980e42076a2a Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 10 Aug 2021 23:50:36 +0200 Subject: [PATCH 3/8] Update API PATCH docs after feedback --- .../en/07 Misc/04 k6 REST API.md | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md index e06ff09299..fd0b3c70ad 100644 --- a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md @@ -1,7 +1,6 @@ --- title: 'k6 REST API' excerpt: '' -hideFromSidebar: true --- When k6 starts, it spins up an HTTP server with a REST API that can be used to control some @@ -583,7 +582,7 @@ This endpoint parses the JSON request body and sets the result as Setup data. For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). -## Modify Setup +## Stop Test **PATCH** `http://localhost:6565/v1/status` @@ -591,16 +590,16 @@ For more detail about the setup stage please go to [Test life cycle](/using-k6/t ```bash curl -X PATCH \ - http://localhost:6565/v1/status \ - -H 'Content-Type': application/json' \ - -d '{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "stopped": true - } - } + http://localhost:6565/v1/status \ + -H 'Content-Type: application/json' \ + -d '{ + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } }' ``` @@ -617,6 +616,4 @@ curl -X PATCH \ ``` -This endpoint parses the JSON request body and updates the setup data in-place. -This can also be done for a running test. The example above exemplifies how to -stop a test from the API. +This call parses the JSON request body to update the status and stop a running test. From 9b42fb90764d372f169bdb654b496acb5e5f3490 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 11 Aug 2021 00:00:27 +0200 Subject: [PATCH 4/8] Sync the Spanish (untranslated) version of k6-api page --- .../en/07 Misc/04 k6 REST API.md | 4 ++- .../es/07 Misc/04 k6 REST API.md | 34 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md index fd0b3c70ad..8dc97c7457 100644 --- a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md @@ -1,6 +1,8 @@ --- title: 'k6 REST API' -excerpt: '' +excerpt: 'With this API you can see and control different execution aspects like +number of VUs, Max VUs, pause or resume the test, list groups, set and get the +setup data and more.' --- When k6 starts, it spins up an HTTP server with a REST API that can be used to control some diff --git a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md index 40f7be7582..4840863864 100644 --- a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md @@ -1,13 +1,13 @@ --- title: 'k6 REST API' -excerpt: 'With this API you can see and control different execution aspects like number of VUs, Max -VUs, pause or resume the test, list groups, set and get the setup data and so on.' -hideFromSidebar: true +excerpt: 'With this API you can see and control different execution aspects like +number of VUs, Max VUs, pause or resume the test, list groups, set and get the +setup data and more.' --- When k6 starts, it spins up an HTTP server with a REST API that can be used to control some parameters of the test execution. By default, that server listens on `localhost:6565`; -this can be modified by the `--address` CLI flag. +that can be modified by the `--address` CLI flag. With this API you can see and control different execution aspects like number of VUs, Max VUs, pause or resume the test, list groups, set and get the setup data and so on. @@ -584,7 +584,7 @@ This endpoint parses the JSON request body and sets the result as Setup data. For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). -## Modify Setup +## Stop Test **PATCH** `http://localhost:6565/v1/status` @@ -592,16 +592,16 @@ For more detail about the setup stage please go to [Test life cycle](/using-k6/t ```bash curl -X PATCH \ - http://localhost:6565/v1/status \ - -H 'Content-Type': application/json' \ - -d '{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "stopped": true - } - } + http://localhost:6565/v1/status \ + -H 'Content-Type: application/json' \ + -d '{ + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } }' ``` @@ -618,6 +618,4 @@ curl -X PATCH \ ``` -This endpoint parses the JSON request body and updates the setup data in-place. -This can also be done for a running test. The example above exemplifies how to -stop a test from the API. +This call parses the JSON request body to update the status and stop a running test. From 4a931b29f19cbc882ebbf4cd4447fa84d3d575fb Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 11 Aug 2021 00:06:16 +0200 Subject: [PATCH 5/8] Some more removal of tabs --- .../translated-guides/en/07 Misc/04 k6 REST API.md | 14 +++++++------- .../translated-guides/es/07 Misc/04 k6 REST API.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md index 8dc97c7457..e80db03cd0 100644 --- a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md @@ -595,13 +595,13 @@ curl -X PATCH \ http://localhost:6565/v1/status \ -H 'Content-Type: application/json' \ -d '{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "stopped": true - } - } + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } }' ``` diff --git a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md index 4840863864..aa377fe1da 100644 --- a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md @@ -595,13 +595,13 @@ curl -X PATCH \ http://localhost:6565/v1/status \ -H 'Content-Type: application/json' \ -d '{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "stopped": true - } - } + "data": { + "type": "status", + "id": "default", + "attributes": { + "stopped": true + } + } }' ``` From 40dca1acbed55ab16d8f6df4d03d0b1abd5e036c Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:44:36 +0200 Subject: [PATCH 6/8] Enable `hideFromSidebar` --- src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md | 1 + src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md | 1 + 2 files changed, 2 insertions(+) diff --git a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md index e80db03cd0..2f6a206585 100644 --- a/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/en/07 Misc/04 k6 REST API.md @@ -3,6 +3,7 @@ title: 'k6 REST API' excerpt: 'With this API you can see and control different execution aspects like number of VUs, Max VUs, pause or resume the test, list groups, set and get the setup data and more.' +hideFromSidebar: true --- When k6 starts, it spins up an HTTP server with a REST API that can be used to control some diff --git a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md index aa377fe1da..64f8c28b70 100644 --- a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md +++ b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md @@ -3,6 +3,7 @@ title: 'k6 REST API' excerpt: 'With this API you can see and control different execution aspects like number of VUs, Max VUs, pause or resume the test, list groups, set and get the setup data and more.' +hideFromSidebar: true --- When k6 starts, it spins up an HTTP server with a REST API that can be used to control some From 77f404408b01ab9cdb4b6ee597e540bfff0f663f Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:49:37 +0200 Subject: [PATCH 7/8] Remove ES translated md file for REST API page --- .../es/07 Misc/04 k6 REST API.md | 622 ------------------ 1 file changed, 622 deletions(-) delete mode 100644 src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md diff --git a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md b/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md deleted file mode 100644 index 64f8c28b70..0000000000 --- a/src/data/markdown/translated-guides/es/07 Misc/04 k6 REST API.md +++ /dev/null @@ -1,622 +0,0 @@ ---- -title: 'k6 REST API' -excerpt: 'With this API you can see and control different execution aspects like -number of VUs, Max VUs, pause or resume the test, list groups, set and get the -setup data and more.' -hideFromSidebar: true ---- - -When k6 starts, it spins up an HTTP server with a REST API that can be used to control some -parameters of the test execution. By default, that server listens on `localhost:6565`; -that can be modified by the `--address` CLI flag. - -With this API you can see and control different execution aspects like number of VUs, Max -VUs, pause or resume the test, list groups, set and get the setup data and so on. - -You can also find practical usage examples in -[this blog post](https://k6.io/blog/how-to-control-a-live-k6-test). - -## Get Status - -**GET** `http://localhost:6565/v1/status` - - - -```bash -curl -X GET \ - http://localhost:6565/v1/status \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": { - "attributes": { - "paused": false, - "running": true, - "tainted": false, - "vus": 1, - "vus-max": 1 - }, - "id": "default", - "type": "status" - } -} -``` - - - -## Update Status - -**PATCH** `http://localhost:6565/v1/status` - - - -```bash -curl -X PATCH \ - http://localhost:6565/v1/status \ - -H 'Content-Type: application/json' \ - -d '{ - "data": { - "attributes": { - "paused": true, - "vus": 1, - "vus-max": 1 - }, - "id": "default", - "type": "status" - } -}' -``` - -```json -{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "paused": true, - "vus": 1, - "vus-max": 1, - "running": true, - "tainted": false - } - } -} -``` - - - -This endpoint lets you pause/resume a running test and set the number of `vus` and `vus-max` -during the test. - -## List Metrics - -**GET** `http://localhost:6565/v1/metrics` - - - -```bash -curl -X GET \ - http://localhost:6565/v1/metrics \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": [ - { - "type": "metrics", - "id": "http_req_duration", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 122.529465, - "max": 179.098624, - "med": 115.83006, - "min": 107.743524, - "p(90)": 136.9331272, - "p(95)": 158.01587559999996 - } - } - }, - { - "type": "metrics", - "id": "http_req_connecting", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 11.2357072, - "max": 112.357072, - "med": 0, - "min": 0, - "p(90)": 11.235707199999961, - "p(95)": 61.796389599999884 - } - } - }, - { - "type": "metrics", - "id": "http_req_sending", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 0.027994200000000004, - "max": 0.106594, - "med": 0.0192965, - "min": 0.017486, - "p(90)": 0.03165189999999997, - "p(95)": 0.0691229499999999 - } - } - }, - { - "type": "metrics", - "id": "http_req_waiting", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 122.33937080000001, - "max": 179.021285, - "med": 115.74006299999999, - "min": 107.650352, - "p(90)": 136.8561833, - "p(95)": 157.93873414999996 - } - } - }, - { - "type": "metrics", - "id": "data_received", - "attributes": { - "type": "counter", - "contains": "data", - "tainted": null, - "sample": { - "count": 13830, - "rate": 1119.9222882571698 - } - } - }, - { - "type": "metrics", - "id": "http_req_blocked", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 11.364957999999998, - "max": 113.611988, - "med": 0.004173, - "min": 0.003867, - "p(90)": 11.365557499999959, - "p(95)": 62.48877274999988 - } - } - }, - { - "type": "metrics", - "id": "http_req_receiving", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 0.16209999999999997, - "max": 0.757392, - "med": 0.078622, - "min": 0.057306, - "p(90)": 0.2315264999999998, - "p(95)": 0.4944592499999994 - } - } - }, - { - "type": "metrics", - "id": "vus_max", - "attributes": { - "type": "gauge", - "contains": "default", - "tainted": null, - "sample": { - "value": 1 - } - } - }, - { - "type": "metrics", - "id": "http_reqs", - "attributes": { - "type": "counter", - "contains": "default", - "tainted": null, - "sample": { - "count": 10, - "rate": 0.8097775041628127 - } - } - }, - { - "type": "metrics", - "id": "http_req_tls_handshaking", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 0, - "max": 0, - "med": 0, - "min": 0, - "p(90)": 0, - "p(95)": 0 - } - } - }, - { - "type": "metrics", - "id": "data_sent", - "attributes": { - "type": "counter", - "contains": "data", - "tainted": null, - "sample": { - "count": 860, - "rate": 69.64086535800189 - } - } - }, - { - "type": "metrics", - "id": "iteration_duration", - "attributes": { - "type": "trend", - "contains": "time", - "tainted": null, - "sample": { - "avg": 1134.89821, - "max": 1238.377413, - "med": 1118.223518, - "min": 1108.405498, - "p(90)": 1185.348477, - "p(95)": 1211.8629449999999 - } - } - }, - { - "type": "metrics", - "id": "iterations", - "attributes": { - "type": "counter", - "contains": "default", - "tainted": null, - "sample": { - "count": 10, - "rate": 0.8097775041628127 - } - } - }, - { - "type": "metrics", - "id": "vus", - "attributes": { - "type": "gauge", - "contains": "default", - "tainted": null, - "sample": { - "value": 1 - } - } - } - ] -} -``` - - - -This endpoint will give you all the metrics in the current time. You can see more details on all -metrics available and how to create new ones in [Metrics](/using-k6/metrics). - -## Get Metric - -**GET** `http://localhost:6565/v1/metrics/id` - - - -```bash -curl -X GET \ - http://localhost:6565/v1/metrics/http_req_receiving \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": { - "attributes": { - "contains": "time", - "sample": { - "avg": 0.12641856097560983, - "max": 1.1397, - "med": 0.074412, - "min": 0.057858, - "p(90)": 0.208553, - "p(95)": 0.218015 - }, - "tainted": null, - "type": "trend" - }, - "id": "http_req_receiving", - "type": "metrics" - } -} -``` - - - -This endpoint will give you details for the given metric in the current time. - -You can see more on all metrics available and how to create new ones in [Metrics](/using-k6/metrics). - -## List Groups - -**GET** `http://localhost:6565/v1/groups` - - - -```bash -curl -X GET \ - http://localhost:6565/v1/groups \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": [ - { - "type": "groups", - "id": "d41d8cd98f00b204e9800998ecf8427e", - "attributes": { - "path": "", - "name": "", - "checks": null - }, - "relationships": { - "groups": { - "data": [ - { - "type": "groups", - "id": "b0470a9324a4ae563b04e9ac49fbc9cf" - } - ] - }, - "parent": { - "data": null - } - } - }, - { - "type": "groups", - "id": "b0470a9324a4ae563b04e9ac49fbc9cf", - "attributes": { - "path": "::visit homepage", - "name": "visit homepage", - "checks": null - }, - "relationships": { - "groups": { - "data": [] - }, - "parent": { - "data": { - "type": "groups", - "id": "d41d8cd98f00b204e9800998ecf8427e" - } - } - } - } - ] -} -``` - - - -This endpoint returns all groups available on the test. - -For more details on how to create groups please go to [Tags and Groups](/using-k6/tags-and-groups). - -## Get Group - -**GET** `http://localhost:6565/v1/groups/id` - - - -```bash -curl -X GET \ - http://localhost:6565/v1/group/b0470a9324a4ae563b04e9ac49fbc9cf \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": { - "type": "groups", - "id": "b0470a9324a4ae563b04e9ac49fbc9cf", - "attributes": { - "path": "::visit homepage", - "name": "visit homepage", - "checks": null - }, - "relationships": { - "groups": { - "data": [] - }, - "parent": { - "data": { - "type": "groups", - "id": "d41d8cd98f00b204e9800998ecf8427e" - } - } - } - } -} -``` - - - -This endpoint returns the Group with the given ID. - -For more details on how to create groups, please go to [Tags and Groups](/using-k6/tags-and-groups). - -## Get Setup Data - -**GET** `http://localhost:6565/v1/setup` - - - -```bash -curl -X GET \ - http://localhost:6565/v1/setup \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": { - "type": "setupData", - "id": "default", - "attributes": { - "data": { - "a": 1 - } - } - } -} -``` - - - -This endpoint returns the current JSON-encoded setup data. - -For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). - -## Run Setup - -**PUT** `http://localhost:6565/v1/setup` - - - -```bash -curl -X POST \ - http://localhost:6565/v1/setup \ - -H 'Content-Type: application/json' -``` - -```json -{ - "data": { - "type": "setupData", - "id": "default", - "attributes": { - "data": { - "a": 1 - } - } - } -} -``` - - - -This endpoint executes the Setup stage and returns the result. - -For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). - -## Update Setup - -**PUT** `http://localhost:6565/v1/setup` - - - -```bash -curl -X PUT \ - http://localhost:6565/v1/setup \ - -H 'Content-Type: application/json' \ - -d '{ - "data": { - "attributes": { - "data": { - "a": 1, - "b": 2 - } - }, - "id": "default", - "type": "setupData" - } -}' -``` - -```json -{ - "data": { - "type": "setupData", - "id": "default", - "attributes": { - "data": { - "a": 1, - "b": 2 - } - } - } -} -``` - - - -This endpoint parses the JSON request body and sets the result as Setup data. - -For more detail about the setup stage please go to [Test life cycle](/using-k6/test-life-cycle). - -## Stop Test - -**PATCH** `http://localhost:6565/v1/status` - - - -```bash -curl -X PATCH \ - http://localhost:6565/v1/status \ - -H 'Content-Type: application/json' \ - -d '{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "stopped": true - } - } -}' -``` - -```json -{ - "data": { - "type": "status", - "id": "default", - "attributes": { - "stopped": true - } - } -} -``` - - -This call parses the JSON request body to update the status and stop a running test. From a16faa1fc26acba4aab6e58d52a2c1d027d97972 Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:53:28 +0200 Subject: [PATCH 8/8] Add missing link to REST API on spanish guide --- .../es/06 Testing Guides/04 Running large tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/markdown/translated-guides/es/06 Testing Guides/04 Running large tests.md b/src/data/markdown/translated-guides/es/06 Testing Guides/04 Running large tests.md index cdece9c2b1..b8b74048ac 100644 --- a/src/data/markdown/translated-guides/es/06 Testing Guides/04 Running large tests.md +++ b/src/data/markdown/translated-guides/es/06 Testing Guides/04 Running large tests.md @@ -413,7 +413,7 @@ k6 run --execution-segment "3/4:1" --execution-segment-sequence "0,1/4,2/4,3 Sin embargo -en este momento el modo de ejecución distribuido de k6 no es del todo funcional. Las limitaciones actuales son: -- k6 no proporciona un coordinador de pruebas o instancia maestra para coordinar la ejecución distribuida de la prueba. Como alternativa, se puede utilizar la API REST de k6 y --paused para sincronizar la ejecución de las múltiples instancias de k6. +- k6 no proporciona un coordinador de pruebas o instancia maestra para coordinar la ejecución distribuida de la prueba. Como alternativa, se puede utilizar la [API REST de k6](/misc/k6-rest-api) y --paused para sincronizar la ejecución de las múltiples instancias de k6. - Cada instancia de k6 evalúa los umbrales de forma independiente, excluyendo los resultados de las otras instancias de k6. Si desea desactivar la ejecución de umbrales, utilice --no-thresholds. - k6 informa de las métricas individualmente para cada instancia. Dependiendo de cómo almacene los resultados de las pruebas de carga, tendrá que agregar algunas métricas para calcularlas correctamente.