Download OpenAPI specification:Download
Welcome to the PFLB Platform API Reference!
Our REST API gives you programmatic access to PFLB Platform tests and SLAs.
Uploads a file to the platform storage. For example, you can upload CSV parameters files or supporting files for JMX tests
api-token required | string API access token |
files | Array of strings <binary> List of the files |
curl --request POST \ --url https://platform.pflb.us/public-api/v1/file \ --header 'Content-Type: multipart/form-data' \ --header 'api-token: API access token' \ --form 'files=@/home/csv/params.csv'
[- {
- "originalFileName": "login.csv",
- "location": "teams/3/uploaded_files/file_4f132253-b2c2-4c9a-b5f3-816d637cb57d.csv"
}
]
Updates test parameters in the settings set. You can update literal parameters and CSV parameters
api-token required | string API access token |
settingsId required | integer <int64> Unique identifier for the settings set |
Array of objects (UpdateFileDto) CSV parameters | |
Array of objects (VariableSettingSet) Literal parameters |
{- "settingsId": 2,
- "updateFileList": [
- {
- "filename": "login.csv",
- "newFileName": "login_v2.csv",
- "location": "teams/3/uploaded_files/file_4f132253-b2c2-4c9a-b5f3-816d637cb57.csv"
}
], - "variableList": [
- {
- "name": "host",
- "description": "The URL of the testing system"
}
]
}
{- "exceptionMessage": "UNSUPPORTED_SETTING_MODEL_VERSION",
- "description": "Unsupported test settings model version"
}
Gets a list of tests for the team
required | object (Pageable) Paging and sorting settings |
api-token required | string API access token |
curl --request GET \ --url 'https://platform.pflb.us/public-api/v1/test?page=0&size=2&sort=name%2Cdesc' \ --header 'api-token: API access token'
{- "exceptionMessage": "INVALID_TOKEN",
- "description": "Invalid jwt token"
}
Creates a test based on the JMeter script
testName required | string The name of the new test |
comment | string The test version comment |
api-token required | string API access token |
jmx | string <binary> JMeter script file |
file | Array of strings <binary> List of the supporting files |
curl --request POST \ --url 'https://platform.pflb.us/public-api/v1/test/jmx?testName=JMX-test&comment=Add%20timer' \ --header 'Content-Type: multipart/form-data' \ --header 'api-token: API access token' \ --form 'jmx=@/home/csv/csv.jmx' \ --form 'file=@/home/csv/params.csv'
{- "id": 2,
- "name": "JMX test",
- "lastModified": "2019-08-24T14:15:22Z",
- "labelSet": [
- {
- "label": "string",
- "color": "string"
}
]
}
Creates a test run and submits it for starting
api-token required | string API access token |
testId required | integer <int64> Unique identifier for the test |
testVersionId | integer <int64> Unique identifier for the test’s version. If the parameter isn’t specified, a the latest test’s version will run |
comment | string Comment for the test run |
testMode | string Default: "TEST" Enum: "TEST" "DEBUG_TEST" Test run mode |
inheritLabelsFromTest | boolean Default: true If true then copy labels from the test to the new test run. True by default |
{- "testId": 3,
- "testVersionId": 47,
- "comment": "string",
- "testMode": "TEST",
- "inheritLabelsFromTest": true
}
{- "id": 339,
- "testId": 3,
- "testVersionId": 11,
- "testMode": "TEST",
- "state": "CREATED",
- "displayState": "FINISHED",
- "userId": 2,
- "teamId": 2,
- "createDate": "2019-08-24T14:15:22Z",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "comment": "string",
- "labelSet": [
- {
- "label": "string",
- "color": "string"
}
]
}
Gets SLA result for the test run
testRunId required | integer <int64> Example: testRunId=357 Unique identifier for the test run |
api-token required | string API access token |
curl --location --request GET 'https://platform.pflb.us/public-api/v1/testRun/sla?testRunId=304' \ --header 'api-token: API access token'
{ "testRunId": 357, "testResultSlaState": "FINISHED", "slaResults": { "slaGroupList": [ { "type": "GENERAL_TEST_SLA", "targetType": "TEST", "slaList": [ { "restrictionType": "AVERAGE", "fromDate": 0, "toDate": 90, "operation": "LESS_EQUALS", "value": 2, "result": 0.19, "status": "SUCCESS" } ] } ], "status": "SUCCESS" } }
Creates test version and updates parameters
api-token required | string API access token |
id required | integer <int64> Unique identifier for the test |
versionId | integer <int64> Unique identifier for the test’s version. If the parameter isn’t specified, a the latest test’s version will use |
Array of objects (UpdateFileDto) | |
Array of objects (VariableTest) | |
comment | string Comment for the test version |
{- "id": 3,
- "versionId": 47,
- "updateFileList": [
- {
- "filename": "login.csv",
- "newFileName": "login_v2.csv",
- "location": "teams/3/uploaded_files/file_4f132253-b2c2-4c9a-b5f3-816d637cb57.csv"
}
], - "variableList": [
- {
- "name": "host",
- "description": "The URL of the testing system"
}
], - "comment": "string"
}
{ "id": 8, "testId": 3, "settingsId": 2, "createdOn": "2024-05-07T12:12:58.582Z", "comment": "string", "contentModelVersion": "1.0.0", "testType": "STABLE", "requestCount": 3, "totalDuration": 300, "versionNumber": 2 }