API Documentation

Folder Resource

Search our documentation:

Toggle Documentation Menu

API: Folder Resource

Jump to...
  • List - Fetch an array of all the folders in your account
  • Get - Fetch a single folder from your account
  • Create - Create a folder and return the new folder NEW
  • Update - Update a folder and return the updated folder NEW
  • List Folder Suites - Fetch an array of all the suites in a folder


List Folders

Fetch an array of all the folders in your account.

Request
GEThttps://api.ghostinspector.com/v1/folders/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
Response
{
  "code": "SUCCESS",
  "data": [
    {
      "_id": "5aed177226a8722dad009e39",
      "name": "Sample Folder #1",
      "organization": "547fb82d92423992d52a4fea"
    },
    {
      "_id": "5af39b1a0d8160b28a5c4762",
      "name": "Sample Folder #2",
      "organization": "547fb82d92423992d52a4fea"
    }
  ]
}


Get Folder

Fetch a single folder

Request
GEThttps://api.ghostinspector.com/v1/folders/<folderId>/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
folderId
The ID of the folder to fetch
Response
{
  "code": "SUCCESS",
  "data": {
    "_id": "5aed177226a8722dad009e39",
    "organization": "547fb82d92423992d52a4fea",
    "name": "Sample Folder #1"    
  }
}


Create Folder

Create a folder and return the new folder.

Request
POSThttps://api.ghostinspector.com/v1/folders/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
JSON Body
name
Name for the new folder
organization
The ID of the organization this folder should be within
Request Example using cURL

POST Request with JSON body:
curl -H 'Content-Type: application/json' -X POST -d "{"name":"Fancy Fresh Folder", organization: "5a1b419ae40144279f9ac680"}" 'https://api.ghostinspector.com/v1/folders/?apiKey=<apiKey>"'
Response
{
  "code": "SUCCESS",
  "data": {
    "_id": "5aed177226a8722dad009e39",
    "organization": "547fb82d92423992d52a4fea",
    "name": "Fancy Fresh Folder"    
  }
}


Update Folder

Update a folder and return the updated folder.

Request
POSThttps://api.ghostinspector.com/v1/folders/<folderId>/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
folderId
The ID of the folder to update
JSON Body
name
Name for the folder
Request Example using cURL

POST Request with JSON body:
curl -H 'Content-Type: application/json' -X POST -d "{"name":"Fancy Updated Folder" }" 'https://api.ghostinspector.com/v1/folders/<folderId>/?apiKey=<apiKey>"'
Response
{
  "code": "SUCCESS",
  "data": {
    "_id": "5aed177226a8722dad009e39",
    "organization": "547fb82d92423992d52a4fea",
    "name": "Fancy Updated Folder"
  }
}


List Folder Suites

Fetch an array of all the suites in a folder.

Request
GEThttps://api.ghostinspector.com/v1/folders/<folderId>/suites/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
folderId
The ID of the folder containing the tests
Response
{
  "code": "SUCCESS",
  "data": [
    {
      "_id": "5a1e1b90154014760af39ef5",
      "abortOnTestFailure": false,
      "autoRetry": false,
      "browser": "chrome",
      "dateCreated": "2017-11-29T02:29:36.132Z",
      "disableVisuals": false,
      "disallowInsecureCertificates": false,
      "failOnJavaScriptError": false,
      "finalDelay": 0,
      "folder": "5af3736b34967c7736a5bd33",
      "globalStepDelay": 250,
      "httpHeaders": [],
      "language": null,
      "maxAjaxDelay": 10000,
      "maxConcurrentTests": 0,
      "maxWaitDelay": 15000,
      "name": "Smoke Tests",
      "organization": "5a1b419ae40144279f9ac680",
      "persistVariables": false,
      "publicStatusEnabled": false,
      "region": "us-east-1",
      "screenshotCompareEnabled": false,
      "screenshotCompareThreshold": 0.1,
      "startUrl": "",
      "testCount": 1,
      "testFrequency": 0,
      "testFrequencyAdvanced": [],
      "variables": [],
      "viewportSize": {
        "height": 768,
        "width": 1024
      }
    },
    {
      "_id": "5e22803a42f23a1da1d6a409",
      "abortOnTestFailure": false,
      "autoRetry": false,
      "browser": "chrome",
      "dateCreated": "2020-01-18T03:49:14.104Z",
      "disableVisuals": false,
      "disallowInsecureCertificates": false,
      "failOnJavaScriptError": false,
      "finalDelay": 0,
      "folder": "5af3736b34967c7736a5bd33",
      "globalStepDelay": 0,
      "httpHeaders": [],
      "language": null,
      "maxAjaxDelay": 10000,
      "maxConcurrentTests": 0,
      "maxWaitDelay": 5000,
      "name": "Sample Tests",
      "organization": "5a1b419ae40144279f9ac680",
      "persistVariables": false,
      "publicStatusEnabled": false,
      "region": "us-east-1",
      "screenshotCompareEnabled": false,
      "screenshotCompareThreshold": 0.1,
      "startUrl": "",
      "testCount": 1,
      "testFrequency": 0,
      "testFrequencyAdvanced": [],
      "variables": [],
      "viewportSize": {
        "height": 800,
        "width": 1280
      }
    }
  ]
}