{ "info": { "_postman_id": "7156d285-2685-4baa-b622-60d5395b8f6d", "name": "Pipeline API", "description": "Collection for K8S Cluster CRUD operations through the Banzai Cloud Pipeline API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Clusters", "item": [ { "name": "PKE", "item": [ { "name": "Get bootstrap token", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Valid id\"] = dataJSON.id == environment.clusterId;", "", " postman.setNextRequest(\"Cluster Status\");", "}", "else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/bootstrap", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "bootstrap" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] }, { "name": "Get PKE bootstrap command", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Valid id\"] = dataJSON.id == environment.clusterId;", "", " postman.setNextRequest(\"Cluster Status\");", "}", "else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/bootstrap", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "bootstrap" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] }, { "name": "Cluster Node Ready", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Valid id\"] = dataJSON.id == environment.clusterId;", "", " postman.setNextRequest(\"Cluster Status\");", "}", "else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"config\": \"{{K8Sconfig}}\",\n\t\"name\": \"master\"\t\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/pke/ready", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "pke", "ready" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] }, { "name": "Query Cluster Ready", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " tests[\"Master ready: \" + dataJSON.master.ready] = true;", "", " postman.setNextRequest(\"Cluster Status\");", "}", "else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/pke/ready", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "pke", "ready" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] } ] }, { "name": "Integrated Services", "item": [ { "name": "Integrated service list", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/services", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "services" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization ID" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster ID" } ] } }, "response": [] }, { "name": "Integrated service details", "request": { "method": "GET", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/services/:serviceName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "services", ":serviceName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization ID" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster ID" }, { "key": "serviceName", "value": "", "description": "Service Name" } ] } }, "response": [] }, { "name": "Activate integrated service", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"spec\": {\n \n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/services/:serviceName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "services", ":serviceName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization ID" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster ID" }, { "key": "serviceName", "value": "", "description": "Service Name" } ] } }, "response": [] }, { "name": "Update integrated service", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"spec\": {\n \n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/services/:serviceName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "services", ":serviceName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization ID" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster ID" }, { "key": "serviceName", "value": "", "description": "Service Name" } ] } }, "response": [] }, { "name": "Deactivate integrated service", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/services/:serviceName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "services", ":serviceName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization ID" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster ID" }, { "key": "serviceName", "value": "", "description": "Service Name" } ] } }, "response": [] } ] }, { "name": "Kubernetes", "item": [ { "name": "Namespaces", "item": [ { "name": "Delete namespace", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/namespaces/:namespace", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "namespaces", ":namespace" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "namespace", "value": "{{namespace}}" } ] } }, "response": [] } ] } ] }, { "name": "Distributions", "item": [ { "name": "Amazon EKS", "item": [ { "name": "Create cluster", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Response Time\"] = pm.expect(pm.response.responseTime).to.be.below(80500)", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"ekscluster-{{username}}-{{$randomInt}}\",\n \"location\": \"us-west-2\",\n \"cloud\": \"amazon\",\n \"secretId\": \"{{secretIdAmazon}}\",\n \"properties\": {\n \"eks\": {\n \"version\": \"1.11\",\n \"encryptionConfig\": [\n {\n \"provider\": {\n \"keyARN\": \"{{eksCustomerMasterKeyARN}}\"\n },\n \"resources\": [\n \"secrets\"\n ]\n }\n ],\n \"nodePools\": {\n \"pool1\": {\n \"instanceType\": \"t2.medium\",\n \"spotPrice\": \"0.2\",\n \"autoscaling\": false,\n \"minCount\": 1,\n \"maxCount\": 1,\n \"count\": 1,\n \"image\": \"{{eksNodeImage}}\",\n \"labels\": {\n \"custom\": \"value\"\n }\n }\n },\n \"tags\": {\n \"customTag1\": \"customValue1\",\n \"customTag2\": \"customValue2\"\n }\n }\n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Creates a Kubernetes cluster on AWS" }, "response": [] }, { "name": "Update cluster", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"cloud\": \"amazon\",\n\t\"properties\": {\n\t\t\"eks\": {\n\t\t\t\"nodePools\": {\n\t\t\t\t\"pool1\": {\n \t\t\"autoscaling\": true, \n\t \"minCount\": 1,\n\t \"maxCount\": 3,\n\t \"labels\": {\n \t\t\"custom\": \"value1\"\n \t}\n \t},\n \t\"newpool1\": {\n \t\t\"autoscaling\": true, \n \t\t\"instanceType\": \"m4.xlarge\",\n\t \t\"spotPrice\": \"0.2\",\n\t \"minCount\": 1,\n\t \"maxCount\": 2,\n\t \"image\": \"{{eksNodeImage}}\",\n\t \"labels\": {\n \t\t\"custom\": \"value2\"\n \t}\n \t}\n\t\t\t}\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Updates a Kubernetes cluster on AWS" }, "response": [] }, { "name": "Create node pool", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"pool{{$randomInt}}\",\n \"size\": 3,\n \"instanceType\": \"t2.medium\",\n \"labels\": {\n \t \"key\": \"value\"\n },\n \"autoscaling\": {\n \t \"enabled\": true,\n \t \"minSize\": 3,\n \t \"maxSize\": 5\n },\n \"image\": \"\",\n \"spotPrice\": \"\",\n \"subnetId\": \"\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/nodepools", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "nodepools" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" } ] } }, "response": [] }, { "name": "List node pools", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Pool Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/nodepools", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "nodepools" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "List the cluster's node pools" }, "response": [] }, { "name": "Update node pool", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"image\": \"\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/nodepools/:nodePoolName/update", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "nodepools", ":nodePoolName", "update" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" }, { "key": "nodePoolName", "value": "{{nodePoolName}}" } ] } }, "response": [] }, { "name": "Delete node pool", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/nodepools/:nodePoolName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "nodepools", ":nodePoolName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" }, { "key": "nodePoolName", "value": "{{nodePoolName}}" } ] } }, "response": [] } ] }, { "name": "Amazon PKE", "item": [ { "name": "Create cluster", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"bnz-ec2cluster-{{username}}-{{$randomInt}}\",\n\t\"location\": \"eu-central-1\",\n\t\"cloud\": \"amazon\",\n\t\"distribution\": \"pke\",\n\t\"secretId\": \"{{secretIdAmazon}}\",\n\t\"properties\": {\n\t\t\"pke\": {\n\t\t\t\"dexEnabled\": false,\n\t\t\t\"network\": {\n\t\t\t\t\"apiServerAddress\": \"10.240.0.204\",\n\t\t\t\t\"serviceCIDR\": \"10.32.0.0/24\",\n\t\t\t\t\"podCIDR\": \"10.200.0.0/16\",\n\t\t\t\t\"provider\": \"weave\"\n\t\t\t},\n\t\t\t\"nodepools\": [{\n\t\t\t\t\t\"name\": \"distrMaster\",\n\t\t\t\t\t\"roles\": [\n\t\t\t\t\t\t\"master\",\n\t\t\t\t\t\t\"pipeline-system\"\n\t\t\t\t\t],\n\t\t\t\t\t\"provider\": \"amazon\",\n\t\t\t\t\t\"providerConfig\": {\n\t\t\t\t\t\t\"autoScalingGroup\": {\n\t\t\t\t\t\t\t\"name\": \"distrMaster\",\n\t\t\t\t\t\t\t\"image\": \"ami-dd3c0f36\",\n\t\t\t\t\t\t\t\"zones\": [\n\t\t\t\t\t\t\t\t\"eu-central-1a\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"instanceType\": \"c4.large\",\n\t\t\t\t\t\t\t\"launchConfigurationName\": \"distrMaster\",\n\t\t\t\t\t\t\t\"launchTemplate\": null,\n\t\t\t\t\t\t\t\"vpcID\": \"vpc-0deb755857f5ef79d\",\n\t\t\t\t\t\t\t\"securityGroupID\": \"sg-0b3ddd7bef209c1d0\",\n\t\t\t\t\t\t\t\"subnets\": [\n\t\t\t\t\t\t\t\t\"subnet-0d16a21e9655486af\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"tags\": {\n\t\t\t\t\t\t\t\t\"kubernetes.io/cluster/distrTest\": \"distrTest\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"spotPrice\": \"0.2\",\n\t\t\t\t\t\t\t\"size\": {\n\t\t\t\t\t\t\t\t\"min\": 1,\n\t\t\t\t\t\t\t\t\"max\": 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"hosts\": [{\n\t\t\t\t\t\t\"name\": \"ip-10-240-0-204.eu-central-1.compute.internal\",\n\t\t\t\t\t\t\"privateIP\": \"10.240.0.204\",\n\t\t\t\t\t\t\"roles\": [\n\t\t\t\t\t\t\t\"master\",\n\t\t\t\t\t\t\t\"pipeline-system\"\n\t\t\t\t\t\t]\n\t\t\t\t\t}]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"workernodes\",\n\t\t\t\t\t\"roles\": [\n\t\t\t\t\t\t\"worker\"\n\t\t\t\t\t],\n\t\t\t\t\t\"provider\": \"amazon\",\n\t\t\t\t\t\"providerConfig\": {\n\t\t\t\t\t\t\"autoScalingGroup\": {\n\t\t\t\t\t\t\t\"name\": \"distrWorkers\",\n\t\t\t\t\t\t\t\"image\": \"ami-dd3c0f36\",\n\t\t\t\t\t\t\t\"zones\": [\n\t\t\t\t\t\t\t\t\"eu-central-1a\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"instanceType\": \"c4.large\",\n\t\t\t\t\t\t\t\"launchConfigurationName\": \"distrMaster\",\n\t\t\t\t\t\t\t\"launchTemplate\": null,\n\t\t\t\t\t\t\t\"vpcID\": \"vpc-0deb755857f5ef79d\",\n\t\t\t\t\t\t\t\"securityGroupID\": \"sg-07b695d0c4c478d88\",\n\t\t\t\t\t\t\t\"subnets\": [\n\t\t\t\t\t\t\t\t\"subnet-09a3a5a3f02583f3a\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"tags\": {\n\t\t\t\t\t\t\t\t\"kubernetes.io/cluster/distrTest\": \"distrTest\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"size\": {\n\t\t\t\t\t\t\t\t\"min\": 1,\n\t\t\t\t\t\t\t\t\"max\": 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"hosts\": [{\n\t\t\t\t\t\t\"name\": \"ip-10-240-10-207.eu-central-1.compute.internal\",\n\t\t\t\t\t\t\"privateIP\": \"10.240.10.207\",\n\t\t\t\t\t\t\"roles\": [\n\t\t\t\t\t\t\t\"worker\"\n\t\t\t\t\t\t]\n\t\t\t\t\t}]\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"kubernetes\": {\n\t\t\t\t\"version\": \"v1.12.2\",\n\t\t\t\t\"rbac\": {\n\t\t\t\t\t\"enabled\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"cri\": {\n\t\t\t\t\"runtime\": \"containerd\"\n\t\t\t}\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Creates a Kubernetes cluster on AWS" }, "response": [] }, { "name": "Update cluster", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"cloud\": \"amazon\",\n\t\"properties\": {\n\t\t\"pke\": {\n\t\t\t\"nodePools\": {\n\t\t\t\t\"pool1\": {\n\t\t\t\t\t\"minCount\": 1,\n\t\t\t\t\t\"maxCount\": 1,\n\t\t\t\t\t\"count\": 1\n\t\t\t\t\t\n\t\t\t\t},\n\t\t\t\t\"newworkerpool2\": {\n\t\t\t\t\t\"instanceType\": \"c4.xlarge\",\n\t\t\t\t\t\"spotPrice\": \"0.2\",\n\t\t\t\t\t\"autoscaling\": true,\n\t\t\t\t\t\"minCount\": 1,\n\t\t\t\t\t\"maxCount\": 2,\n\t\t\t\t\t\"count\": 1\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Updates a Kubernetes cluster on AWS" }, "response": [] } ] }, { "name": "Azure AKS", "item": [ { "name": "Create cluster", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"azcluster{{username}}{{$randomInt}}\",\n \"location\": \"westeurope\",\n \"cloud\": \"azure\",\n \"secretId\": \"{{secretIdAzure}}\",\n \"properties\": {\n \"aks\": {\n \t\"resourceGroup\": \"{{azResourceGroup}}\",\n \t\"kubernetesVersion\": \"1.11.3\",\n \"nodePools\": {\n \t\"pool1\": {\n \t\t\"autoscaling\": false, \n\t \"minCount\": 1,\n\t \"maxCount\": 2,\n \t\t\"count\": 1,\n \t\"instanceType\": \"Standard_B2ms\"\n \t},\n \t\"pool2\": {\n \t \"autoscaling\": false, \n\t \"minCount\": 1,\n\t \"maxCount\": 2,\n \t\t\"count\": 1,\n \t\"instanceType\": \"Standard_B2ms\"\n \t}\n \t}\n }\n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Creates a Kubernetes cluster on Azure" }, "response": [] }, { "name": "Update cluster", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"cloud\": \"azure\",\n\t\"properties\": {\n\t\t\"aks\": {\n\t\t\t\"nodePools\": {\n\t\t\t\t\"pool1\": {\n\t\t\t\t\t\"count\": 2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Updates a Kubernetes cluster on Azure" }, "response": [] } ] }, { "name": "Azure PKE", "item": [ { "name": "Create cluster", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"bnz-azure-pke-{{$randomInt}}\",\n\t\"location\": \"eu-central-1\",\n\t\"type\": \"pke-on-azure\",\n\t\"secretId\": \"{{secretIdAzure}}\",\n\t\"resourceGroup\": \"testRs\",\n\t\"nodepools\": [\n\t\t{\n\t\t\t\"name\": \"distrMaster\",\n\t\t\t\"roles\": [\n\t\t\t\t\"master\",\n\t\t\t\t\"pipeline-system\"\n\t\t\t],\n\t\t\t\"subnet\": {\n\t\t\t\t\"name\": \"subnetA\",\n\t\t\t\t\"cidr\": \"10.10.10.0/24\"\n\t\t\t},\n\t\t\t\"zones\": [\"1\", \"2\", \"3\"],\n\t\t\t\"instanceType\": \"Standard_B2s\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"distrWorker\",\n\t\t\t\"roles\": [\n\t\t\t\t\"worker\"\n\t\t\t\t],\n\t\t\t\"subnet\": {\n\t\t\t\t\"name\": \"subnetB\",\n\t\t\t\t\"cidr\": \"10.10.20.0/24\"\n\t\t\t},\n\t\t\t\"zones\": [\"1\", \"2\", \"3\"],\n\t\t\t\"instanceType\": \"Standard_B2s\"\n\t\t}],\n\t\"kubernetes\": {\n\t\t\"version\": \"v1.12.2\",\n\t\t\"rbac\": true,\n\t\t\"network\": {\n\t\t\t\"serviceCIDR\": \"10.32.0.0/24\",\n\t\t\t\"podCIDR\": \"10.200.0.0/16\",\n\t\t\t\"provider\": \"weave\"\n\t\t},\n\t\t\"cri\": {\n\t\t\t\"runtime\": \"containerd\"\n\t\t}\n\t},\n\t\"network\": {\n\t\t\"name\": \"vnet\",\n\t\t\"cidr\": \"10.0.0.0/16\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Creates a Kubernetes cluster on Azure" }, "response": [] } ] }, { "name": "Google GKE", "item": [ { "name": "Create cluster", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"gkecluster-{{username}}-{{$randomInt}}\",\n \"location\": \"us-central1-a\",\n \"cloud\": \"google\",\n \"secretId\": \"{{secretIdGoogle}}\",\n \"properties\": {\n \"gke\": {\n \"master\":{\n \"version\":\"1.10\"\n },\n \"nodeVersion\":\"1.10\",\n \"nodePools\": {\n \"pool1\": {\n \"autoscaling\": false, \n\t \"minCount\": 1,\n\t \"maxCount\": 2,\n \"count\": 1,\n \"instanceType\": \"n1-standard-2\",\n \t\"labels\": {\n \t\t\"custom\": \"value\"\n \t}\n }\n }\n }\n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Creates a Kubernetes cluster on Google" }, "response": [] }, { "name": "Update cluster", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"cloud\": \"google\",\n \"properties\": {\n \"gke\": {\n \"master\": {\n \"version\": \"1.10\"\n },\n \"nodeVersion\":\"1.10\",\n \"nodePools\": {\n \"pool1\": {\n \"autoscaling\": false, \n\t \"minCount\": 1,\n\t \"maxCount\": 2,\n \"count\" : 2,\n \"instanceType\": \"n1-standard-2\"\n }\n }\n }\n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Updates a Kubernetes cluster on Google" }, "response": [] } ] }, { "name": "vSphere PKE", "item": [ { "name": "Create cluster", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Response Time\"] = pm.expect(pm.response.responseTime).to.be.below(80500)", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"kubernetes\": {\n \"cri\": {},\n \"network\": {},\n \"oidc\": {\n \t\"enabled\": false\n },\n \"version\": \"1.15.3\",\n \"rbac\": true\n },\n \"type\": \"pke-on-vsphere\",\n \"name\": \"vmware-{{username}}-{{$randomInt}}\",\n \"secretName\": \"vmware\",\n \"datastore\": \"DatastoreCluster\",\n \"resourcepool\": \"resource-pool\",\n \"folder\": \"folderName\",\n \"nodepools\": [\n {\n \"name\": \"master\",\n \"roles\": [\n \"master\"\n ],\n \"size\": 1,\n \"vcpu\": 2,\n \"ram\": 1024,\n \"template\": \"centos-7-pke-202001171452\"\n },\n {\n \"name\": \"pool1\",\n \"template\": \"centos-7-pke-202001171452\",\n \"roles\": [\n \"worker\"\n ],\n \"labels\": {\n \"userLabel1\":\"userValue1\"\n },\n \"size\": 1,\n \"vcpu\": 2,\n \"ram\": 1024\n },\n {\n \"name\": \"pool2\",\n \"template\": \"centos-7-pke-202001171452\",\n \"roles\": [\n \"worker\"\n ],\n \"labels\": {\n \"userLabel2\":\"userValue2\"\n },\n \"size\": 1,\n \"vcpu\": 2,\n \"ram\": 1024\n } \n ]\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Creates a Kubernetes cluster on vSphere" }, "response": [] }, { "name": "Update cluster", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"nodepools\": [\n {\n \"name\": \"master\",\n \"size\": 1\n },\n {\n \"name\": \"pool1\",\n \"size\": 2,\n \"labels\": {\n \"userlabelx\":\"uservaluex\"\n }\n }\n ]\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] } }, "response": [] } ] } ] }, { "name": "Import an existing cluster", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " postman.setNextRequest(\"Cluster Status\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"kubernetes-{{username}}-{{$randomInt}}\",\n\t\"secretId\": \"{{secretIdKubernetes}}\",\n\t\"cloud\": \"kubernetes\",\n\t\"properties\": {\n\t\t\"kubernetes\": {\n\t\t\t\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Install secrets", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", " ", " console.log(dataJSON)", " tests[\"Valid status\"] = dataJSON.status == 201;", " tests[\"Valid message\"] = dataJSON.message == \"helm initialising\";", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", " ", "", "", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"namespace\": \"default\",\n \"query\": {\n \"tag\": \"\"\n }\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Initialize helm in the cluster" }, "response": [] }, { "name": "Install secret", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"sourceSecretName\": \"mypipeline-secret\",\n \"namespace\": \"default\",\n \"spec\": {}\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/secrets/:secretName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "secrets", ":secretName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "secretName", "value": "{{secretName}}", "description": "Secret name" } ] }, "description": "Install a particular secret in a cluster" }, "response": [] }, { "name": "Merge secret with an existing one", "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"sourceSecretName\": \"mypipeline-secret\",\n \"namespace\": \"default\",\n \"spec\": {}\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/secrets/:secretName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "secrets", ":secretName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "secretName", "value": "{{secretName}}", "description": "Secret name" } ] }, "description": "Install a particular secret in a cluster" }, "response": [] }, { "name": "Cluster Delete FakeID", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 404) {", " tests[\"Response Code 404\"] = responseCode.code == 404;", " var dataJSON = JSON.parse(responseBody);", " ", " console.log(dataJSON)", " tests[\"Valid Message\"] = dataJSON.message == \"Cluster not found\";", " tests[\"Valid Error\"] = dataJSON.error == \"record not found\";", " tests[\"Valid code\"] = dataJSON.code == \"404\";", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}", " ", "", "", "" ] } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/31231231241231231231321", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", "31231231241231231231321" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Delete a K8S cluster from the cloud, cleans up resources" }, "response": [] }, { "name": "Cluster Delete ", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 202) {", " tests[\"Response Code 202\"] = responseCode.code == 202;", " tests[\"Response Time\"] = pm.expect(pm.response.responseTime).to.be.below(155679)", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}", " " ] } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Delete a K8S cluster from the cloud, cleans up resources" }, "response": [] }, { "name": "Get cluster status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Valid id\"] = dataJSON.id == environment.clusterId;", "", " postman.setNextRequest(\"Cluster Status\");", "}", "else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] }, { "name": "Cluster secrets", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "}" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/secrets?releaseName={{releaseName}}", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "secrets" ], "query": [ { "key": "releaseName", "value": "{{releaseName}}" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "List cluster public endpoints" }, "response": [] }, { "name": "Fetch cluster pod details", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterId\", dataJSON.id);", " tests[\"Cluster ID: \" + dataJSON.id] = true;", "", " tests[\"Valid id\"] = dataJSON.id == environment.clusterId;", "", " postman.setNextRequest(\"Cluster Status\");", "}", "else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/pods", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "pods" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] }, { "name": "Get cluster nodes", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/nodes", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "nodes" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster details" }, "response": [] }, { "name": "Cluster List", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Get the cluster details" }, "response": [] }, { "name": "Cluster Config", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/config", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "config" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get the cluster configuration file" }, "response": [] }, { "name": "Cluster Public Endpoints", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "}" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/endpoints", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "endpoints" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "List cluster public endpoints" }, "response": [] }, { "name": "Re-run cluster posthooks", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"InstallLogging\": {\n \t\"bucketName\": \"\",\n \t\"region\": \"\",\n \t\"secretId\": \"\",\n \t\"resourceGroup\": \"\",\n \t\"storageAccount\": \"\",\n \t\"tls\": {\n \t\t\"tlsEnabled\": true,\n \"genTlsSecretName\": \"loggingSecret\",\n \"namespace\": \"default\",\n \"tlsHost\": \"fluent\"\n \t}\n }\t\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/posthooks", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "posthooks" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get the cluster configuration file" }, "response": [] }, { "name": "Cluster Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", " postman.setNextRequest(\"Cluster Info\");", "", "} else if (responseCode.code === 404 || responseCode.code === 503 ) {", " console.log(\"Waiting...\" );", " postman.setNextRequest(\"Delay Response 1\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "HEAD", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get cluster status" }, "response": [] } ] }, { "name": "Cluster Groups", "item": [ { "name": "Deployments", "item": [ { "name": "Create Deployment", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"multiClusterDeploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"stable/tomcat\",\n\t\"releaseName\":\"tomcat\",\n\t\"namespace\":\"test-namespace\",\n\t\"values\": {\n\t\t\"replicaCount\": 1,\n\t\t\"image\": {\n\t\t\t\"tag\": \"2.1\"\n\t\t}\n\t},\n\t\"valueOverrides\": {\n\t\t\"clusterName-3\": {\n\t\t\t\"replicaCount\": 2\t\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId/deployments", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId", "deployments" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" } ] } }, "response": [] }, { "name": "Update Deployment", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"stable/tomcat\",\n\t\"releaseName\":\"tomcat\",\n\t\"namespace\":\"test-namespace\",\n\t\"version\": \"0.2.0\",\n\t\"values\": {\n\t\t\"replicaCount\": 1,\n\t\t\"image\": {\n\t\t\t\"tag\": \"2.1\"\n\t\t}\n\t},\n\t\"valueOverrides\": {\n\t\t\"clusterName-3\": {\n\t\t\t\"replicaCount\": 2\t\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId/deployments/:multiClusterDeploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId", "deployments", ":multiClusterDeploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" }, { "key": "multiClusterDeploymentName", "value": "{{multiClusterDeploymentName}}", "description": "Deployment name" } ] } }, "response": [] }, { "name": "Get Deployment", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"stable/tomcat\",\n\t\"releaseName\":\"tomika\",\n\t\"namespace\":\"test-namespace\",\n\t\"values\": {\n\t\t\"replicaCount\": 1,\n\t\t\"image\": {\n\t\t\t\"tag\": \"2.1\"\n\t\t}\n\t},\n\t\"valueOverrides\": {\n\t\t\"sancyx3cmt\": {\n\t\t\t\"replicaCount\": 2\t\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId/deployments/:multiClusterDeploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId", "deployments", ":multiClusterDeploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" }, { "key": "multiClusterDeploymentName", "value": "{{multiClusterDeploymentName}}", "description": "Deployment name" } ] } }, "response": [] }, { "name": "Sync Deployment", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId/deployments/:multiClusterDeploymentName/sync", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId", "deployments", ":multiClusterDeploymentName", "sync" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" }, { "key": "multiClusterDeploymentName", "value": "{{multiClusterDeploymentName}}", "description": "Deployment name" } ] } }, "response": [] }, { "name": "Delete Deployment", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"stable/tomcat\",\n\t\"releaseName\":\"tomika\",\n\t\"namespace\":\"test-namespace\",\n\t\"values\": {\n\t\t\"replicaCount\": 1,\n\t\t\"image\": {\n\t\t\t\"tag\": \"2.1\"\n\t\t}\n\t},\n\t\"valueOverrides\": {\n\t\t\"sancyx3cmt\": {\n\t\t\t\"replicaCount\": 2\t\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId/deployments/:multiClusterDeploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId", "deployments", ":multiClusterDeploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" }, { "key": "multiClusterDeploymentName", "value": "{{multiClusterDeploymentName}}", "description": "Deployment name" } ] } }, "response": [] }, { "name": "List Deployments", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"stable/tomcat\",\n\t\"releaseName\":\"tomika\",\n\t\"namespace\":\"test-namespace\",\n\t\"values\": {\n\t\t\"replicaCount\": 1,\n\t\t\"image\": {\n\t\t\t\"tag\": \"2.1\"\n\t\t}\n\t},\n\t\"valueOverrides\": {\n\t\t\"sancyx3cmt\": {\n\t\t\t\"replicaCount\": 2\t\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId/deployments/", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId", "deployments", "" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" } ] } }, "response": [] } ] }, { "name": "Create Cluster Group", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"clusterGroupId\", dataJSON.id);", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"{{username}}-cluster-group-{{$randomInt}}\",\n \"members\": [\n \t100,\n \t101,\n \t102\n \t]\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update Cluster Group", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"{{username}}-cluster-group-{{$randomInt}}\",\n \"members\": [\n \t100,\n \t101,\n \t105\n \t]\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" } ] } }, "response": [] }, { "name": "Get Cluster Group", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" } ] } }, "response": [] }, { "name": "List Cluster Groups", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Delete Cluster Group", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clustergroups/:clusterGroupId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clustergroups", ":clusterGroupId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterGroupId", "value": "{{clusterGroupId}}", "description": "Cluster Group identifier" } ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Deployments", "item": [ { "name": "Deployment Create", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"banzaicloud-stable/pipeline\",\n\t\"values\": {\n\t\t\"ingress\": {\n\t\t\t\"enabled\": true\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Create a helm deployment" }, "response": [] }, { "name": "Deployment Create Fake APP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 404) {", " tests[\"Response Code 404\"] = responseCode.code == 404;", " var dataJSON = JSON.parse(responseBody);", " ", " console.log(dataJSON)", " tests[\"Valid Message\"] = /^Error loading chart: stat \\/opt\\/helm\\/.*.no such file or directory$/.test(dataJSON.message);", " tests[\"Valid code\"] = dataJSON.status == \"404\";", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}", " ", "", "", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\"name\": \"pokol_app\"}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Create a helm deployment" }, "response": [] }, { "name": "List Deployment", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "List helm deployment" }, "response": [] }, { "name": "Deployment Init Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "} else if (responseCode.code === 404 || responseCode.code === 503 ) {", " console.log(\"Waiting...\" );", " postman.setNextRequest(\"Delay Response 2\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "HEAD", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get deployment status" }, "response": [] } ] }, { "name": "Deployment", "item": [ { "name": "Deployment app Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "} else if (responseCode.code === 404 || responseCode.code === 503 ) {", " console.log(\"Waiting...\" );", " postman.setNextRequest(\"Delay Response 3\");", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", " ", "}", " ", "", "", "" ] } } ], "request": { "method": "HEAD", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/:deploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", ":deploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "deploymentName", "value": "{{deploymentName}}", "description": "Deployment name" } ] }, "description": "Get deployment app status" }, "response": [] }, { "name": "Deployment Upgrade", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 501) {", " tests[\"Response Code 501\"] = responseCode.code == 501;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}" ] } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/:deploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", ":deploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "deploymentName", "value": "{{deploymentName}}", "description": "Deployment name" } ] }, "description": "Upgrades an existing deployment" }, "response": [] }, { "name": "Deployment Delete ", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", " ", " var dataJSON = JSON.parse(responseBody);", " console.log(dataJSON)", " tests[\"Valid status\"] = dataJSON.status == 200;", " tests[\"Valid message\"] = dataJSON.message == \"Deployment deleted!\";", " tests[\"Valid name\"] = dataJSON.name == environment.deploymentName;", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}", " " ] } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/:deploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", ":deploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "deploymentName", "value": "{{deploymentName}}", "description": "Deployment name" } ] }, "description": "Delete Deployment\n" }, "response": [] }, { "name": "Deployment Delete FakeAPP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 400) {", " tests[\"Response Code 400\"] = responseCode.code == 400;", " ", " var dataJSON = JSON.parse(responseBody);", " console.log(dataJSON)", " tests[\"Valid code\"] = dataJSON.code == 400;", " tests[\"Valid message\"] = dataJSON.message == \"Error deleting deployment\";", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}" ] } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/pokollll-appp", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", "pokollll-appp" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Delete Deployment\n" }, "response": [] }, { "name": "Deployment Get", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", " " ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/:deploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", ":deploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "deploymentName", "value": "{{deploymentName}}", "description": "Deployment name" } ] }, "description": "Get Deployment details\n" }, "response": [] }, { "name": "Get Deployment Resources", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", " var dataJSON = JSON.parse(responseBody);", "", " pm.environment.set(\"deploymentName\", dataJSON.releaseName);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/:deploymentName/resources?resourceTypes=deployment", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", ":deploymentName", "resources" ], "query": [ { "key": "resourceTypes", "value": "deployment", "description": "Type of the resource" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "deploymentName", "value": "{{deploymentName}}", "description": "Name of the deployment" } ] }, "description": "Get Deployment Resources" }, "response": [] }, { "name": "Get Deployment Images", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/deployments/:deploymentName/images", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "deployments", ":deploymentName", "images" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" }, { "key": "deploymentName", "value": "{{deploymentName}}" } ] } }, "response": [] } ] }, { "name": "Secrets", "item": [ { "name": "Amazon", "item": [ { "name": "Add secret Amazon", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdAmazon\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-amazon-secret-{{$randomInt}}\",\n\t\"type\": \"amazon\",\n\t\"values\": {\n\t\t\"AWS_ACCESS_KEY_ID\": \"{{AwsAccessKeyId}}\",\n\t\t\"AWS_SECRET_ACCESS_KEY\": \"{{AwsSecretAccessKey}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret Amazon", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdAmazon\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-amazon-secret-{{$randomInt}}\",\n\t\"type\": \"amazon\",\n\t\"values\": {\n\t\t\"AWS_ACCESS_KEY_ID\": \"{{AwsAccessKeyId}}\",\n\t\t\"AWS_SECRET_ACCESS_KEY\": \"{{AwsSecretAccessKey}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAmazon", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAmazon" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAmazon", "value": "{{secretIdAmazon}}", "description": "Secret identifier to EC2 and EKS" } ] } }, "response": [] }, { "name": "Get secret Amazon", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAmazon", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAmazon" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAmazon", "value": "{{secretIdAmazon}}", "description": "Secret identifier to EC2 and EKS" } ] } }, "response": [] }, { "name": "Validate secret Amazon", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAmazon/validate", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAmazon", "validate" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAmazon", "value": "{{secretIdAmazon}}", "description": "Secret identifier to EC2 and EKS" } ] } }, "response": [] }, { "name": "Delete secret Amazon", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAmazon", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAmazon" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAmazon", "value": "{{secretIdAmazon}}", "description": "Secret identifier to EC2 and EKS" } ] } }, "response": [] } ] }, { "name": "Azure", "item": [ { "name": "Add secret Azure", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdAzure\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-azure-secret-{{$randomInt}}\",\n\t\"type\": \"azure\",\n\t\"values\": {\n\t\t\"AZURE_CLIENT_ID\": \"{{AzureClientId}}\",\n\t\t\"AZURE_CLIENT_SECRET\": \"{{AzureClientSecret}}\",\n\t\t\"AZURE_TENANT_ID\": \"{{AzureTenantId}}\",\n\t\t\"AZURE_SUBSCRIPTION_ID\": \"{{AzureSubscriptionId}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret Azure", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdAzure\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-azure-secret-{{$randomInt}}\",\n\t\"type\": \"azure\",\n\t\"values\": {\n\t\t\"AZURE_CLIENT_ID\": \"{{AzureClientId}}\",\n\t\t\"AZURE_CLIENT_SECRET\": \"{{AzureClientSecret}}\",\n\t\t\"AZURE_TENANT_ID\": \"{{AzureTenantId}}\",\n\t\t\"AZURE_SUBSCRIPTION_ID\": \"{{AzureSubscriptionId}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAzure", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAzure" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAzure", "value": "{{secretIdAzure}}", "description": "Secret identifier to AKS" } ] } }, "response": [] }, { "name": "Get secret Azure", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAzure", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAzure" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAzure", "value": "{{secretIdAzure}}", "description": "Secret identifier to AKS" } ] } }, "response": [] }, { "name": "Validate secret Azure", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAzure/validate", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAzure", "validate" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAzure", "value": "{{secretIdAzure}}", "description": "Secret identifier to AKS" } ] } }, "response": [] }, { "name": "Delete secret Azure", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdAzure", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdAzure" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdAzure", "value": "{{secretIdAzure}}", "description": "Secret identifier to AKS" } ] } }, "response": [] } ] }, { "name": "Google", "item": [ { "name": "Add secret Google", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdGoogle\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-google-secret-{{$randomInt}}\",\n\t\"type\": \"google\",\n\t\"values\": {\n\t\t\"type\": \"{{googleType}}\",\n\t\t\"project_id\": \"{{googleProjectId}}\",\n\t\t\"private_key_id\": \"{{googlePrivateKeyId}}\",\n\t\t\"private_key\": \"{{googlePrivateKey}}\",\n\t\t\"client_email\": \"{{googleClientEmail}}\",\n\t\t\"client_id\": \"{{googleClientId}}\",\n\t\t\"auth_uri\": \"{{googleAuthUri}}\",\n\t\t\"token_uri\": \"{{googleTokenUri}}\",\n\t\t\"auth_provider_x509_cert_url\": \"{{googleAuthProviderX509CertUrl}}\",\n\t\t\"client_x509_cert_url\": \"{{googleClientX509CertUrl}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret Google", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdGoogle\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-google-secret-{{$randomInt}}\",\n\t\"type\": \"google\",\n\t\"values\": {\n\t\t\"type\": \"{{googleType}}\",\n\t\t\"project_id\": \"{{googleProjectId}}\",\n\t\t\"private_key_id\": \"{{googlePrivateKeyId}}\",\n\t\t\"private_key\": \"{{googlePrivateKey}}\",\n\t\t\"client_email\": \"{{googleClientEmail}}\",\n\t\t\"client_id\": \"{{googleClientId}}\",\n\t\t\"auth_uri\": \"{{googleAuthUri}}\",\n\t\t\"token_uri\": \"{{googleTokenUri}}\",\n\t\t\"auth_provider_x509_cert_url\": \"{{googleAuthProviderX509CertUrl}}\",\n\t\t\"client_x509_cert_url\": \"{{googleClientX509CertUrl}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGoogle", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGoogle" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGoogle", "value": "{{secretIdGoogle}}", "description": "Secret identifier to GKE" } ] } }, "response": [] }, { "name": "Get secret Google", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGoogle", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGoogle" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGoogle", "value": "{{secretIdGoogle}}", "description": "Secret identifier to GKE" } ] } }, "response": [] }, { "name": "Validate secret Google", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGoogle/validate", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGoogle", "validate" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGoogle", "value": "{{secretIdGoogle}}", "description": "Secret identifier to GKE" } ] } }, "response": [] }, { "name": "Delete secret Google", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGoogle", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGoogle" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGoogle", "value": "{{secretIdGoogle}}", "description": "Secret identifier to GKE" } ] } }, "response": [] } ] }, { "name": "Kubernetes", "item": [ { "name": "Add secret Kubernetes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdKubernetes\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-kubernetes-secret-{{$randomInt}}\",\n\t\"type\": \"kubernetes\",\n\t\"values\": {\n\t\t\"K8Sconfig\": \"{{K8Sconfig}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret Password", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdKubernetes\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \t\"name\": \"my-tls-secret-{{$randomInt}}\",\n\t\"type\": \"tls\",\n\t\"values\": {\n\t\t\"hosts\": \"localhost\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdKubernetes", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdKubernetes" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdKubernetes", "value": "{{secretIdKubernetes}}", "description": "Secret identifier to Kubernetes" } ] } }, "response": [] }, { "name": "Get secret Kubernetes", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdKubernetes", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdKubernetes" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdKubernetes", "value": "" } ] } }, "response": [] }, { "name": "Delete secret Kubernetes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdKubernetes", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdKubernetes" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdKubernetes", "value": "{{secretIdKubernetes}}", "description": "Secret identifier to Kubernetes" } ] } }, "response": [] } ] }, { "name": "TLS", "item": [ { "name": "Add secret TLS", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdTLS\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-tls-secret-{{$randomInt}}\",\n\t\"type\": \"tls\",\n\t\"values\": {\n\t\t\"hosts\": \"localhost\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret TLS", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdTLS\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \t\"name\": \"my-tls-secret-{{$randomInt}}\",\n\t\"type\": \"tls\",\n\t\"values\": {\n\t\t\"hosts\": \"localhost\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdTLS", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdTLS" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdTLS", "value": "{{secretIdTLS}}", "description": "Secret identifier to TLS" } ] } }, "response": [] }, { "name": "Get secret TLS", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdTLS", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdTLS" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdTLS", "value": "{{secretIdTLS}}", "description": "Secret identifier to TLS" } ] } }, "response": [] }, { "name": "Delete secret TLS", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdTLS", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdTLS" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdTLS", "value": "{{secretIdTLS}}", "description": "Secret identifier to TLS" } ] } }, "response": [] } ] }, { "name": "Password", "item": [ { "name": "Add secret Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdPassword\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-password-secret-{{$randomInt}}\",\n\t\"type\": \"password\",\n\t\"values\": {\n\t\t\"username\": \"root\",\n\t\t\"password\": \"randAlpha,16\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret Password", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdPassword\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-password-secret-{{$randomInt}}\",\n\t\"type\": \"password\",\n\t\"values\": {\n\t\t\"username\": \"root\",\n\t\t\"password\": \"randAlpha,16\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdPassword", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdPassword" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdPassword", "value": "{{secretIdPassword}}", "description": "Secret identifier to Password" } ] } }, "response": [] }, { "name": "Get secret Password", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdPassword", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdPassword" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdPassword", "value": "{{secretIdPassword}}", "description": "Secret identifier to Password" } ] } }, "response": [] }, { "name": "Delete secret Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdPassword", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdPassword" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdPassword", "value": "{{secretIdPassword}}", "description": "Secret identifier to Password" } ] } }, "response": [] } ] }, { "name": "Generic", "item": [ { "name": "Add secret Generic", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdGeneric\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-generic-secret-which-is-Docker-in-this-example-{{$randomInt}}\",\n\t\"type\": \"generic\",\n\t\"values\": {\n\t\t\"DOCKER_USERNAME\": \"{{DockerUsername}}\",\n\t\t\"DOCKER_PASSWORD\": \"{{DockerPassword}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Update secret Generic", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdGeneric\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-generic-secret-which-is-Docker-in-this-example-{{$randomInt}}\",\n\t\"type\": \"generic\",\n\t\"values\": {\n\t\t\"DOCKER_USERNAME\": \"{{DockerUsername}}\",\n\t\t\"DOCKER_PASSWORD\": \"{{DockerPassword}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGeneric", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGeneric" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGeneric", "value": "{{secretIdGeneric}}", "description": "Secret identifier to Generic" } ] } }, "response": [] }, { "name": "Get secret Generic", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGeneric", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGeneric" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGeneric", "value": "{{secretIdGeneric}}", "description": "Secret identifier to Generic" } ] } }, "response": [] }, { "name": "Delete secret Generic", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdGeneric", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdGeneric" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdGeneric", "value": "{{secretIdGeneric}}", "description": "Secret identifier to Generic" } ] } }, "response": [] } ] }, { "name": "SSH", "item": [ { "name": "Add secret SSH", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdSSH\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-ssh-secret-{{$randomInt}}\",\n\t\"type\": \"ssh\",\n\t\"values\": {\n\t\t\"identifier\": \"\",\n\t\t\"private_key_data\": \"\",\n\t\t\"public_key_data\": \"\",\n\t\t\"public_key_fingerprint\": \"\",\n\t\t\"user\": \"\"\n\t}\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Get secret SSH", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdSSH", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdSSH" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdSSH", "value": "{{secretIdSSH}}", "description": "Secret identifier to SSH" } ] } }, "response": [] }, { "name": "Delete secret SSH", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdSSH", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdSSH" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdSSH", "value": "{{secretIdSSH}}", "description": "Secret identifier to SSH" } ] } }, "response": [] } ] }, { "name": "Vault", "item": [ { "name": "Add secret Vault", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdVault\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-vault-secret-{{$randomInt}}\",\n\t\"type\": \"vault\",\n\t\"values\": {\n\t\t\"token\": \"\"\n\t}\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Get secret Vault", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdVault", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdVault" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdVault", "value": "{{secretIdVault}}" } ] } }, "response": [] }, { "name": "Delete secret Vault", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdVault", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdVault" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdVault", "value": "{{secretIdVault}}" } ] } }, "response": [] } ] }, { "name": "Slack", "item": [ { "name": "Add secret Slack", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdSlack\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-slack-secret-{{$randomInt}}\",\n\t\"type\": \"slack\",\n\t\"values\": {\n\t\t\"apiUrl\": \"\"\n\t}\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Get secret Slack", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdSlack", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdSlack" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdSlack", "value": "{{secretIdSlack}}" } ] } }, "response": [] }, { "name": "Delete secret Slack", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdSlack", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdSlack" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdSlack", "value": "{{secretIdSlack}}" } ] } }, "response": [] } ] }, { "name": "PagerDuty", "item": [ { "name": "Add secret PagerDuty", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdPagerDuty\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-pagerduty-secret-{{$randomInt}}\",\n\t\"type\": \"pagerduty\",\n\t\"values\": {\n\t\t\"integrationKey\": \"\"\n\t}\n}\n" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Get secret PagerDuty", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdPagerDuty", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdPagerDuty" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdPagerDuty", "value": "{{secretIdPagerDuty}}" } ] } }, "response": [] }, { "name": "Delete secret PagerDuty", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets/:secretIdPagerDuty", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets", ":secretIdPagerDuty" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "secretIdPagerDuty", "value": "{{secretIdPagerDuty}}" } ] } }, "response": [] } ] }, { "name": "vSphere", "item": [ { "name": "Add secret vSphere", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"secretIdAmazon\", dataJSON.id);", " tests[\"Secret ID: \" + dataJSON.id] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-vsphere-secret-{{$randomInt}}\",\n\t\"type\": \"vsphere\",\n\t\"values\": {\n\t\t\"url\": \"{{VCenterURL}}\",\n\t\t\"user\": \"{{VCenterUserName}}\",\n\t\t\"password\": \"{{VCenterPassword}}\",\n\t\t\"fingerprint\": \"{{VCenterCertFingerprint}}\",\n\t\t\"datacenter\": \"{{VSphereDatacenter}}\",\n\t\t\"datastore\": \"{{VSphereDatastore}}\",\n\t\t\"resourcePool\": \"{{VSphereResourcePool}}\",\n\t\t\"folder\": \"{{VSphereFolder}}\",\n\t\t\"defaultNodeTemplate\": \"{{VSphereDefaultNodeTemplate}}\"\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] } ] }, { "name": "List secret", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "List secret with filters", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/secrets?type={{secretType}}&tags={{tag}}", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "secrets" ], "query": [ { "key": "type", "value": "{{secretType}}", "description": "Cloud type" }, { "key": "tags", "value": "{{tag}}", "description": "Secret's tag" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "List secret types", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/secret-types", "host": [ "{{url}}" ], "path": [ "api", "v1", "secret-types" ] } }, "response": [] } ] }, { "name": "Organization", "item": [ { "name": "List organizations", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs" ] } }, "response": [] }, { "name": "Get organization", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Synchronize organizations", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json", "disabled": true } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs" ] } }, "response": [] }, { "name": "Delete organization", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 204) {", " tests[\"Response Code 204\"] = responseCode.code == 204;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] } ] }, { "name": "Auth", "item": [ { "name": "Generate token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", " var dataJSON = JSON.parse(responseBody);", " ", " pm.environment.set(\"token\", dataJSON.token);", "", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", "}", " ", "", "", "" ] } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/tokens", "host": [ "{{url}}" ], "path": [ "api", "v1", "tokens" ] } }, "response": [] } ] }, { "name": "User", "item": [ { "name": "Get users", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/users", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "users" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Get user", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/users/:id", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "users", ":id" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "id", "value": "{{userId}}" } ] } }, "response": [] } ] }, { "name": "ObjectStore", "item": [ { "name": "CheckBucket", "request": { "method": "HEAD", "header": [ { "key": "secretId", "value": "{{secretIdGoogle}}", "description": "Secret identifier" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets/:bucketName/?cloudType={{cloudType}}", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets", ":bucketName", "" ], "query": [ { "key": "cloudType", "value": "{{cloudType}}", "description": "Bucket's cloud type" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "bucketName", "value": "{{bucketName}}", "description": "Bucket name" } ] } }, "response": [] }, { "name": "CreateBuckets Amazon", "request": { "method": "POST", "header": [ { "key": "secretId", "value": "{{secretIdAmazon}}", "description": "Secret identifier" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"secretId\": \"{{secretIdAmazon}}\",\n\t\"name\": \"\",\n\t\"properties\": {\n\t\t\"amazon\": {\n\t\t\t\"location\": \"\"\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "CreateBuckets Azure", "request": { "method": "POST", "header": [ { "key": "secretId", "value": "{{secretIdAzure}}", "description": "Secert identifier" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"secretId\": \"{{secretIdAzure}}\",\n\t\"name\": \"{{bucketName}}\",\n\t\"properties\": {\n\t\t\"azure\": {\n\t\t\t\"location\": \"{{azLocation}}\",\n\t\t\t\"storageAccount\": \"{{azStorageAccount}}\",\n\t\t\t\"resourceGroup\": \"{{azResourceGroup}}\"\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "CreateBuckets Google", "request": { "method": "POST", "header": [ { "key": "secretId", "value": "{{secretIdGoogle}}", "description": "Secret identifier" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"secretId\": \"{{secretIdGoogle}}\",\n\t\"name\": \"\",\n\t\"properties\": {\n\t\t\"google\": {\n\t\t\t\"location\": \"\"\n\t\t}\n\t}\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "ListBuckets Amazon", "request": { "method": "GET", "header": [ { "key": "secretId", "value": "{{secretIdAmazon}}", "description": "Secret identifier" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets?cloudType=amazon", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets" ], "query": [ { "key": "cloudType", "value": "amazon", "description": "Bucket's cloud: Amazon" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "ListBuckets Azure", "request": { "method": "GET", "header": [ { "key": "secretId", "value": "{{secretIdAzure}}", "description": "Secret identifier" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets?cloudType=azure", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets" ], "query": [ { "key": "cloudType", "value": "azure", "description": "Bucket's cloud: Azure" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "ListBuckets Google", "request": { "method": "GET", "header": [ { "key": "secretId", "value": "{{secretIdGoogle}}", "description": "Secret identifier" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets?cloudType=google", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets" ], "query": [ { "key": "cloudType", "value": "google", "description": "Bucket's cloud: Google" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "DeleteBucket Amazon", "request": { "method": "DELETE", "header": [ { "key": "secretId", "value": "{{secretIdAmazon}}", "description": "Secret identifier" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets/:bucketName?cloudType=amazon", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets", ":bucketName" ], "query": [ { "key": "cloudType", "value": "amazon", "description": "Bucket's cloud: Amazon" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "bucketName", "value": "{{bucketName}}", "description": "Bucket's name" } ] } }, "response": [] }, { "name": "DeleteContainer Azure", "request": { "method": "DELETE", "header": [ { "key": "secretId", "value": "{{secretIdAzure}}", "description": "Secret identifier" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets/:bucketName?cloudType=azure&storageAccount={{azStorageAccount}}&resourceGroup={{azResourceGroup}}", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets", ":bucketName" ], "query": [ { "key": "cloudType", "value": "azure", "description": "Bucket's cloud: Azure" }, { "key": "storageAccount", "value": "{{azStorageAccount}}", "description": "Storage account name" }, { "key": "resourceGroup", "value": "{{azResourceGroup}}", "description": "Resource group name" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "bucketName", "value": "{{bucketName}}", "description": "Bucket's name" } ] } }, "response": [] }, { "name": "DeleteBucket Google", "request": { "method": "DELETE", "header": [ { "key": "secretId", "value": "{{secretIdGoogle}}", "description": "Secret identifier" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets/:bucketName/?cloudType=google", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets", ":bucketName", "" ], "query": [ { "key": "cloudType", "value": "google", "description": "Bucket's cloud: Google" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "bucketName", "value": "{{bucketName}}", "description": "Bucket's name" } ] } }, "response": [] }, { "name": "GetBucket", "request": { "method": "GET", "header": [ { "key": "secretId", "value": "{{secretIdAmazon}}", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/buckets/:name?cloudType={{cloudType}}", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "buckets", ":name" ], "query": [ { "key": "cloudType", "value": "{{cloudType}}" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "name", "value": "{{bucketName}}" } ] } }, "response": [] } ] }, { "name": "Helm", "item": [ { "name": "Chart List", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/charts", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "charts" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Chart Details", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/chart/:repoName/:chartName?version={{chartVersion}}", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "chart", ":repoName", ":chartName" ], "query": [ { "key": "version", "value": "{{chartVersion}}", "description": "Chart version" } ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "repoName", "value": "{{repoName}}", "description": "Repository name" }, { "key": "chartName", "value": "{{chartName}}", "description": "Chart name" } ] } }, "response": [] }, { "name": "Cluster chart List", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/cluster-charts", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "cluster-charts" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Repository List", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/repos/", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "repos", "" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Repository Add", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"banzaicloud-stable\",\n\t\"url\": \"http://kubernetes-charts.banzaicloud.com\"\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/repos/", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "repos", "" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Repository Delete", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/repos/:repoName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "repos", ":repoName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "repoName", "value": "{{repoName}}", "description": "Repository name" } ] } }, "response": [] }, { "name": "Repository Modify", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"banzaicloud-stable\",\n\t\"cache\": \"statestore/colin014/helm/repository/cache/banzaicloud-stable-index.yaml\",\n\t\"url\": \"http://kubernetes-charts.banzaicloud.com\",\n\t\"username\": \"\",\n\t\"password\": \"\",\n\t\"certFile\": \"\",\n\t\"keyFile\": \"\",\n\t\"caFile\": \"\"\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/repos/:repoName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "repos", ":repoName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "repoName", "value": "{{repoName}}", "description": "Repository name" } ] } }, "response": [] }, { "name": "Repository Update", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/helm/repos/:repoName/update", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "helm", "repos", ":repoName", "update" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "repoName", "value": "{{repoName}}", "description": "Repository name" } ] } }, "response": [] } ] }, { "name": "Resource groups", "item": [ { "name": "List resource group", "request": { "method": "GET", "header": [ { "key": "secretId", "value": "{{secretIdAzure}}", "description": "Secret identifier" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/azure/resourcegroups", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "azure", "resourcegroups" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Create resource group", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 201) {", " tests[\"Response Code 201\"] = responseCode.code == 201;", "", " pm.environment.set(\"timestampHeader\", new Date());", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"newResourceGroupName\", dataJSON.name);", " tests[\"Resource group name: \" + dataJSON.name] = true;", "", " tests[\"Response Time\"] = pm.expect(pm.response.responseTime).to.be.below(80500)", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " console.warn(responseBody);", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"newResourceGroupName\",\n\t\"location\": \"westeurope\",\n\t\"secretId\": \"{{secretIdAzure}}\"\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/azure/resourcegroups", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "azure", "resourcegroups" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Delete resource group", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "secretId", "value": "{{secretIdAzure}}", "description": "Secret identifier" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"newResourceGroupName\",\n\t\"location\": \"westeurope\",\n\t\"secretId\": \"{{secretIdAzure}}\"\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/azure/resourcegroups/:newResourceGroupName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "azure", "resourcegroups", ":newResourceGroupName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "newResourceGroupName", "value": "{{newResourceGroupName}}", "description": "Resource group name to create" } ] } }, "response": [] } ] }, { "name": "Security", "item": [ { "name": "Get Scanlog", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/scanlog", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "scanlog" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get Scanlog" }, "response": [] }, { "name": "Get Deployment Scanlog", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/scanlog/:deploymentName", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "scanlog", ":deploymentName" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "deploymentName", "value": "{{deploymentName}}", "description": "Deployment name" } ] }, "description": "Get Scanlog" }, "response": [] }, { "name": "Get Whitelists", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/whitelists", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "whitelists" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get Whitelists" }, "response": [] }, { "name": "Create Whitelists", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"budos-bagoly3\",\t\n \"owner\": \"banzaicloud\",\n \"reason\": \"test release\"\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/whitelists", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "whitelists" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Create Whitelists" }, "response": [] }, { "name": "Delete Whitelists", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"budos-bagoly3\",\t\n \"releaseName\": \"flying-monkey\",\n \"owner\": \"banzaicloud\",\n \"reason\": \"test release\"\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/whitelists/test-whitelist", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "whitelists", "test-whitelist" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Delete Whitelists" }, "response": [] }, { "name": "Get Policies", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/policies", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "policies" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Get Policies" }, "response": [] }, { "name": "Create new Policy", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", " ", " var dataJSON = JSON.parse(responseBody);", " pm.environment.set(\"policyId\", dataJSON.policyId);", " tests[\"PolicyId ID: \" + dataJSON.policyId] = true;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"id\": \"97b33e2c-3b57-4a3f-a12b-a8c0daa472a0\",\n \"version\": \"1_0\",\n \"name\": \"AllowAll\",\n \"policies\": [\n {\n \"comment\": \"\",\n \"id\": \"b83f90b3-24b7-4c51-858e-035f85156f00\",\n \"name\": \"allow-all\",\n \"rules\": [\n {\n \"action\": \"WARN\",\n \"gate\": \"ANCHORESEC\",\n \"id\": \"eaef9298-9be9-4cc3-92d8-1b69968e175a\",\n \"params\": [],\n \"trigger\": \"VULNHIGH\"\n },\n {\n \"action\": \"WARN\",\n \"gate\": \"ANCHORESEC\",\n \"id\": \"f2d9e08e-b09c-4f8d-972c-de84223783f9\",\n \"params\": [],\n \"trigger\": \"VULNCRITICAL\"\n },\n {\n \"action\": \"WARN\",\n \"gate\": \"DOCKERFILECHECK\",\n \"id\": \"f47bf985-fbd5-4afa-bdcc-658ecc9e424e\",\n \"params\": [\n {\n \"name\": \"DENIEDPORTS\",\n \"value\": \"22\"\n }\n ],\n \"trigger\": \"EXPOSE\"\n }\n ],\n \"version\": \"1_0\"\n }\n ],\n \"whitelists\": [],\n \"mappings\": [\n {\n \"id\": \"df21279e-57f3-4ca2-a57a-ae23cb071d6b\",\n \"image\": {\n \"type\": \"tag\",\n \"value\": \"*\"\n },\n \"name\": \"allow-all\",\n \"policy_id\": \"b83f90b3-24b7-4c51-858e-035f85156f00\",\n \"registry\": \"*\",\n \"repository\": \"*\",\n \"whitelist_ids\": []\n }\n ]\n }" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/policies", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "policies" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" } ] }, "description": "Create new Policy" }, "response": [] }, { "name": "Update Policy", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\"params\": {\"active\": \"true\"}}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/policies/:policyId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "policies", ":policyId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "policyId", "value": "" } ] }, "description": "Update Policy" }, "response": [] }, { "name": "Delete Policy", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "}", "" ] } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/policies/:policyId", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "policies", ":policyId" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" }, { "key": "clusterId", "value": "{{clusterId}}", "description": "Cluster identifier" }, { "key": "policyId", "value": "" } ] }, "description": "Delete Policy" }, "response": [] }, { "name": "Initiate Imagescan", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "[\n {\n \"imageName\": \"{{imageName}}\",\n \"imageTag\": \"{{imageTag}}\",\n \"imageDigest\": \"{{imageDigest}}\"\n }\n]" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/imagescan", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "imagescan" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" } ] } }, "response": [] }, { "name": "Get Imagescan", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/imagescan/:imageDigest", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "imagescan", ":imageDigest" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" }, { "key": "imageDigest", "value": "{{imageDigest}}" } ] } }, "response": [] }, { "name": "Get Vulnerabilities", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/imagescan/:imageDigest/vuln", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "imagescan", ":imageDigest", "vuln" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" }, { "key": "imageDigest", "value": "{{imageDigest}}" } ] } }, "response": [] } ] }, { "name": "Internal", "item": [ { "name": "Get Dashboard", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "", " ", "", "", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/dashboard/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "dashboard", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] }, "description": "Get Dashboard" }, "response": [ { "name": "Get Dashboard", "originalRequest": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/dashboard/orgs/:orgId/clusters", "host": [ "{{url}}" ], "path": [ "dashboard", "orgs", ":orgId", "clusters" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Length", "value": "1668", "name": "Content-Length", "description": "The length of the response body in octets (8-bit bytes)" }, { "key": "Content-Type", "value": "application/json; charset=utf-8", "name": "Content-Type", "description": "The mime type of this content" }, { "key": "Date", "value": "Tue, 25 Sep 2018 09:38:37 GMT", "name": "Date", "description": "The date and time that the message was sent" } ], "cookie": [ { "expires": "Invalid Date", "httpOnly": false, "domain": "localhost", "path": "/cluster-demo", "secure": false, "value": "6brVteqV4AFIfVQxcsc1d-2RnnUeuTUlUKFQDoFi.wildfly-example-5fd7c7c4c9-jlkg7", "key": "JSESSIONID" } ], "body": "{\"clusters\":[{\"name\":\"gkecluster-sancyx-326\",\"id\":\"1\",\"status\":\"RUNNING\",\"statusMessage\":\"\",\"cloud\":\"google\",\"createdAt\":\"2018-09-24T14:00:13+02:00\",\"region\":\"us-central1-a\",\"nodes\":[{\"name\":\"gke-gkecluster-sancyx-326-pool1-7a511228-7n0w\",\"creationTimestamp\":\"2018-09-24 19:16:31 +0200 CEST\",\"status\":{\"capacity\":{\"cpu\":\"2\",\"ephemeralStorage\":\"98868448Ki\",\"memory\":\"7658160Ki\",\"pods\":110},\"allocatable\":{\"cpu\":\"1930m\",\"ephemeralStorage\":\"47093746742\",\"memory\":\"5778096Ki\",\"pods\":110},\"ready\":\"True\",\"lastHeartbeatTime\":\"2018-09-25 11:38:28 +0200 CEST\",\"frequentUnregisterNetDevice\":\"Unknown\",\"kernelDeadlock\":\"Unknown\",\"networkUnavailable\":\"False\",\"OutOfDisk\":\"False\",\"memoryPressure\":\"False\",\"diskPressure\":\"False\",\"pidPressure\":\"False\",\"cpuUsagePercent\":0,\"storageUsagePercent\":53.48365633014248,\"memoryUsagePercent\":24.549813532232285,\"instanceType\":\"n1-standard-2\"}},{\"name\":\"gke-gkecluster-sancyx-326-pool1-7a511228-m83z\",\"creationTimestamp\":\"2018-09-24 14:01:54 +0200 CEST\",\"status\":{\"capacity\":{\"cpu\":\"2\",\"ephemeralStorage\":\"98868448Ki\",\"memory\":\"7658152Ki\",\"pods\":110},\"allocatable\":{\"cpu\":\"1930m\",\"ephemeralStorage\":\"47093746742\",\"memory\":\"5778088Ki\",\"pods\":110},\"ready\":\"True\",\"lastHeartbeatTime\":\"2018-09-25 11:38:30 +0200 CEST\",\"FrequentUnregisterNetDevice\":\"Unknown\",\"KernelDeadlock\":\"Unknown\",\"NetworkUnavailable\":\"False\",\"OutOfDisk\":\"False\",\"MemoryPressure\":\"False\",\"DiskPressure\":\"False\",\"PIDPressure\":\"False\",\"cpuUsagePercent\":0,\"storageUsagePercent\":53.48365633014248,\"memoryUsagePercent\":24.549839177911327,\"instanceType\":\"n1-standard-2\"}}],\"cpuUsagePercent\":0,\"storageUsagePercent\":53.48365633014248,\"memoryUsagePercent\":24.549813532232285}]}" } ] }, { "name": "Get Notifications", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/notifications", "host": [ "{{url}}" ], "path": [ "notifications" ] } }, "response": [] } ] }, { "name": "Images", "item": [ { "name": "Get Cluster Images", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/images", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "images" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" } ] } }, "response": [] }, { "name": "Get Deployments by Image", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/:clusterId/images/:imageDigest/deployments", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", ":clusterId", "images", ":imageDigest", "deployments" ], "variable": [ { "key": "orgId", "value": "{{orgId}}" }, { "key": "clusterId", "value": "{{clusterId}}" }, { "key": "imageDigest", "value": "{{imageDigest}}" } ] } }, "response": [] } ] }, { "name": "Nodepool labels", "item": [ { "name": "Get node pool labels", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/{{clusterId}}/nodepools/labels", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", "{{clusterId}}", "nodepools", "labels" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] }, { "name": "Put node pool labels", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " tests[\"Response Code 200\"] = responseCode.code == 200;", "", "}", "else if (responseCode.code === 404) {", " tests[\"Cluster Node Found!\"] = false", " postman.setNextRequest(null);", "} else {", " console.warn(\"Unknown statusCode! -> \"+ responseCode.code );", " tests[\"Unknown statusCode! -> \" + responseCode.code ] = false", " postman.setNextRequest(null);", "", " ", "}", " ", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"head\": {\n \"node.banzaicloud.io/NetworkPerfCategory\": \"medium\",\n \"node.banzaicloud.io/cpu\": \"2\",\n \"node.banzaicloud.io/memory\": \"7.5\",\n \"node.banzaicloud.io/ondemand\": \"true\",\n \"nodepool.banzaicloud.io/head\": \"true\",\n \"nodepool.banzaicloud.io/name\": \"head\"\n },\n \"pool1\": {\n \"customlabelx\": \"x\",\n \"node.banzaicloud.io/NetworkPerfCategory\": \"medium\",\n \"node.banzaicloud.io/cpu\": \"4\",\n \"node.banzaicloud.io/memory\": \"15\",\n \"node.banzaicloud.io/ondemand\": \"true\",\n \"nodepool.banzaicloud.io/name\": \"pool1\"\n },\n \"pool2\": {\n \"node.banzaicloud.io/NetworkPerfCategory\": \"medium\",\n \"node.banzaicloud.io/cpu\": \"4\",\n \"node.banzaicloud.io/memory\": \"15\",\n \"node.banzaicloud.io/ondemand\": \"true\",\n \"nodepool.banzaicloud.io/name\": \"pool2\"\n },\n \"pool3\": {\n \n }\n}" }, "url": { "raw": "{{url}}/api/v1/orgs/:orgId/clusters/{{clusterId}}/nodepools/labels", "host": [ "{{url}}" ], "path": [ "api", "v1", "orgs", ":orgId", "clusters", "{{clusterId}}", "nodepools", "labels" ], "variable": [ { "key": "orgId", "value": "{{orgId}}", "description": "Organization identifier" } ] } }, "response": [] } ] }, { "name": "Get API Endpoints", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api", "host": [ "{{url}}" ], "path": [ "api" ] } }, "response": [] }, { "name": "Drain mode on", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/-/drain", "host": [ "{{url}}" ], "path": [ "-", "drain" ] } }, "response": [] }, { "name": "Drain mode off", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{url}}/-/drain", "host": [ "{{url}}" ], "path": [ "-", "drain" ] } }, "response": [] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{token}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }