RedLine13 OpenAPI (2023)

After having to interface with RedLine13 and suffer with their weird, outdated swagger docs, I’ve generated a compliant OpenAPI 3.0.1 spec for their api, which I used for generating a client via openapi-codegen. Keep in mind that I only needed their GET endpoints, so those are the only ones I tested.

openapi: 3.0.1
info:
title: RedLine13 API
description: Cloud Load Testing
termsOfService: 'https://www.redline13.com/ApiDoc'
license:
name: Contract
url: 'https://www.redline13.com/blog/about-redline13/contract/'
contact:
name: 'RedLine13, LLC'
email: info@redline13.com
url: 'https://www.redline13.com/blog/about-redline13/'
version: 1.0.0
servers:
– url: 'https://www.redline13.com/Api'
description: RedLine13 API Endpoint
security:
– api_key: []
tags:
– name: Search
description: Search related API
– name: LoadTest
description: Operations on a load test
– name: Metrics
description: Query for metrics
– name: Error
description: Query for execution errors
– name: Create
description: Create load tests
– name: Delete
description: Cancel or delete running tests
paths:
/loadTest:
get:
tags:
– Search
summary: Searching for load tests.
description: |
Finding tests within your individual or team account.
parameters:
– name: state
in: query
description: 'Limit results to running, completed, templates, any(default)'
schema:
type: string
enum:
– running
– completed
– templates
– any
default: any
– name: name
in: query
description: Search for test which contains name
schema:
type: string
– name: start
in: query
description: 'Any date/time string which can be parsed supporting common formats such as find tests after ''10/25/2016 05:00'''
schema:
type: string
format: date-time
– name: end
in: query
description: 'Any date/time string which can be parsed supporting common formats such as find tests before ''10/25/2016 05:00'''
schema:
type: string
format: date-time
– name: loadTestId
in: query
description: Limit result to specific load test id.
schema:
type: integer
format: int64
– name: page
in: query
description: Results are by default paged in the response based on the count in the request.
schema:
type: integer
– name: count
in: query
description: 'Number of results per request, min 1, max 50, default 10.'
schema:
maximum: 50
minimum: 1
type: integer
responses:
'200':
description: Array of load tests
content:
application/json:
schema:
type: array
items:
type: object
properties:
load_test_id:
type: integer
description: load test id.
load_test_name:
type: string
description: Name of load test
load_test_desc:
type: string
description: Description of load test provided on load test start
load_test_comments:
type: string
description: Comments provided on load test
created_time:
type: string
description: 'Date/Time the test was created YYYY-MM-DD hh:mm:ss'
start_time:
type: string
description: 'Date/Time the test was started (agents ready) YYYY-MM-DD hh:mm:ss'
completed_time:
type: string
description: 'Date/Time the test was completed (if test was not cancelled) YYYY-MM-DD hh:mm:ss'
cancelled_time:
type: string
description: 'Date/Time the test was cancelled (if test did not complete) YYYY-MM-DD hh:mm:ss'
avg_resp_time:
type: number
description: Generic average response time for all requests
success_rate:
type: integer
description: The success rate determined for overall test plan
cancellation_message:
type: string
description: If test was cancelled message would be provided
is_public:
type: string
description: If the test was marked publicly shared
operationId: Get-LoadTest
delete:
tags:
– Delete
description: 'This API allows you to cancel or delete a load test. If the test is not finished, it will be cancelled, otherwise deleted.'
operationId: Delete-LoadTest
parameters:
– name: loadTestId
in: query
description: ID of load test
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
summary: Cancel a running or Delete previous load test.
parameters: []
post:
tags:
– Create
summary: Start a new load test
description: This API allows you to start any load test.
operationId: Post-LoadTest
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
loadTestId:
type: string
description: Generated Load Test ID.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LoadTest'
/StatsDownloadUrls:
get:
tags:
– LoadTest
summary: Get the list of stats files available for download.
description: |
This API allows you to get download URLs for load test stats. Stats
URLs are not available until the test has completed. Returns a hash of
download URL, including
* serverStats — CSV of the stats per server.
* avgRespTime — CSV of the average response time per second.
* avgRespTimePerPage — CSV of the average response time per page per second.
* cpuUsage — CSV of the CPU usage per server per second.
* netIn — CSV of the network bytes in per second.
* netOut — CSV of the network bytes out per second.
* memFree — CSV of free memory in KB per second.
* diskAvail — CSV of free disk space in KB per second.
* report — Link to either merged JTL or gatling generated report
* outputFiles — Array of objects for each test agent with a link to the output tar file.
parameters:
– name: loadTestId
in: query
description: ID of load test
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Object with details of all result files available.
content:
application/json:
schema:
type: object
properties:
serverStats:
type: string
description: CSV link to server stats
avgRespTime:
type: string
description: CSV link to average response time.
avgRespTimePerPage:
type: string
description: CSV link to average response time per endpoint.
cpuUsage:
type: string
description: CSV link to CPU stats per server.
netIn:
type: string
description: CSV link to Network bytes In.
netOut:
type: string
description: CSV link to Network bytes Out.
memFree:
type: string
description: CSV link to free memory in KB.
diskAvail:
type: string
description: CSV link to free disk space in KB.
report:
type: string
description: 'link to report file, ie merged JTL for JMeter or report file for Gatling.'
outputFiles:
type: array
description: 'The output files for each servers in the test, including report files..'
items:
type: object
properties:
url:
type: string
description: URL for zip of server output
format: uri
serverId:
type: integer
description: server id for this output
operationId: Get-StatsDownloadUrls
parameters: []
/Metrics:
get:
tags:
– Metrics
summary: Query for individual metric data within a test.
description: 'Retrieve metrics for a given test.<br/> The results will be an array as described, where each endpoint will have a data field with the results in the requested format.<br/><br/> Required fields are <br/> Load Test ID – The primary load test to query for. <br/> Filter – full name or partial for searching for labels or urls in your test.'
parameters:
– name: loadTestId
in: query
description: ID of load test
required: true
schema:
type: integer
format: int64
– name: filter
in: query
description: 'Name of the label or URL, can be partial. No wildcards. Either filter or hash are required.'
schema:
type: string
– name: hash
in: query
description: 'HashID of the URL to find, returns only single item in array.'
schema:
type: string
– name: format
in: query
description: 'csv, xy, default – Format for results within data field.'
schema:
type: string
responses:
'200':
description: Metric Results for default type.
content:
application/json:
schema:
type: array
items:
title: Metric
type: object
properties:
hash:
type: string
description: identifier for label or url.
label:
type: string
description: URL or Label for endpoint
data:
title: data
type: object
properties:
overview:
title: Overview Data
type: object
properties:
avgLoadTime:
type: number
description: Average load time across the test.
count:
type: number
description: Total number of succesful requests or users.
downloadSize:
type: number
description: Bytes downloaded for success requests.
errAvgLoadTime:
type: number
description: Average load time across the test for errors.
errCount:
type: number
description: Total number of failed requests or users.
errDownloadSize:
type: number
description: Bytes downloaded for failed requests.
range:
type: number
description: 'Number of groups of data points, ie seconds or minutes data was captured for.'
description: Summary of test data
labels:
type: array
description: Each data point X label
items:
type: number
pageRespTimePerSec:
type: array
description: For each time period avage response time on completion
items:
type: number
pageReqPerSec:
type: array
description: For each time period number completing
items:
type: number
pageKbPerSec:
type: array
description: For each time period data downloaded
items:
type: number
pageErrRespTime:
type: array
description: For each time period avage response time on failed
items:
type: number
pageErrCount:
type: array
description: For each time period number failing
items:
type: number
pageErrKb:
type: array
description: For each time period data downloaded for failed requests
items:
type: number
description: 'Data response specific to format, below is default.'
operationId: Get-Metrics
parameters: []
/Percentiles:
get:
tags:
– Metrics
summary: Query for percentiles of completed tests.
description: 'Retrieve percentiles for selected tests and endpoints.<br/> The results will be an array as described, where each test,endpoint will have a row.<br/><br/> Required fields are <br/> Load Test ID – The primary load test to query for. <br/> '
parameters:
– name: loadTestId
in: query
description: IDs of load test separated by strings
required: true
schema:
type: string
– name: filter
in: query
description: 'Name of the label or URL, can be partial. No wildcards. Either filter or hash are required. Example filter=google.com'
schema:
type: string
– name: p
in: query
description: 'Which percentiles to return, if not requested all percentiles for selected load test are return. Example p=90,95,99.'
schema:
type: string
responses:
'200':
description: 'Percentile Results array of [ testId, endpoint, P0, P1, …, P99, P100.'
content:
application/json:
schema:
x-examples:
Example 1:
– – '33'
– 'https://www.google.com/&#39;
– 0.9475
– 0.982
– 0.982
– – '33'
– 'https://www.google.com/async/bgasy&#39;
– 0.1535
– 0.154
– 0.154
– – '33'
– 'https://www.google.com/client_204&#39;
– 0.144
– 0.145
– 0.145
type: array
items:
type: array
items:
anyOf:
– type: number
– type: string
examples:
Example 1:
value:
– – '33'
– 'https://www.google.com/&#39;
– 0.9475
– 0.982
– 0.982
– – '33'
– 'https://www.google.com/async/bgasy&#39;
– 0.1535
– 0.154
– 0.154
– – '33'
– 'https://www.google.com/client_204&#39;
– 0.144
– 0.145
– 0.145
operationId: Get-Percentiles
parameters: []
/Errors:
get:
summary: Query errors for a test.
description: This API allows you to get errors for a load test.
parameters:
– name: loadTestId
in: query
description: ID of load test
required: true
schema:
type: integer
format: int64
– name: limit
in: query
description: 'Max number of errors (max 1,000)'
required: true
schema:
type: integer
format: int64
responses:
'200':
description: Error messages.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
operationId: Get-Errors
tags:
– Error
parameters: []
/Share:
post:
operationId: Post-Share
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
access:
$ref: '#/components/schemas/access'
url:
type: string
format: uri
description: Link to shared test if marked public access
summary: Set if a test is shareable and get share link.
description: |-
This API allows you to make the load test shareable or private.
It returns the updated access and a share link, which is only usable if the test is marked shareable.
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
access:
$ref: '#/components/schemas/access'
loadTestId:
type: string
description: ID of load test.
components:
securitySchemes:
api_key:
type: apiKey
description: All API calls required a header X-Redline-Auth with account level API key.
name: X-Redline-Auth
in: header
schemas:
access:
title: access
type: string
enum:
– public
– private
Error:
title: Error
type: object
properties:
error_msg:
type: string
description: Error message
error_count:
type: integer
format: int64
description: Number of times the error was seen
BaseLoadTest:
allOf:
– type: object
properties:
name:
type: string
description:
type: string
storeOutput:
$ref: '#/components/schemas/WeirdBoolean'
testType:
type: string
enum:
– simple
– custom-test
– jmeter-test
– gatling-test
– replay
required:
– name
– description
– storeOutput
– testType
– $ref: '#/components/schemas/CloudParams'
WeirdBoolean:
title: WeirdBoolean
type: string
enum:
– T
– F
SimpleLoadTest:
title: SimpleLoadTest
allOf:
– type: object
properties:
url:
type: string
format: uri
description: 'The URL to test. Be sure to include http:// or https://.&#39;
numUsers:
type: integer
description: Number of users to simulate in the test. This must equal the sum of the total users specified on a per server basis.
numIterations:
type: integer
description: Number of iterations that each user will simulate.
rampUpSec:
type: integer
description: Ramp up time in seconds.
minDelayMs:
type: integer
format: int64
description: Minimum delay in milliseconds before loading the URL for reach request.
maxDelayMs:
type: integer
format: int64
description: Maximum delay in milliseconds before loading the URL for reach request.
loadResources:
$ref: '#/components/schemas/WeirdBoolean'
params:
type: array
items:
type: object
properties:
type:
type: string
enum:
– get
– post
– body
– header
name:
type: string
val:
type: string
mime:
type: string
example: application/json
required:
– type
– val
– mime
testType:
type: string
enum:
– simple
required:
– url
– numUsers
– numIterations
– minDelayMs
– maxDelayMs
– testType
– $ref: '#/components/schemas/BaseLoadTest'
JMeterLoadTest:
title: JMeterLoadTest
allOf:
– $ref: '#/components/schemas/BaseLoadTest'
– type: object
properties:
file:
type: string
description: Raw file contents of JMeter test.
extras:
type: array
description: 'Raw file contents of extra files. In curl this would be -F extras[]=@/path/to/file. You can add multiple files.'
items:
type: string
split:
type: array
description: |-
For each item list the filename (not the path) from extras[] which you would like
Expanded: If the file name ends with .tar, .tgz, .gz, or .zip this will cause the file to expand before the load test is started.
Split: Any other filename will be split across all the test servers. Usually used for splitting CSV files. We currently split the file evenly and do not support a header line.
<a href="https://www.redline13.com/blog/extra-files-support-split-and-expand/">Blog post</a>
items:
type: string
enum:
– split
– expand
numServers:
type: integer
description: Number of servers to use in the test. This must equal the sum of the total servers specified on a per server basis.
version:
type: string
enum:
– nightly
– '2.13'
– '3.3'
– '4.0'
– '5.0'
– 5.2.1
– '5.3'
– 5.4.1
– '5.5'
opts:
type: string
description: Specify JMeter Options as -Jkey=value -Jkey=value
jvm_args:
type: string
description: Specify JVM Options such as -Xms256m -Xmx256m
plugin:
type: array
description: 'Array of plugin names. plugin[0], plugin[1], etc.'
items:
type: string
webdriver-width:
type: integer
description: 'if webdriver plugin is enabled, Screen Width for simulated browser'
webdriver-height:
type: integer
description: 'if webdriver plugin is enabled, Screen Height for simulated browser'
webdriver-depth:
type: integer
description: 'if webdriver plugin is enabled, Screen Depth for simulated browser'
testType:
type: string
enum:
– jmeter-test
required:
– file
– numServers
– version
– testType
GatlingLoadTest:
title: GatlingLoadTest
allOf:
– $ref: '#/components/schemas/BaseLoadTest'
– type: object
properties:
file:
type: string
description: Raw file contents of GatLing test.
extras:
type: array
description: 'Raw file contents of extra files. In curl this would be -F extras[]=@/path/to/file. You can add multiple files.'
items:
type: string
split:
type: array
description: |-
For each item list the filename (not the path) from extras[] which you would like
Expanded: If the file name ends with .tar, .tgz, .gz, or .zip this will cause the file to expand before the load test is started.
Split: Any other filename will be split across all the test servers. Usually used for splitting CSV files. We currently split the file evenly and do not support a header line.
<a href="https://www.redline13.com/blog/extra-files-support-split-and-expand/">Blog post</a>
items:
type: string
enum:
– split
– expand
numServers:
type: integer
description: Number of servers to use in the test. This must equal the sum of the total servers specified on a per server basis.
version:
type: string
enum:
– 3.3.1
– 3.4.1
– 3.8.3
– latest
opts:
type: string
description: Specify Options as -Dkey=value -Dkey=value
plugin:
type: array
description: 'Array of plugin names. plugin[0], plugin[1], etc.'
items:
type: string
testType:
type: string
enum:
– gatling-test
required:
– file
– numServers
– testType
CustomLoadTest:
title: CustomLoadTest
allOf:
– $ref: '#/components/schemas/BaseLoadTest'
– type: object
properties:
file:
type: string
description: Raw file contents of custom test.
extras:
type: array
description: 'Raw file contents of extra files. In curl this would be -F extras[]=@/path/to/file. You can add multiple files.'
items:
type: string
split:
type: array
description: |-
For each item list the filename (not the path) from extras[] which you would like
Expanded: If the file name ends with .tar, .tgz, .gz, or .zip this will cause the file to expand before the load test is started.
Split: Any other filename will be split across all the test servers. Usually used for splitting CSV files. We currently split the file evenly and do not support a header line.
<a href="https://www.redline13.com/blog/extra-files-support-split-and-expand/">Blog post</a>
items: {}
numUsers:
type: integer
description: Number of users to simulate in the test. This must equal the sum of the total users specified on a per server basis.
loadResources:
$ref: '#/components/schemas/WeirdBoolean'
lang:
type: string
enum:
– php
– python
– nodejs
description: Programming language to use.
plugin:
type: array
description: 'Array of plugin names. plugin[0], plugin[1], etc.'
items: {}
testType:
type: string
enum:
– custom-test
required:
– file
– numUsers
– lang
– testType
ReplayLoadTest:
title: ReplayLoadTest
allOf:
– $ref: '#/components/schemas/BaseLoadTest'
– type: object
properties:
file:
type: string
description: Raw file contents of LOG file.
log_format:
type: string
description: The log file pattern
example: '''%h %l %u %t "%r" %>s %'
numUsers:
type: integer
description: Number of users to simulate in the test. This must equal the sum of the total users specified on a per server basis.
url:
type: string
format: uri
description: Specify Base URL for log file replay.
numIterations:
type: integer
description: Number of iterations that each user will simulate.
rampUpSec:
type: integer
description: Ramp up time in seconds.
minDelayMs:
type: integer
format: int64
description: Minimum delay in milliseconds before loading the URL for reach request.
maxDelayMs:
type: integer
format: int64
description: Maximum delay in milliseconds before loading the URL for reach request.
loadResources:
$ref: '#/components/schemas/WeirdBoolean'
testType:
type: string
enum:
– replay
required:
– file
– numUsers
– numIterations
– minDelayMs
– maxDelayMs
– testType
CloudParams:
title: CloudParams
oneOf:
– properties:
keyPairId:
type: string
description: Key pair ID. This ID can be found <a href="/AWS/Keys"> here </a> once you have a key setup.
servers:
type: array
description: This field is an array of server details. Note that you can only post one row for each location/size pair.
items:
type: object
properties:
location:
type: string
enum:
– us-east-1
– us-west-1
– us-west-2
– eu-west-1
– eu-central-1
– sa-east-1
– ap-southeast-1
– ap-southeast-2
– ap-northeast-1
– ap-northeast-2
– ap-south-1
– us-east-2
– ca-central-1
– eu-west-2
– eu-west-3
– eu-north-1
– ap-east-1
– me-south-1
– af-south-1
– eu-south-1
– ap-south-2
– ap-southeast-3
– ap-southeast-4
description: Server location.
size:
type: string
enum:
– t2.nano
– t2.micro
– t2.small
– t2.medium
– t2.large
– t2.xlarge
– t2.2xlarge
– t3.nano
– t3.micro
– t3.small
– t3.medium
– t3.large
– t3.xlarge
– t3.2xlarge
– m3.medium
– m3.large
– m3.xlarge
– m3.2xlarge
– m4.large
– m4.xlarge
– m4.2xlarge
– m4.4xlarge
– m4.10xlarge
– m4.16xlarge
– m5.large
– m5.xlarge
– m5.2xlarge
– m5.4xlarge
– m5.12xlarge
– m5.24xlarge
– c3.large
– c3.xlarge
– c3.2xlarge
– c3.4xlarge
– c3.8xlarge
– c4.large
– c4.xlarge
– c4.2xlarge
– c4.4xlarge
– c4.8xlarge
– c5.large
– c5.xlarge
– c5.2xlarge
– c5.4xlarge
– c5.9xlarge
– c5.18xlarge
– c5n.large
– c5n.xlarge
– c5n.2xlarge
– c5n.4xlarge
– c5n.9xlarge
– c5n.18xlarge
– r3.large
– r3.xlarge
– r3.2xlarge
– r3.4xlarge
– r3.8xlarge
– r4.large
– r4.xlarge
– r4.2xlarge
– r4.4xlarge
– r4.8xlarge
– r4.16xlarge
– r5.large
– r5.xlarge
– r5.2xlarge
– r5.4xlarge
– r5.12xlarge
– r5.24xlarge
– i2.xlarge
– i2.2xlarge
– i2.4xlarge
– i2.8xlarge
– x1.16xlarge
– x1.32xlarge
– m6i.large
– m6i.xlarge
– m6i.2xlarge
– m6i.4xlarge
– m6i.8xlarge
– m6i.12xlarge
– m6i.16xlarge
– m6i.24xlarge
– m6i.32xlarge
– c6i.large
– c6i.xlarge
– c6i.2xlarge
– c6i.4xlarge
– c6i.8xlarge
– c6i.12xlarge
– c6i.16xlarge
– c6i.24xlarge
– c6i.32xlarge
– r6i.large
– r6i.xlarge
– r6i.2xlarge
– r6i.4xlarge
– r6i.8xlarge
– r6i.12xlarge
– r6i.16xlarge
– r6i.24xlarge
– r6i.32xlarge
description: Server size. Please note that not all sizes are available in all locations.
num:
type: integer
description: Number of servers to start in this location and size.
onDemand:
$ref: '#/components/schemas/WeirdBoolean'
maxPrice:
type: number
description: 'If using spot instances, the maximum spot price bid.'
usersPerServer:
type: integer
description: 'Number of users per server, only relevant for Custom and Simple when not even separation.'
volumeSize:
type: integer
description: Optional disk size.
subnetId:
type: string
description: Optional subnet ID.
associatePublicIpAddress:
$ref: '#/components/schemas/WeirdBoolean'
securityGroupIds:
type: string
description: Optional security group IDs separated by commas.
required:
– location
– size
– num
required:
– keyPairId
– servers
type: object
LoadTest:
title: LoadTest
oneOf:
– $ref: '#/components/schemas/SimpleLoadTest'
– $ref: '#/components/schemas/JMeterLoadTest'
– $ref: '#/components/schemas/GatlingLoadTest'
– $ref: '#/components/schemas/CustomLoadTest'
– $ref: '#/components/schemas/ReplayLoadTest'
discriminator:
propertyName: testType
mapping:
simple: '#/components/schemas/SimpleLoadTest'
custom-test: '#/components/schemas/CustomLoadTest'
jmeter-test: '#/components/schemas/JMeterLoadTest'
gatling-test: '#/components/schemas/GatlingLoadTest'
replay: '#/components/schemas/ReplayLoadTest'

Published by

Leave a comment