POST-floods

Defintion

Creates a new flood test and returns its details. This may be a long-running request.
Note to windows users when using curl be sure to prepend the flood_files[] value with an @ symbol if using curl. This indicates to curl the rest should be a file name to read the data from e.g. -F "flood_files[][email protected]:/Users/tim/mytest.jmx"
1
POST https://api.flood.io/floods
Copied!

Parameters

Parameter
Required
Type
Description
flood[tool]
true
string
type of tool to use: jmeter, gatling, java-selenium-chrome or java-selenium-firefox, or flood-chrome
flood_files
true
file
test plan to use, as a multipart upload
flood[grids]
true
array of mixed
array of grid objects to distribute flood to
flood[name]
false
string
name of the flood test
flood[notes]
false
string
notes or description of the flood test
flood[project]
false
string
notes or project name of the flood test
flood[tag_list]
false
string
comma separated tags associated with the flood test
flood[privacy_flag]
false
string
public or private [default]
flood[threads]
false
integer
number of threads to pass in to test plan
flood[rampup]
false
integer
number of seconds rampup to pass in to test plan
flood[duration]
false
integer
number of seconds duration to pass in to test plan
flood[override_hosts]
false
string
override DNS hostname resolution example.com/0.0.0.0, ...
flood[override_parameters]
false
string
override parameters string-Dparam=value, -Jparam=value, ...

Examples

Launch a flood on a new grid

1
curl -u ${API_TOKEN}: -X POST https://api.flood.io/floods \
2
-F "flood[tool]=jmeter" \
3
-F "flood[threads]=10" \
4
-F "flood[privacy]=public" \
5
-F "flood[name]=MyTest" \
6
-F "flood[tag_list]=ci,shakeout" \
7
-F "flood_files[][email protected]" \
8
-F "flood[grids][][infrastructure]=demand" \
9
-F "flood[grids][][instance_quantity]=1" \
10
-F "flood[grids][][region]=us-west-2" \
11
-F "flood[grids][][instance_type]=m4.xlarge" \
12
-F "flood[grids][][stop_after]=60"
Copied!

Lauch a flood on multiple new grids

1
curl -u ${FLOOD_API_TOKEN}: -X POST https://api.flood.io/floods \
2
-F "flood[tool]=jmeter" \
3
-F "flood[threads]=10" \
4
-F "flood[privacy]=public" \
5
-F "flood[name]=MyTest" \
6
-F "flood_files[][email protected]" \
7
-F "flood[grids][][infrastructure]=demand" \
8
-F "flood[grids][][instance_quantity]=1" \
9
-F "flood[grids][][region]=ap-southeast-2" \
10
-F "flood[grids][][instance_type]=m4.xlarge" \
11
-F "flood[grids][][stop_after]=60" \
12
-F "flood[grids][][infrastructure]=demand" \
13
-F "flood[grids][][instance_quantity]=1" \
14
-F "flood[grids][][region]=ap-southeast-2" \
15
-F "flood[grids][][instance_type]=m4.xlarge" \
16
-F "flood[grids][][stop_after]=60" | jq -r .
Copied!

Launch flood on an existing grid

1
curl -u ${API_TOKEN}: -X POST https://api.flood.io/floods \
2
-F "flood[tool]=jmeter" \
3
-F "flood[threads]=50" \
4
-F "flood_files[][email protected]/path/to/testplan.jmx" \
5
-F "flood_files[][email protected]/path/to/testdata.csv" \
6
-F "flood[grids][][uuid]=qpjrj4MnKmR3VgxOLtuMww"
Copied!

Result Format

1
{
2
"_links": {
3
"self": {
4
"href": "/api/floods/VCFstUfl0AMdtaKYBo5d7A"
5
}
6
},
7
"uuid": "VCFstUfl0AMdtaKYBo5d7A",
8
"batch_id": "1VVGD5LBVvuatWEJ9SB8aA",
9
"apdex": null,
10
"tool": "jmeter",
11
"name": "MyTest",
12
"notes": null,
13
"threads": 10,
14
"rampup": null,
15
"duration": null,
16
"tag_list": [
17
"ci",
18
"shakeout"
19
],
20
"status": "queued",
21
"permalink": "https://flood.io/VCFstUfl0AMdtaKYBo5d7A",
22
"remote_errors": null,
23
"started": null,
24
"stopped": null,
25
"_embedded": {
26
"grids": [
27
{
28
"_links": {
29
"self": {
30
"href": "/api/grids/hg8ZjZcifgsuQvDfcnBONw"
31
}
32
},
33
"uuid": "hg8ZjZcifgsuQvDfcnBONw",
34
"batch_id": "1VVGD5LBVvuatWEJ9SB8aA",
35
"name": "jubilant-peak-production-hg8ZjZcifgsuQvDfcnBONw",
36
"region": "us-west-2",
37
"origin": "US West (Oregon)",
38
"instance_quantity": 1,
39
"instance_type": "m4.xlarge",
40
"infrastructure": "demand",
41
"stop_after": 60,
42
"status": "starting",
43
"nodes": []
44
}
45
],
46
"files": [
47
{
48
"name": "lRFFUcXvSIp7pHftfnC7x8",
49
"href": "..."
50
}
51
],
52
"archives": []
53
}
54
}
Copied!
Last modified 2yr ago