Chilkat Online Tools

SQL Server / Datadog API Collection / Trigger tests from CI/CD pipelines

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    -- The following JSON is sent in the request body.

    -- {
    --   "tests": [
    --     {
    --       "public_id": "aaa-aaa-aaa",
    --       "allowInsecureCertificates": true,
    --       "basicAuth": {
    --         "password": "PaSSw0RD!",
    --         "username": "my_username",
    --         "type": "web"
    --       },
    --       "body": "commo",
    --       "bodyType": "reprehenderit elit magna",
    --       "cookies": "elit magna in",
    --       "deviceIds": [
    --         "laptop_large",
    --         "laptop_large"
    --       ],
    --       "followRedirects": true,
    --       "headers": {
    --         "ametaeb": "veniam culpa Excepteur amet",
    --         "esta": "exercitation eu nulla irure"
    --       },
    --       "locations": [
    --         "aws:eu-west-3"
    --       ],
    --       "metadata": {
    --         "ci": {
    --           "pipeline": {
    --             "url": "velit veniam quis"
    --           },
    --           "provider": {
    --             "name": "amet"
    --           }
    --         },
    --         "git": {
    --           "branch": "cillum nostrud",
    --           "commitSha": "esse anim mollit labore"
    --         }
    --       },
    --       "retry": {
    --         "count": 44207270,
    --         "interval": 51741128.422602236
    --       },
    --       "startUrl": "sed pariatur reprehenderit",
    --       "variables": {
    --         "eu_4": "voluptate Duis Excepteur",
    --         "reprehenderit385": "mollit i"
    --       }
    --     },
    --     {
    --       "public_id": "aaa-aaa-aaa",
    --       "allowInsecureCertificates": true,
    --       "basicAuth": {
    --         "password": "PaSSw0RD!",
    --         "username": "my_username",
    --         "type": "web"
    --       },
    --       "body": "officia consectetur",
    --       "bodyType": "in consequat",
    --       "cookies": "exercitation non proident",
    --       "deviceIds": [
    --         "laptop_large",
    --         "laptop_large"
    --       ],
    --       "followRedirects": false,
    --       "headers": {
    --         "commodo__": "occaecat cupidatat elit",
    --         "utb78": "consequat",
    --         "est_cc": "ullamco Ut officia voluptate veniam"
    --       },
    --       "locations": [
    --         "aws:eu-west-3"
    --       ],
    --       "metadata": {
    --         "ci": {
    --           "pipeline": {
    --             "url": "dolor officia fugiat tempor"
    --           },
    --           "provider": {
    --             "name": "occaecat nisi i"
    --           }
    --         },
    --         "git": {
    --           "branch": "anim sint",
    --           "commitSha": "ut sunt in"
    --         }
    --       },
    --       "retry": {
    --         "count": -91157506,
    --         "interval": 92707099.30434671
    --       },
    --       "startUrl": "nostrud elit ali",
    --       "variables": {
    --         "id0_c": "ut officia ea",
    --         "sunt2b": "voluptate commodo velit elit eu",
    --         "laborum_ff": "quis laboris nisi ut",
    --         "id_ba7": "dolore veniam",
    --         "non59": "officia culpa Lorem nisi proident"
    --       }
    --     }
    --   ]
    -- }

    DECLARE @json int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].public_id', 'aaa-aaa-aaa'
    EXEC sp_OAMethod @json, 'UpdateBool', @success OUT, 'tests[0].allowInsecureCertificates', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].basicAuth.password', 'PaSSw0RD!'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].basicAuth.username', 'my_username'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].basicAuth.type', 'web'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].body', 'commo'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].bodyType', 'reprehenderit elit magna'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].cookies', 'elit magna in'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].deviceIds[0]', 'laptop_large'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].deviceIds[1]', 'laptop_large'
    EXEC sp_OAMethod @json, 'UpdateBool', @success OUT, 'tests[0].followRedirects', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].headers.ametaeb', 'veniam culpa Excepteur amet'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].headers.esta', 'exercitation eu nulla irure'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].locations[0]', 'aws:eu-west-3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].metadata.ci.pipeline.url', 'velit veniam quis'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].metadata.ci.provider.name', 'amet'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].metadata.git.branch', 'cillum nostrud'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].metadata.git.commitSha', 'esse anim mollit labore'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'tests[0].retry.count', 44207270
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'tests[0].retry.interval', '51741128.422602236'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].startUrl', 'sed pariatur reprehenderit'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].variables.eu_4', 'voluptate Duis Excepteur'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[0].variables.reprehenderit385', 'mollit i'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].public_id', 'aaa-aaa-aaa'
    EXEC sp_OAMethod @json, 'UpdateBool', @success OUT, 'tests[1].allowInsecureCertificates', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].basicAuth.password', 'PaSSw0RD!'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].basicAuth.username', 'my_username'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].basicAuth.type', 'web'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].body', 'officia consectetur'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].bodyType', 'in consequat'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].cookies', 'exercitation non proident'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].deviceIds[0]', 'laptop_large'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].deviceIds[1]', 'laptop_large'
    EXEC sp_OAMethod @json, 'UpdateBool', @success OUT, 'tests[1].followRedirects', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].headers.commodo__', 'occaecat cupidatat elit'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].headers.utb78', 'consequat'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].headers.est_cc', 'ullamco Ut officia voluptate veniam'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].locations[0]', 'aws:eu-west-3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].metadata.ci.pipeline.url', 'dolor officia fugiat tempor'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].metadata.ci.provider.name', 'occaecat nisi i'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].metadata.git.branch', 'anim sint'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].metadata.git.commitSha', 'ut sunt in'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'tests[1].retry.count', -91157506
    EXEC sp_OAMethod @json, 'UpdateNumber', @success OUT, 'tests[1].retry.interval', '92707099.30434671'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].startUrl', 'nostrud elit ali'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].variables.id0_c', 'ut officia ea'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].variables.sunt2b', 'voluptate commodo velit elit eu'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].variables.laborum_ff', 'quis laboris nisi ut'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].variables.id_ba7', 'dolore veniam'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'tests[1].variables.non59', 'officia culpa Lorem nisi proident'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PostJson3', @resp OUT, 'https://api.app.ddog-gov.com/api/v1/synthetics/tests/trigger/ci', 'application/json', @json
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        RETURN
      END

    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "batch_id": "anim quis",
    --   "locations": [
    --     {
    --       "id": -79104764,
    --       "name": "laborum"
    --     },
    --     {
    --       "id": -12473023,
    --       "name": "ullamco eu"
    --     }
    --   ],
    --   "results": [
    --     {
    --       "device": "laptop_large",
    --       "location": -53475818,
    --       "public_id": "Excepteur et",
    --       "result_id": "in"
    --     },
    --     {
    --       "device": "laptop_large",
    --       "location": 59458053,
    --       "public_id": "ut labore",
    --       "result_id": "quis tempor cillum est eu"
    --     }
    --   ],
    --   "triggered_check_ids": [
    --     "in irure culpa",
    --     "sit ad do Ut esse"
    --   ]
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @id int

    DECLARE @name nvarchar(4000)

    DECLARE @device nvarchar(4000)

    DECLARE @location int

    DECLARE @public_id nvarchar(4000)

    DECLARE @result_id nvarchar(4000)

    DECLARE @strVal nvarchar(4000)

    DECLARE @batch_id nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @batch_id OUT, 'batch_id'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'locations'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'locations[i].id'
        EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'locations[i].name'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'results'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @device OUT, 'results[i].device'
        EXEC sp_OAMethod @jResp, 'IntOf', @location OUT, 'results[i].location'
        EXEC sp_OAMethod @jResp, 'StringOf', @public_id OUT, 'results[i].public_id'
        EXEC sp_OAMethod @jResp, 'StringOf', @result_id OUT, 'results[i].result_id'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'triggered_check_ids'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'triggered_check_ids[i]'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -X POST
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "tests": [
    {
      "public_id": "aaa-aaa-aaa",
      "allowInsecureCertificates": true,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "username": "my_username",
        "type": "web"
      },
      "body": "commo",
      "bodyType": "reprehenderit elit magna",
      "cookies": "elit magna in",
      "deviceIds": [
        "laptop_large",
        "laptop_large"
      ],
      "followRedirects": true,
      "headers": {
        "ametaeb": "veniam culpa Excepteur amet",
        "esta": "exercitation eu nulla irure"
      },
      "locations": [
        "aws:eu-west-3"
      ],
      "metadata": {
        "ci": {
          "pipeline": {
            "url": "velit veniam quis"
          },
          "provider": {
            "name": "amet"
          }
        },
        "git": {
          "branch": "cillum nostrud",
          "commitSha": "esse anim mollit labore"
        }
      },
      "retry": {
        "count": 44207270,
        "interval": 51741128.422602236
      },
      "startUrl": "sed pariatur reprehenderit",
      "variables": {
        "eu_4": "voluptate Duis Excepteur",
        "reprehenderit385": "mollit i"
      }
    },
    {
      "public_id": "aaa-aaa-aaa",
      "allowInsecureCertificates": true,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "username": "my_username",
        "type": "web"
      },
      "body": "officia consectetur",
      "bodyType": "in consequat",
      "cookies": "exercitation non proident",
      "deviceIds": [
        "laptop_large",
        "laptop_large"
      ],
      "followRedirects": false,
      "headers": {
        "commodo__": "occaecat cupidatat elit",
        "utb78": "consequat",
        "est_cc": "ullamco Ut officia voluptate veniam"
      },
      "locations": [
        "aws:eu-west-3"
      ],
      "metadata": {
        "ci": {
          "pipeline": {
            "url": "dolor officia fugiat tempor"
          },
          "provider": {
            "name": "occaecat nisi i"
          }
        },
        "git": {
          "branch": "anim sint",
          "commitSha": "ut sunt in"
        }
      },
      "retry": {
        "count": -91157506,
        "interval": 92707099.30434671
      },
      "startUrl": "nostrud elit ali",
      "variables": {
        "id0_c": "ut officia ea",
        "sunt2b": "voluptate commodo velit elit eu",
        "laborum_ff": "quis laboris nisi ut",
        "id_ba7": "dolore veniam",
        "non59": "officia culpa Lorem nisi proident"
      }
    }
  ]
}'
https://api.app.ddog-gov.com/api/v1/synthetics/tests/trigger/ci

Postman Collection Item JSON

{
  "name": "Trigger tests from CI/CD pipelines",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"tests\": [\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"commo\",\n      \"bodyType\": \"reprehenderit elit magna\",\n      \"cookies\": \"elit magna in\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": true,\n      \"headers\": {\n        \"ametaeb\": \"veniam culpa Excepteur amet\",\n        \"esta\": \"exercitation eu nulla irure\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"velit veniam quis\"\n          },\n          \"provider\": {\n            \"name\": \"amet\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"cillum nostrud\",\n          \"commitSha\": \"esse anim mollit labore\"\n        }\n      },\n      \"retry\": {\n        \"count\": 44207270,\n        \"interval\": 51741128.422602236\n      },\n      \"startUrl\": \"sed pariatur reprehenderit\",\n      \"variables\": {\n        \"eu_4\": \"voluptate Duis Excepteur\",\n        \"reprehenderit385\": \"mollit i\"\n      }\n    },\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"officia consectetur\",\n      \"bodyType\": \"in consequat\",\n      \"cookies\": \"exercitation non proident\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": false,\n      \"headers\": {\n        \"commodo__\": \"occaecat cupidatat elit\",\n        \"utb78\": \"consequat\",\n        \"est_cc\": \"ullamco Ut officia voluptate veniam\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"dolor officia fugiat tempor\"\n          },\n          \"provider\": {\n            \"name\": \"occaecat nisi i\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"anim sint\",\n          \"commitSha\": \"ut sunt in\"\n        }\n      },\n      \"retry\": {\n        \"count\": -91157506,\n        \"interval\": 92707099.30434671\n      },\n      \"startUrl\": \"nostrud elit ali\",\n      \"variables\": {\n        \"id0_c\": \"ut officia ea\",\n        \"sunt2b\": \"voluptate commodo velit elit eu\",\n        \"laborum_ff\": \"quis laboris nisi ut\",\n        \"id_ba7\": \"dolore veniam\",\n        \"non59\": \"officia culpa Lorem nisi proident\"\n      }\n    }\n  ]\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v1/synthetics/tests/trigger/ci",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "synthetics",
        "tests",
        "trigger",
        "ci"
      ]
    },
    "description": "Trigger a set of Synthetic tests for continuous integration."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"tests\": [\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"commo\",\n      \"bodyType\": \"reprehenderit elit magna\",\n      \"cookies\": \"elit magna in\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": true,\n      \"headers\": {\n        \"ametaeb\": \"veniam culpa Excepteur amet\",\n        \"esta\": \"exercitation eu nulla irure\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"velit veniam quis\"\n          },\n          \"provider\": {\n            \"name\": \"amet\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"cillum nostrud\",\n          \"commitSha\": \"esse anim mollit labore\"\n        }\n      },\n      \"retry\": {\n        \"count\": 44207270,\n        \"interval\": 51741128.422602236\n      },\n      \"startUrl\": \"sed pariatur reprehenderit\",\n      \"variables\": {\n        \"eu_4\": \"voluptate Duis Excepteur\",\n        \"reprehenderit385\": \"mollit i\"\n      }\n    },\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"officia consectetur\",\n      \"bodyType\": \"in consequat\",\n      \"cookies\": \"exercitation non proident\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": false,\n      \"headers\": {\n        \"commodo__\": \"occaecat cupidatat elit\",\n        \"utb78\": \"consequat\",\n        \"est_cc\": \"ullamco Ut officia voluptate veniam\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"dolor officia fugiat tempor\"\n          },\n          \"provider\": {\n            \"name\": \"occaecat nisi i\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"anim sint\",\n          \"commitSha\": \"ut sunt in\"\n        }\n      },\n      \"retry\": {\n        \"count\": -91157506,\n        \"interval\": 92707099.30434671\n      },\n      \"startUrl\": \"nostrud elit ali\",\n      \"variables\": {\n        \"id0_c\": \"ut officia ea\",\n        \"sunt2b\": \"voluptate commodo velit elit eu\",\n        \"laborum_ff\": \"quis laboris nisi ut\",\n        \"id_ba7\": \"dolore veniam\",\n        \"non59\": \"officia culpa Lorem nisi proident\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/synthetics/tests/trigger/ci",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "synthetics",
            "tests",
            "trigger",
            "ci"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"batch_id\": \"anim quis\",\n  \"locations\": [\n    {\n      \"id\": -79104764,\n      \"name\": \"laborum\"\n    },\n    {\n      \"id\": -12473023,\n      \"name\": \"ullamco eu\"\n    }\n  ],\n  \"results\": [\n    {\n      \"device\": \"laptop_large\",\n      \"location\": -53475818,\n      \"public_id\": \"Excepteur et\",\n      \"result_id\": \"in\"\n    },\n    {\n      \"device\": \"laptop_large\",\n      \"location\": 59458053,\n      \"public_id\": \"ut labore\",\n      \"result_id\": \"quis tempor cillum est eu\"\n    }\n  ],\n  \"triggered_check_ids\": [\n    \"in irure culpa\",\n    \"sit ad do Ut esse\"\n  ]\n}"
    },
    {
      "name": "JSON format is wrong",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"tests\": [\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"commo\",\n      \"bodyType\": \"reprehenderit elit magna\",\n      \"cookies\": \"elit magna in\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": true,\n      \"headers\": {\n        \"ametaeb\": \"veniam culpa Excepteur amet\",\n        \"esta\": \"exercitation eu nulla irure\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"velit veniam quis\"\n          },\n          \"provider\": {\n            \"name\": \"amet\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"cillum nostrud\",\n          \"commitSha\": \"esse anim mollit labore\"\n        }\n      },\n      \"retry\": {\n        \"count\": 44207270,\n        \"interval\": 51741128.422602236\n      },\n      \"startUrl\": \"sed pariatur reprehenderit\",\n      \"variables\": {\n        \"eu_4\": \"voluptate Duis Excepteur\",\n        \"reprehenderit385\": \"mollit i\"\n      }\n    },\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"officia consectetur\",\n      \"bodyType\": \"in consequat\",\n      \"cookies\": \"exercitation non proident\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": false,\n      \"headers\": {\n        \"commodo__\": \"occaecat cupidatat elit\",\n        \"utb78\": \"consequat\",\n        \"est_cc\": \"ullamco Ut officia voluptate veniam\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"dolor officia fugiat tempor\"\n          },\n          \"provider\": {\n            \"name\": \"occaecat nisi i\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"anim sint\",\n          \"commitSha\": \"ut sunt in\"\n        }\n      },\n      \"retry\": {\n        \"count\": -91157506,\n        \"interval\": 92707099.30434671\n      },\n      \"startUrl\": \"nostrud elit ali\",\n      \"variables\": {\n        \"id0_c\": \"ut officia ea\",\n        \"sunt2b\": \"voluptate commodo velit elit eu\",\n        \"laborum_ff\": \"quis laboris nisi ut\",\n        \"id_ba7\": \"dolore veniam\",\n        \"non59\": \"officia culpa Lorem nisi proident\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/synthetics/tests/trigger/ci",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "synthetics",
            "tests",
            "trigger",
            "ci"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"tests\": [\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"commo\",\n      \"bodyType\": \"reprehenderit elit magna\",\n      \"cookies\": \"elit magna in\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": true,\n      \"headers\": {\n        \"ametaeb\": \"veniam culpa Excepteur amet\",\n        \"esta\": \"exercitation eu nulla irure\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"velit veniam quis\"\n          },\n          \"provider\": {\n            \"name\": \"amet\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"cillum nostrud\",\n          \"commitSha\": \"esse anim mollit labore\"\n        }\n      },\n      \"retry\": {\n        \"count\": 44207270,\n        \"interval\": 51741128.422602236\n      },\n      \"startUrl\": \"sed pariatur reprehenderit\",\n      \"variables\": {\n        \"eu_4\": \"voluptate Duis Excepteur\",\n        \"reprehenderit385\": \"mollit i\"\n      }\n    },\n    {\n      \"public_id\": \"aaa-aaa-aaa\",\n      \"allowInsecureCertificates\": true,\n      \"basicAuth\": {\n        \"password\": \"PaSSw0RD!\",\n        \"username\": \"my_username\",\n        \"type\": \"web\"\n      },\n      \"body\": \"officia consectetur\",\n      \"bodyType\": \"in consequat\",\n      \"cookies\": \"exercitation non proident\",\n      \"deviceIds\": [\n        \"laptop_large\",\n        \"laptop_large\"\n      ],\n      \"followRedirects\": false,\n      \"headers\": {\n        \"commodo__\": \"occaecat cupidatat elit\",\n        \"utb78\": \"consequat\",\n        \"est_cc\": \"ullamco Ut officia voluptate veniam\"\n      },\n      \"locations\": [\n        \"aws:eu-west-3\"\n      ],\n      \"metadata\": {\n        \"ci\": {\n          \"pipeline\": {\n            \"url\": \"dolor officia fugiat tempor\"\n          },\n          \"provider\": {\n            \"name\": \"occaecat nisi i\"\n          }\n        },\n        \"git\": {\n          \"branch\": \"anim sint\",\n          \"commitSha\": \"ut sunt in\"\n        }\n      },\n      \"retry\": {\n        \"count\": -91157506,\n        \"interval\": 92707099.30434671\n      },\n      \"startUrl\": \"nostrud elit ali\",\n      \"variables\": {\n        \"id0_c\": \"ut officia ea\",\n        \"sunt2b\": \"voluptate commodo velit elit eu\",\n        \"laborum_ff\": \"quis laboris nisi ut\",\n        \"id_ba7\": \"dolore veniam\",\n        \"non59\": \"officia culpa Lorem nisi proident\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/synthetics/tests/trigger/ci",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "synthetics",
            "tests",
            "trigger",
            "ci"
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    }
  ]
}