{"__v":0,"_id":"588f722cbcace50f0052ba0f","category":{"version":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","_id":"588f722bbcace50f0052b9e4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-26T05:04:48.794Z","from_sync":false,"order":2,"slug":"samples-and-tutorials","title":"How Tos & Examples"},"parentDoc":null,"project":"565f5fa26bafd40d0030a064","user":"565f3941ea46251700972783","version":{"__v":1,"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"updates":["57e54f4800c8680e00fae7da","57ea8aec1ac5b01900de38af"],"next":{"pages":[],"description":""},"createdAt":"2015-12-28T22:49:59.638Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"In order to run these examples, please make sure you've followed the [Quick Start Guide](doc:quick-start-guide). You'll need to have signed up with <a target=\\\"_blank\\\" href=\\\"https://dashboard.nanoscale.io/#/registration\\\">nanoscale.io</a> and downloaded the <a target=\\\"_blank\\\" href=\\\"http://downloads.nanoscale.io/latest/samples.json\\\">Sample APIs</a> we provide.\\n\\nThe instructions in this tutorial refer to the sample Proxy Endpoint called “A Hello World proxy” in the sample API that you imported in the Quick Start Guide steps, and assumes you have a nanoscale.io account.  If you have not imported the sample API or signed up for <a target=\\\"_blank\\\" href=\\\"https://dashboard.nanoscale.io/#/registration\\\">nanoscale.io</a>, please do so now.\",\n  \"title\": \"Important\"\n}\n[/block]\nDevelopers can test their API Endpoints during the process of developing them. Each proxy endpoint can be tested individually even before making them active.\n \n## Step 1\n\nWithin the specific proxy endpoint select the test component and define the following required fields to create a test case.\n\n- Name of the test case.\n- Method (GET/POST/PUT/DELETE) to be executed to run the test.\n- Route on which test needs to be executed.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/41wtF5GRi2FSxhaQcerr_samples-and-tutorials-create-test-your-api-endpoint-step1.png\",\n        \"samples-and-tutorials-create-test-your-api-endpoint-step1.png\",\n        \"3360\",\n        \"1270\",\n        \"#546985\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Step 2\n\n- Add any required Headers and Query Parameters to run a GET call.\n- Add any required Headers for a Delete call.\n- Select content type and add the required Body for POST and PUT calls.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/yXU0ls0XQSWCtDYVHzrQ_samples-and-tutorials-create-test-your-api-endpoint-step2.png\",\n        \"samples-and-tutorials-create-test-your-api-endpoint-step2.png\",\n        \"3360\",\n        \"1566\",\n        \"#ab9351\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Step 3\n\nRun the test case by clicking on Execute button to get the results. Nanoscale.io runs the test call against the defined proxy endpoint to return back the results. Results contain the endpoint response and response code. Use this feature to test and debug your APIs during the development and maintenance phases.","excerpt":"","slug":"test-your-api-endpoint","type":"basic","title":"Test Your API Endpoint"}

Test Your API Endpoint


[block:callout] { "type": "info", "body": "In order to run these examples, please make sure you've followed the [Quick Start Guide](doc:quick-start-guide). You'll need to have signed up with <a target=\"_blank\" href=\"https://dashboard.nanoscale.io/#/registration\">nanoscale.io</a> and downloaded the <a target=\"_blank\" href=\"http://downloads.nanoscale.io/latest/samples.json\">Sample APIs</a> we provide.\n\nThe instructions in this tutorial refer to the sample Proxy Endpoint called “A Hello World proxy” in the sample API that you imported in the Quick Start Guide steps, and assumes you have a nanoscale.io account. If you have not imported the sample API or signed up for <a target=\"_blank\" href=\"https://dashboard.nanoscale.io/#/registration\">nanoscale.io</a>, please do so now.", "title": "Important" } [/block] Developers can test their API Endpoints during the process of developing them. Each proxy endpoint can be tested individually even before making them active. ## Step 1 Within the specific proxy endpoint select the test component and define the following required fields to create a test case. - Name of the test case. - Method (GET/POST/PUT/DELETE) to be executed to run the test. - Route on which test needs to be executed. [block:image] { "images": [ { "image": [ "https://files.readme.io/41wtF5GRi2FSxhaQcerr_samples-and-tutorials-create-test-your-api-endpoint-step1.png", "samples-and-tutorials-create-test-your-api-endpoint-step1.png", "3360", "1270", "#546985", "" ] } ] } [/block] ## Step 2 - Add any required Headers and Query Parameters to run a GET call. - Add any required Headers for a Delete call. - Select content type and add the required Body for POST and PUT calls. [block:image] { "images": [ { "image": [ "https://files.readme.io/yXU0ls0XQSWCtDYVHzrQ_samples-and-tutorials-create-test-your-api-endpoint-step2.png", "samples-and-tutorials-create-test-your-api-endpoint-step2.png", "3360", "1566", "#ab9351", "" ] } ] } [/block] ## Step 3 Run the test case by clicking on Execute button to get the results. Nanoscale.io runs the test call against the defined proxy endpoint to return back the results. Results contain the endpoint response and response code. Use this feature to test and debug your APIs during the development and maintenance phases.