Upload or Update Data Files in Private Cloud
API Explorer: /collections/{collectionId}/files/data
To upload a data file asset to a multi test, POST the file to the collectionId
(you need to know the collectionId
of the created multi test). Use the following template for the file path and name:
curl -X POST -F 'file=@path to file/file.ext' ...
The sample code uploads a file (@/my/path/to/colors.csv
) to a multi test with an ID of 10033948
. Replace @/my/path/to/colors.csv
with the actual path and file name and 10033948
with your collectionId
.
To update the contents of an uploaded file, repeat the same operation (upload the updated file using the same file name).
Upload or Update Data Files in Private Cloud
curl 'https://your.internal.blazemeter.net/api/v4/collections/10033948/files/data' \
-X POST \
-F 'file=@/my/path/to/colors.csv' \
--user 'api_key_id:api_key_secret'
Response200 OK
{
"result": {
"collectionType": "multiV4",
"created": 1563825326,
"creatorClientId": "gui",
"dataFiles": [],
"description": null,
"draftId": null,
"filesToSplit": [],
"id": 12345678,
"items": null,
"kpiTrackingData": null,
"lastRunTime": null,
"lastUpdatedById": 123456,
"masters": [],
"migratedFromTestCollectionId": null,
"migratedToTestId": null,
"name": "July_22_2:55 PM - Multi-Test",
"note": null,
"oldVersionId": null,
"projectId": 123456,
"shouldSendReportEmail": true,
"testsForExecutions": [
{
"executions": [
{
"concurrency": 25,
"executor": "jmeter",
"holdFor": "19m",
"locations": {
"harbor-5d2cecc61391a8f318703bd5": 25
},
"locationsPercents": {
"harbor-5d2cecc61391a8f318703bd5": 100
},
"rampUp": "1m",
"scenario": "default-scenario-6936475",
"steps": 0,
"testId": 1234567
}
],
"overrideExecutions": [
{
"concurrency": 25,
"executor": "jmeter",
"holdFor": "19m",
"locations": {
"harbor-5d2cecc61391a8f318703bd5": 25
},
"locationsPercents": {
"harbor-5d2cecc61391a8f318703bd5": 100
},
"rampUp": "1m",
"steps": 0
}
],
"testId": 1234567
},
{
"executions": [
{
"concurrency": 20,
"executor": "jmeter",
"holdFor": "19m",
"locations": {
"harbor-5d2cecc61391a8f318703bd5": 20
},
"locationsPercents": {
"harbor-5d2cecc61391a8f318703bd5": 100
},
"rampUp": "1m",
"scenario": "default-scenario-6952118",
"steps": 0,
"testId": 2345678
}
],
"overrideExecutions": [
{
"concurrency": 20,
"executor": "jmeter",
"holdFor": "19m",
"locations": {
"harbor-5d2cecc61391a8f318703bd5": 20
},
"locationsPercents": {
"harbor-5d2cecc61391a8f318703bd5": 100
},
"rampUp": "1m",
"steps": 0
}
],
"testId": 2345678
}
],
"underMigration": null,
"updated": 1563825332,
"userId": 123456,
"v4MigratedDate": null
}
}