Route Description
GET /test-cases/:testCaseId/scripts Get list of scripts
GET /scripts/:id Get script details
POST /scripts/:id/run Run script to validate
POST /test-cases/:testCaseId/scripts Create script
HEAD /script/:id Check if script exists
PATCH /scripts/:id Update script
DELETE /scripts/:id Delete script
GET /scripts/:id/data-stores Get list of data stores
GET /data-stores/:id Get data store details
GET /data-stores/:id/download Download data store
GET /data-stores/:id/thumbnail Get thumbnail image for data store
GET /data-stores/:id/rows/:index Get row at a given index within a CSV
GET /data-stores/:id/rows/iterators/:iterator Get next N rows for the iterator of a CSV
POST /scripts/:script/data-stores/contents Upload data store contents
POST /scripts/:script/data-stores Upload data store via multi-part form upload
HEAD /data-stores/:id Check if data store exists
PATCH /data-stores/:id/contens Update data store contents
PATCH /data-stores/:id Update data store name
DELETE /data-stores/:id Delete data store

Overview

A scenario is the set of steps that define a use case we want to execute at scale. We provide various ways of definings a scenario. In the end no matter what method you use, a script is generated behind the scenes. Testable's infrastructure knows how to execute scripts at scale under a configuration you define.

In order to create a configuration you need the script ID.

This page contains all routes related to scripts. Remember that you can also create a script with a recording.

Get list of scripts

Retrieve a list of all scripts within a given test case.

GET /test-cases/:testCaseId/scripts

Request Parameters

  • down: Whether to include the script contents and data stores. Defaults to false.
  • up: Whether or not to include the parent, the test case details. Defaults to false.

Sample Response

[
   {
      "id":308,
      "createdAt":"2016-03-13T20:56:46.614Z",
      "updatedAt":"2016-03-13T21:20:03.651Z",
      "name":"Script",
      "length":140,
      "hasInit":false,
      "hasTeardown":false,
      "scriptType":"Code"
   }
]

Get script details

Retrieve details about a specific script.

GET /scripts/:id

Request Parameters

  • down: Whether to include the script contents and data stores. Defaults to true.
  • up: Whether or not to include the parent, the test case or execution details. Defaults to true.

Sample Response

{
   "id":308,
   "createdAt":"2016-03-13T20:56:46.614Z",
   "updatedAt":"2016-03-13T21:20:03.651Z",
   "name":"Script",
   "length":140,
   "hasInit":false,
   "main":"\nvar dt = dataTable.open('symbols.csv');\ndt.next(function(row) {\n  http.get('http://sample.testable.io/stocks/' + row.data['Symbols']);\n});\n",
   "hasTeardown":false,
   "scriptType":"Code",
   "dataStores":[
      {
         "id":3,
         "createdAt":"2016-03-13T21:00:37.712Z",
         "updatedAt":"2016-03-13T21:00:37.712Z",
         "name":"symbols.csv",
         "type":"text/csv",
         "charset":"UTF-8",
         "size":2020,
         "numRows":500,
         "url":"https://dev.testable.io:8000/api/data-stores/3/download",
         "thumbnailUrl":"https://dev.testable.io:8000/api/data-stores/3/thumbnail",
         "deleteUrl":"https://dev.testable.io:8000/api/data-stores/3",
         "deleteType":"DELETE",
         "headers":"Symbols"
      }
   ]
}

Run script to validate

Run the script for 1 iteration on 1 concurrent client on a Testable agent and return all results and logging.

POST /scripts/:id/run

Request Parameters

  • region: The region id where run the script. Use GET /regions to find the list of regions and their respective ids. Defaults to the ID of the AWS N. Virginia region. Both public and private regions are eligible for selection here.

Request Body

Optional set of script parameters. Only necessary if the script requires parameters.

{
    "Threads": "100"
}

Sample Response

{
   "success":true,
   "startedAt":"2016-03-13T22:19:20.180Z",
   "finishedAt":"2016-03-13T22:19:21.079Z",
   "results":[
      {
         "connectionId":"7460b831-199b-4bc4-af67-68df34c66f2d",
         "threadId":"35294392-2ac7-4cb6-a275-a08587df464c",
         "resource":"GET http://sample.testable.io/stocks/MMM",
         "timestamp":1457907561027,
         "firstReport":true,
         "metrics":[
            {
               "name":"httpMethod",
               "metricType":"Histogram",
               "metricKey":"GET",
               "metricValue":1
            },
            {
               "name":"dnsLookupMs",
               "metricType":"Timing",
               "metricValue":6,
               "metricUnits":"ms"
            },
            {
               "name":"dataPacketsSent",
               "metricType":"Counter",
               "metricValue":1,
               "metricUnits":"packets"
            },
            {
               "name":"connectionOpenMs",
               "metricType":"Timing",
               "metricValue":8,
               "metricUnits":"ms"
            },
            {
               "name":"dataPacketsReceived",
               "metricType":"Counter",
               "metricValue":2,
               "metricUnits":"packets"
            },
            {
               "name":"firstReceivedMs",
               "metricType":"Timing",
               "metricValue":10,
               "metricUnits":"ms"
            },
            {
               "name":"httpResponseCode",
               "metricType":"Histogram",
               "metricKey":"200",
               "metricValue":1
            },
            {
               "name":"success",
               "metricType":"Counter",
               "metricValue":1,
               "metricUnits":"requests"
            },
            {
               "name":"connectionCloseMs",
               "metricType":"Timing",
               "metricValue":16,
               "metricUnits":"ms"
            },
            {
               "name":"bytesSent",
               "metricType":"Counter",
               "metricValue":73,
               "metricUnits":"bytes"
            },
            {
               "name":"bytesReceived",
               "metricType":"Counter",
               "metricValue":99,
               "metricUnits":"bytes"
            },
            {
               "name":"bandwidth",
               "metricType":"Counter",
               "metricValue":172,
               "metricUnits":"bytes"
            }
         ]
      }
   ],
   "logs":[
      {
         "level":"Info",
         "message":"[aws-us-east-1] Symbol: MMM",
         "timestamp":1457907561026
      }
   ]
}

Create script

Creates a new script.

POST /test-cases/:testCaseId/scripts

Request Body

  • name Required: Name of the script.
  • scriptType: One of Code, JMeter, Gatling, Selenium, PhantomJs. Defaults to Code. If you choose a script type other than Code you must specify metadata and potentially upload additional artifacts. See below for more details.
  • main: Base64 encoded Node js code to run on each iteration of a test execution.
  • init: Base64 encoded Node js code to run once globally on execution start.
  • teardown: Base64 encoded Node js code to run once globally on execution finish.
  • paramsConfig: An optional array of parameters that are required to run your script.
[
    {
        "name": "Threads",
        "required": true
    }
]
  • sourceType: Optional, either Recording or Script. Specify if this script was generated from another script or a recording.
  • sourceId: Optional, if the script was generated from a recording or another script, indicate the id of that source here.
  • metadata: Metadata to use to auto-generate the script main code. Relevant for JMeter scripts only currently.

Possible script types:

Code

{
    "name": "Code Script",
    "main": "AAzzr2B"
}

JMeter

JMeter scripts are auto generated based on a set of metadata parameters that correspond to the JMeter options. The full set of metadata parameters:

  • testPlanName Required: The name of the JMeter test plan. Must be uploaded as a data store.
  • threadGroupParams: An object of overrides for the thread group parameters specified in the test plan. Possible fields: threads, duration, iterations, rampup, and delay.
  • systemProperties: Object of system properties to provide at runtime. For example, -Dfoo=bar should be specified as the JSON object { "foo": "bar" }.
  • jmeterProperties: Object of jmeter properties to provide at runtime. For example, -Jfoo=bar should be specified as the JSON object { "foo": "bar" }.
  • systemPropertiesFiles: Array of file names to provide in order as system properties files to JMeter at runtime. File names must either be HTTP(S) urls or names of uploaded data stores. Example: [ "overrideSystem.properties", "http://myserver.com/system.properties"].
  • jmeterPropertiesFiles: Array of file names to provide in order as system properties files to JMeter at runtime. File names must either be HTTP(S) urls or names of uploaded data stores. Example: [ "overrideJmeter.properties", "http://myserver.com/jmeter.properties"].
  • pluginJars: Array of file names to provide at runtime as plugins (in the /lib/ext folder). File names must either be HTTP(S) urls or names of uploaded data stores. Example: [ "plugin1.jar", "http://myserver.com/plugin2.jar"].
  • utilityJars: Array of file names to provide at runtime as utilities (in the /lib folder). File names must either be HTTP(S) urls or names of uploaded data stores. Example: [ "util1.jar", "http://myserver.com/util2.jar"].
  • resultsCallback: A javascript function to call per result. See this for more details.
{
    "name": "JMeter Script",
   "scriptType": "JMeter",
    "metadata": {
        "testPlanName": "test.jmx"
    }
}

Response

{
   "id":309,
   "createdAt":"2016-03-13T23:32:23.235Z",
   "updatedAt":"2016-03-13T23:32:23.236Z",
   "name":"JMeter Script",
   "length":0,
   "hasInit":false,
   "main":"",
   "hasTeardown":false,
   "scriptType":"JMeter",
   "testCase":{
      "id":208,
      "createdAt":"2016-03-13T08:59:37.248Z",
      "updatedAt":"2016-03-13T08:59:37.248Z",
      "name":"JMeter",
      "active":true
   }
}

PhantomJS or SlimerJS Script

PhantomJS is a headless WebKit browser while SlimerJS runs on top of Gecko the Firefox browser engine.

Scripts are auto generated based on a set of metadata parameters that correspond to the Script Types. The full set of metadata parameters:

  • url : The URL to open in a PhantomJS or SlimerJS headless browser. If specified, browserScript and phantomScript should not be specified.
  • phantomScript: Base64 encoded PhantomJS script. If specified, url and browserScript should not be specified.
  • browserScript: Base64 encoded webpage (HTML, JS, CSS). A PhantomJS script that loads this webpage will be auto-generated for you. If specified, url and phantomScript should not be specified.
{
   "name": "Phantom Demo",
   "scriptType": "PhantomJs",
   "metadata": {
      "url": "https://www.google.com"
   }
}

Response

{
   "id":309,
   "createdAt":"2016-03-13T23:32:23.235Z",
   "updatedAt":"2016-03-13T23:32:23.236Z",
   "name":"Phantom Demo",
   "length":0,
   "hasInit":false,
   "main":"...",
   "hasTeardown":false,
   "scriptType":"PhantomJs",
   "testCase":{
      "id":208,
      "createdAt":"2016-03-13T08:59:37.248Z",
      "updatedAt":"2016-03-13T08:59:37.248Z",
      "name":"Phantom",
      "active":true
   }
}

Webdriver.io Selenium Script

Webdriver.io Selenium bindings for Nodejs are supported as one of the scenario types.

A set of metadata script parameters drives the test runner execution. The full set of metadata parameters:

  • bindings : The Selenium bindings to use. Currently only supports wdio.
  • sourceType: Either upload if all files are uploaded to the script or vcs if the files comes from a version control repository.
  • repositoryId: If sourceType == "vcs" this is the repository id and is required. See our version control API for more details.
  • branch: If sourceType == "vcs" this is the branch to clone. Defaults to the branch property of the repository object retrieved via our version control API. Supports any valid identifier that can be used with git pull origin <branch> which includes branch names, tags, HEAD, etc.
  • wdioConfFile: Name of the Webdriver.io configuration file that was uploaded or in the selected repository. Defaults to wdio.local.js.
  • displaySize: The display size to use when opening the browsers with Selenium. Defaults to 1024x768x24.
  • seleniumVersion: The version of Selenium to use. Defaults to 3.0.1.
  • chromeDriverVersion: The version of the Chrome driver to use. Defaults to 2.25.
  • geckoDriverVersion: The version of the Gecko (Firefox) driver to use. Defaults to 0.11.1.

If sourceType is upload you must follow this call with calls to upload the necessary files (Webdriver.io configuration file, package.json, test.js, etc) either by base64 encoding the contents or using the HTML standard multi part form upload endpoint.

{
   "name": "Webdriver.io Demo",
   "scriptType": "Selenium",
   "metadata": {
      "sourceType": "vcs",
      "confFileName": "wdio.local.js",
      "repositoryId": 9,
      "branch": "HEAD",
      "seleniumVersion": "3.0.1",
      "chromeDriverVersion": "2.25",
      "geckoDriverVersion": "0.11.1",
      "displaySize": "1024x768x24"
   }
}

Response

{
   "id":24,
   "createdAt":"2016-12-13T20:19:25.457Z",
   "updatedAt":"2016-12-20T04:00:49.069Z",
   "name":"New",
   "length":24,
   "hasInit":false,
   "main":"c2VsZW5pdW0uZXhlYygpOw==",
   "hasTeardown":false,
   "scriptType":"Selenium",
   "metadata":{
      "sourceType":"vcs",
      "confFileName":"wdio.local.js",
      "repositoryId":9,
      "branch":"HEAD",
      "displaySize":"1024x768x24",
      "chromeDriverVersion":"2.25",
      "seleniumVersion":"3.0.1",
      "geckoDriverVersion":"0.11.1"
   },
   "readonly":false
}

Gatling

Gatling scripts are auto generated based on a set of metadata parameters that correspond to the Gatling options. The full set of metadata parameters:

  • sourceType: Either upload if all files are uploaded to the script or vcs if the files comes from a version control repository.
  • repositoryId: If sourceType == "vcs" this is the repository id and is required. See our version control API for more details.
  • branch: If sourceType == "vcs" this is the branch to clone. Defaults to the branch property of the repository object retrieved via our version control API. Supports any valid identifier that can be used with git pull origin <branch> which includes branch names, tags, HEAD, etc.
  • simulation: The name of the Gatling simulation to run. If there is only one uploaded or in your repository there is no need to specify this field.
  • version: Gatling version to use. Defaults ot 2.2.4.
  • users: Number of concurrent users generated in the Gatling simulation. This parameter is available as a system property in your simulation, Integer.getInteger("users"). Defaults to 1. When smoke testing this will be overridden to 1.
  • javaOpts: Additional Java command line options to pass Gatling (e.g. system properties, memory settings, etc).
  • simulationsDir: Directory where simulations are located within your uploaded files or repository. Defaults to user-files/simulations. Simulation files (*.scala) in the root of your repository or uploaded files are automatically copied to this directory.
  • dataDir: Directory where Gatling data is located within your uploaded files or repository. Defaults to user-files/data.
  • bodiesDir: Directory where Gatling bodies is located within your uploaded files or repository. Defaults to user-files/bodies.
  • additionalLibs: Directory where any additional JAR files to include in the classpath are located. Defaults to lib.
{
   "name": "Gatling Script",
   "scriptType": "Gatling",
   "metadata": {
      "sourceType": "upload",
      "simulation": "MySimulation.scala",
      "users": 10
   }
}

Response

{
   "id":310,
   "createdAt":"2016-03-13T23:32:23.235Z",
   "updatedAt":"2016-03-13T23:32:23.236Z",
   "name":"Gatling Script",
   "length":0,
   "hasInit":false,
   "main":"",
   "hasTeardown":false,
   "scriptType":"Gatling",
   "metadata": {
      "sourceType": "upload",
      "simulation": "MySimulation.scala",
      "users": 10
   },
   "testCase":{
      "id":200,
      "createdAt":"2016-03-13T08:59:37.248Z",
      "updatedAt":"2016-03-13T08:59:37.248Z",
      "name":"Gatling",
      "active":true
   }
}

Check if script exists

HEAD /scripts/:id

Response

HTTP Status: 200 OK or 404 NOT FOUND

Update script

Update the script parameters. All parameters available when creating can be specified during update as well as the following parameters:

  • expectedUpdatedAt: Optional timestamp in one of the many standard date formats (e.g. "2016-03-13T08:59:37.248Z", 1474906533123) indicating when you believe the script was last updated. If it has been updated since this timestamp an error will be thrown and the script will not be updated.
PATCH /scripts/:id

Request Body

{
    "name": "New Name"
}

Response

{
   "id":309,
   "createdAt":"2016-03-13T23:32:23.235Z",
   "updatedAt":"2016-03-13T23:34:31.912Z",
   "name":"New Name",
   "length":0,
   "hasInit":false,
   "main":"",
   "hasTeardown":false,
   "scriptType":"Code",
   "testCase":{
      "id":208,
      "createdAt":"2016-03-13T08:59:37.248Z",
      "updatedAt":"2016-03-13T08:59:37.248Z",
      "name":"JMeter",
      "active":true
   }
}

Delete script

DELETE /scripts/:id

Response

The deleted script

{
   "id":309,
   "createdAt":"2016-03-13T23:32:23.235Z",
   "updatedAt":"2016-03-13T23:34:31.912Z",
   "name":"New Name",
   "length":0,
   "hasInit":false,
   "main":"",
   "hasTeardown":false,
   "scriptType":"Code",
   "testCase":{
      "id":208,
      "createdAt":"2016-03-13T08:59:37.248Z",
      "updatedAt":"2016-03-13T08:59:37.248Z",
      "name":"JMeter",
      "active":true
   }
}

Get list of data stores

Retrieve a list of all data stores within a given script.

GET /scripts/:id/data-stores

Request Parameters

  • down: Whether to include the CSV headers in the response. Defaults to true.
  • up: Whether or not to include the script parent. Defaults to false.
  • includeRows: Whether or not to include all rows of the CSV in the response (structured as JSON). Defaults to false.

Sample Response

{
   "files":[
      {
         "id":3,
         "createdAt":"2016-03-13T21:00:37.712Z",
         "updatedAt":"2016-03-13T21:00:37.712Z",
         "name":"symbols.csv",
         "type":"text/csv",
         "charset":"UTF-8",
         "size":2020,
         "numRows":500,
         "url":"https://dev.testable.io:8000/api/data-stores/3/download?sid=4dfe7d695804158f84df5ce1f40cc1c43e3608ff3275bdb3b6a6e40ac089ceee",
         "thumbnailUrl":"https://dev.testable.io:8000/api/data-stores/3/thumbnail?sid=4dfe7d695804158f84df5ce1f40cc1c43e3608ff3275bdb3b6a6e40ac089ceee",
         "deleteUrl":"https://dev.testable.io:8000/api/data-stores/3?sid=4dfe7d695804158f84df5ce1f40cc1c43e3608ff3275bdb3b6a6e40ac089ceee",
         "deleteType":"DELETE",
         "headers":"Symbols"
      }
   ]
}

Get data store details

Retrieve details about a specific data store.

GET /data-stores/:id

Request Parameters

  • down: Whether to include the CSV headers in the response. Defaults to true.
  • up: Whether or not to include the script parent. Defaults to true.
  • includeRows: Whether or not to include all rows of the CSV in the response (structured as JSON). Defaults to false.

Sample Response

{
   "id":3,
   "createdAt":"2016-03-13T21:00:37.712Z",
   "updatedAt":"2016-03-13T21:00:37.712Z",
   "name":"symbols.csv",
   "type":"text/csv",
   "charset":"UTF-8",
   "size":2020,
   "numRows":500,
   "url":"https://dev.testable.io:8000/api/data-stores/3/download",
   "thumbnailUrl":"https://dev.testable.io:8000/api/data-stores/3/thumbnail",
   "deleteUrl":"https://dev.testable.io:8000/api/data-stores/3",
   "deleteType":"DELETE",
   "headers":"Symbols"
}

Download data store

Download the contents of the data store as a file.

GET /data-stores/:id/download

Request Parameters

None

Get thumbnail image for data store

Get the thumbnail image for this data store as an image file.

GET /data-stores/:id/thumbnail

Request Parameters

None

Get row at a given index within a CSV

Retrieves the row at a particular index within a CSV. Indices start at 1.

GET /data-stores/:id/rows/:index

Request Parameters

  • up: Whether or not to include the data store parent. Defaults to true.

Response

{
   "id":1,
   "createdAt":"2016-03-13T21:00:37.713Z",
   "updatedAt":"2016-03-13T21:00:37.713Z",
   "rowIndex":1,
   "rowData":"MMM,Some symbol"
}

Get next N rows for the iterator of a CSV

Useful if you want to iterate the CSV across a distributed set of processes like during a load test execution. Choose a unique name for your iterator and each call is guaranteed to return the next N (where N defaults to 1) rows. Iterators are removed after an hour without usage.

GET /data-stores/:id/rows/iterators/:iterator

Request Parameters

  • up: Whether or not to include the data store parent. Defaults to true.
  • wrap: Whether or not to wrap around to the start of the CSV when the end is reached. Defaults to true. If set to false and the end is reached, an error will be returned on all future calls using this iterator.
  • rows: Number of rows to return. Defaults to 1.

Response

[
   {
      "id":4,
      "createdAt":"2016-03-13T21:00:37.716Z",
      "updatedAt":"2016-03-13T21:00:37.716Z",
      "rowIndex":4,
      "rowData":"ANF,Company name 1"
   },
   {
      "id":5,
      "createdAt":"2016-03-13T21:00:37.716Z",
      "updatedAt":"2016-03-13T21:00:37.716Z",
      "rowIndex":5,
      "rowData":"ADBE,Company name 2"
   },
   {
      "id":6,
      "createdAt":"2016-03-13T21:00:37.717Z",
      "updatedAt":"2016-03-13T21:00:37.717Z",
      "rowIndex":6,
      "rowData":"AMD,Company name 3"
   }
]

Upload data store contents

Upload a data store file by providing a JSON that includes the file name and the base64 encoded contents. The file type will be inferred based on the extension of the file name following standard mime type mappings.

POST /scripts/:id/data-stores

Request Body

{
   "name": "symbols.csv",
   "contents": "[base64_encoded_contents]"
}

Response

{
   "id":64,
   "createdAt":"2016-09-26T14:16:32.178Z",
   "updatedAt":"2016-09-26T14:16:32.178Z",
   "name":"symbols.csv",
   "type":"text/csv",
   "charset":"UTF-8",
   "size":2007,
   "numRows":497,
   "url":"/api/data-stores/64/download?sid=abc",
   "thumbnailUrl":"/api/data-stores/64/thumbnail?sid=abc",
   "deleteUrl":"/api/data-stores/64?sid=abc",
   "deleteType":"DELETE",
   "headers":"Symbols",
   "script":{
      "id":240,
      "createdAt":"2016-06-27T20:32:31.538Z",
      "updatedAt":"2016-06-27T20:34:00.836Z",
      "name":"Default Scenario",
      "length":389,
      "hasInit":false,
      "hasTeardown":false,
      "scriptType":"Code"
   }
}

Upload data store via multi-part form upload

Upload a data store file following a standard HTTP multi part upload format. If a data store already exists for this scenario with the same name it will update it otherwise a new data store will be created.

POST /scripts/:id/data-stores

Response

{
   "files":[
      {
         "id":64,
         "createdAt":"2016-09-26T14:16:32.178Z",
         "updatedAt":"2016-09-26T14:16:32.178Z",
         "name":"symbols.csv",
         "type":"text/csv",
         "charset":"UTF-8",
         "size":2007,
         "numRows":497,
         "url":"/api/data-stores/64/download?sid=abc",
         "thumbnailUrl":"/api/data-stores/64/thumbnail?sid=abc",
         "deleteUrl":"/api/data-stores/64?sid=abc",
         "deleteType":"DELETE",
         "headers":"Symbols",
         "script":{
            "id":240,
            "createdAt":"2016-06-27T20:32:31.538Z",
            "updatedAt":"2016-06-27T20:34:00.836Z",
            "name":"Default Scenario",
            "length":389,
            "hasInit":false,
            "hasTeardown":false,
            "scriptType":"Code"
         }
      }
   ]
}

Check if data store exists

HEAD /data-stores/:id

Response

HTTP Status: 200 OK or 404 NOT FOUND

Update data store contents

Update the data store name and contents by providing a JSON that includes the file name and the base64 encoded contents. If either the name or contents are not included, the current value for that field will be maitained. The file type will be inferred based on the extension of the file name following standard mime type mappings.

PATCH /data-stores/:id/contents

Request Body

{
   "name": "symbols.csv",
   "contents": "[base64_encoded_contents]"
}

Response

{
   "id":64,
   "createdAt":"2016-09-26T14:16:32.178Z",
   "updatedAt":"2016-09-26T14:16:32.178Z",
   "name":"symbols.csv",
   "type":"text/csv",
   "charset":"UTF-8",
   "size":2007,
   "numRows":497,
   "url":"/api/data-stores/64/download?sid=abc",
   "thumbnailUrl":"/api/data-stores/64/thumbnail?sid=abc",
   "deleteUrl":"/api/data-stores/64?sid=abc",
   "deleteType":"DELETE",
   "headers":"Symbols",
   "script":{
      "id":240,
      "createdAt":"2016-06-27T20:32:31.538Z",
      "updatedAt":"2016-06-27T20:34:00.836Z",
      "name":"Default Scenario",
      "length":389,
      "hasInit":false,
      "hasTeardown":false,
      "scriptType":"Code"
   }
}

Update data store name

Update the data store name. To overwrite the data store with a new one, use the upload data stores endpoint.

PATCH /data-stores/:id

Request Body

{
    "name": "new.csv"
}

Response

{
   "id":3,
   "createdAt":"2016-03-13T21:00:37.712Z",
   "updatedAt":"2016-03-13T21:00:37.712Z",
   "name":"new.csv",
   "type":"text/csv",
   "charset":"UTF-8",
   "size":2020,
   "numRows":500,
   "url":"https://dev.testable.io:8000/api/data-stores/3/download",
   "thumbnailUrl":"https://dev.testable.io:8000/api/data-stores/3/thumbnail",
   "deleteUrl":"https://dev.testable.io:8000/api/data-stores/3",
   "deleteType":"DELETE",
   "headers":"Symbols"
}

Delete data store

DELETE /data-stores/:id

Response

The deleted data store

{
   "id":3,
   "createdAt":"2016-03-13T21:00:37.712Z",
   "updatedAt":"2016-03-13T21:00:37.712Z",
   "name":"new.csv",
   "type":"text/csv",
   "charset":"UTF-8",
   "size":2020,
   "numRows":500,
   "url":"https://dev.testable.io:8000/api/data-stores/3/download",
   "thumbnailUrl":"https://dev.testable.io:8000/api/data-stores/3/thumbnail",
   "deleteUrl":"https://dev.testable.io:8000/api/data-stores/3",
   "deleteType":"DELETE",
   "headers":"Symbols"
}