{ "info": { "_postman_id": "83e18ed8-237b-4832-9d0f-63268a182592", "name": "PKS", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Get auth token", "event": [ { "listen": "test", "script": { "id": "caa9107f-2757-4587-b7c3-6ecb7f318317", "exec": [ "var jsonData = JSON.parse(responseBody);", "tests[\"Access token cannot empty\"] = jsonData.access_token !== undefined;", "", "postman.setEnvironmentVariable(\"access_token\", \"Bearer \" + jsonData.access_token);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{password}}", "type": "string" }, { "key": "username", "value": "{{username}}", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Accept", "value": "application/json;charset=utf-8", "type": "text" }, { "key": "Content-Type", "name": "Content-Type", "value": "application/x-www-form-urlencoded", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "client_credentials", "type": "text" } ] }, "url": { "raw": "{{api_server}}:8443/oauth/token?Accept=application/json;charset=utf-8&Content-Type=application/x-www-form-urlencoded;charset=utf-8", "host": [ "{{api_server}}" ], "port": "8443", "path": [ "oauth", "token" ], "query": [ { "key": "Accept", "value": "application/json;charset=utf-8" }, { "key": "Content-Type", "value": "application/x-www-form-urlencoded;charset=utf-8" } ] } }, "response": [] }, { "name": "Clusters", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "key": "Authorization", "name": "Content-Type", "value": "{{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{api_server}}:9021/v1/clusters", "host": [ "{{api_server}}" ], "port": "9021", "path": [ "v1", "clusters" ] } }, "response": [] }, { "name": "Create cluster", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "key": "Authorization", "name": "Content-Type", "value": "{{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"test\",\r\n \"network_profile_name\": null,\r\n \"parameters\": {\r\n \"authorization_mode\": null,\r\n \"kubernetes_master_host\": \"test.pks.vmware.local\",\r\n \"kubernetes_master_port\": 8443,\r\n \"kubernetes_worker_instances\": 1,\r\n \"nsxt_network_profile\": null,\r\n \"worker_haproxy_ip_addresses\": null\r\n },\r\n \"plan_name\": \"small\"\r\n}" }, "url": { "raw": "{{api_server}}:9021/v1/clusters", "host": [ "{{api_server}}" ], "port": "9021", "path": [ "v1", "clusters" ] } }, "response": [] }, { "name": "Delete cluster", "request": { "auth": { "type": "noauth" }, "method": "DELETE", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "key": "Authorization", "name": "Content-Type", "value": "{{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{api_server}}:9021/v1/clusters/test", "host": [ "{{api_server}}" ], "port": "9021", "path": [ "v1", "clusters", "test" ] } }, "response": [] }, { "name": "Cluster by name", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman.", "key": "Authorization", "name": "Content-Type", "value": "{{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{api_server}}:9021/v1/clusters/pfs", "host": [ "{{api_server}}" ], "port": "9021", "path": [ "v1", "clusters", "pfs" ] } }, "response": [] }, { "name": "Network Profiles", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "type": "text", "value": "application/json" }, { "key": "Authorization", "name": "Content-Type", "type": "text", "value": "{{access_token}}", "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman." }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{api_server}}:9021/v1/network-profiles", "host": [ "{{api_server}}" ], "port": "9021", "path": [ "v1", "network-profiles" ] } }, "response": [] }, { "name": "Plans", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "type": "text", "value": "application/json" }, { "key": "Authorization", "name": "Content-Type", "type": "text", "value": "{{access_token}}", "warning": "This is a duplicate header and will be overridden by the Authorization header generated by Postman." }, { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "{{api_server}}:9021/v1/plans", "host": [ "{{api_server}}" ], "port": "9021", "path": [ "v1", "plans" ] } }, "response": [] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vdWFhLnBrcy52bXdhcmUubG9jYWw6ODQ0My90b2tlbl9rZXlzIiwia2lkIjoia2V5LTEiLCJ0eXAiOiJKV1QiLCJjdHkiOm51bGx9", "type": "string" } ] } }