Folder Resource

Table of Contents

  • List Folders
  • Get Folder
  • Create Folder
  • Update Folder
  • List Folder Suites

List Folders

Fetch an array of all the folders in your account.

Request

Method: GET

URL: https://api.ghostinspector.com/v1/folders/?apiKey={{apiKey}}

Query parameters

apiKey
Your API key provided in your account
{
"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

Method: GET

URL: https://api.ghostinspector.com/v1/folders/{{folderId}}/?apiKey={{apiKey}}

Query parameters

apiKey
Your API key provided in your account
folderId
The ID of the folder to fetch
{
"code": "SUCCESS",
"data": {
"_id": "5aed177226a8722dad009e39",
"organization": "547fb82d92423992d52a4fea",
"name": "Sample Folder #1"
}
}

Create Folder

Create a folder and return the new folder.

Request

Method: POST

URL: https://api.ghostinspector.com/v1/folders/?apiKey={{apiKey}}

Query parameters

apiKey
Your API key provided in your account

JSON body parameters

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 https://api.ghostinspector.com/v1/folders/?apiKey={{apiKey}} \
-X POST \
-H 'Content-Type: application/json' \
-d '{"name":"Fancy Fresh Folder", organization: "5a1b419ae40144279f9ac680"}'
{
"code": "SUCCESS",
"data": {
"_id": "5aed177226a8722dad009e39",
"organization": "547fb82d92423992d52a4fea",
"name": "Fancy Fresh Folder"
}
}

Update Folder

Update a folder and return the updated folder.

Request

Method: POST

URL: https://api.ghostinspector.com/v1/folders/{{folderId}}/?apiKey={{apiKey}}

Query parameters

apiKey
Your API key provided in your account
folderId
The ID of the folder to update

JSON body parameters

name
Name for the new folder

Request Example using cURL

curl https://api.ghostinspector.com/v1/folders/{{folderId}}/?apiKey={{apiKey}} \
-X POST \
-H 'Content-Type: application/json' \
-d '{"name":"Fancy Fresh Folder"}'
{
"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

Method: GET

URL: https://api.ghostinspector.com/v1/folders/{{folderId}}/suites/?apiKey={{apiKey}}

Query parameters

apiKey
Your API key provided in your account
folderId
The ID of the folder containing the tests
{
"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,
"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,
"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
}
}
]
}