Export API
The Export API is used to export all the transactions within a service to a JSON file. The API takes in a service ID and other query parameters (limit value -1, type GENERIC_DSL and exportAsFile value true). The response of this API is a JSON file with transactions array. The sample code uses a workspaceId of 123456. Use the actual ID value of your workspace.
Sample Curl
curl "https://mock.blazemeter.com/api/v1/workspaces/27206/transactions?serviceId=156&limit=-1&type=GENERIC_DSL&exportAsFile=true" \
-X GET \
-H 'Authorization:Basic Aa1Bb2Cc3Dd4Ee5Ff6Gg7Hh8Ii9Jj0Aa1Bb2Cc3Dd4Ee5Ff6' \
-H 'Content-Type:application/json'
Sample Request
GET https://mock.blazemeter.com/api/v1/workspaces/123456/transactions?serviceId=156&sort=-id&limit=-1&type=GENERIC_DSL&exportAsFile=true
Sample Response
{
"transactions" : [ {
"id" : 93461,
"name" : "Transaction-Aug_11",
"serviceId" : 156,
"serviceName" : "Default Service",
"description" : "",
"priority" : null,
"dsl" : {
"priority" : 1,
"requestDsl" : {
"method" : "GET",
"host" : "http://petstore.swagger.io",
"path" : "/api/pets",
"url" : {
"key" : "url",
"matcherName" : "equals_url",
"matchingValue" : "http://petstore.swagger.io/api/pets"
},
"headers" : [ {
"key" : "headerName",
"matcherName" : "equals",
"matchingValue" : "version1.0"
} ],
"queryParams" : [ ],
"cookies" : [ ],
"credentials" : {
"username" : null,
"password" : null
},
"body" : [ ]
},
"responseDsl" : {
"binary" : false,
"status" : 200,
"statusMessage" : "OK",
"headers" : [ ],
"contentType" : "text",
"content" : "",
"charset" : "UTF-8"
}
},
"sampleBody" : null,
"tags" : [ ],
"created" : 1629225867,
"updated" : 1629225867,
"createdBy" : "user@example.com",
"updatedBy" : "user@example.com",
"createdDate" : "August 17, 2021",
"updatedDate" : "August 17, 2021"
} ]
}