Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robingustafsson/23efce6e18d9a89b1bf38abeeddb46b1 to your computer and use it in GitHub Desktop.
Save robingustafsson/23efce6e18d9a89b1bf38abeeddb46b1 to your computer and use it in GitHub Desktop.
Load Impact API Postman Collection
{
"info": {
"_postman_id": "ff119874-c383-48f1-90c7-386a8c5a93f0",
"name": "Load Impact Platform API Reference Documentation",
"description": "\n# Introduction\n\n<img src=\"http://online.swagger.io/validator?url=http://developers.staging.loadimpact.com/swagger.yaml\">\n\nWelcome to the Load Impact Platform API reference documentation. This documentation should be of interest to anyone who wishes to use or build upon the Load Impact performance testing platform.\nThis API gives you programmatic access to the same set of features used to power the service at [app.loadimpact.com](https://app.loadimpact.com/).\nIn practice, this means you can start tests, retrieve details of tests, and more.\n\nYou can find a postman collection of Load Impact Platform API reference documentation <a href=\"/loadimpact_api_docs_collection.json\"> here </a>.\n\n\n# Versioning\nThis documentation is valid for the latest generation of Load Impact products which use k6 as a load generator with scripting in JavaScript.\n\nThe Load Impact API consists of multiple subsystems, each with it's own versioning. <strong>You will find that some endpoints start with /v2/, some with /v3/, etc</strong>.\nWe plan to keep introducing new versions, but will keep the old ones functional (for a long time).\n\nRegardless of subsystem, all APIs are hosted on `https://api.loadimpact.com/`\n\n### Completeness\nIf you find an API endpoint that you would like to use and is not documented here, please contact us.\nMost Public API endpoints are not listed, but we are happy to continue to document them as needed.\n\n\n### API Documentation for Load Impact's v3.0 (Lua) Product\n<div class=\"magic-block-callout type-warning \">\n <h3>API documentation for v3.0 (Lua) tests</h3>\n <div class=\"callout-body\">\n <p>\n If you are looking for the API for our <strong>Lua</strong> product (previous generation), please refer to the old documentation hosted at http://old-developers.loadimpact.com/.\n </p>\n </div>\n</div>\n\n\n# Authentication\nAuthentication is based on a custom token scheme.\nTo locate your API token go to [app->k6 project->Integrations->User token](https://app.loadimpact.com/account/token).\n\nUsing cURL, your requests must contain the following header:\n\n```bash\ncurl -H \"Authorization: token <YOUR_API_TOKEN_HERE>\" #replace with your token\n```\n\n# Error handling\n\nIf an error occurs, the error will be on the following format:\n\n ```\n {\"error\": {\n \"message\": \"<error text>\",\n \"code\": <int>,\n \"detail_code\": <int>,\n \"field_errors\" {\n \"fieldname1\": [\"error1\", \"error2\", ... ],\n \"fieldname2\": [\"error1\", \"error2\", ...],\n ...\n }\n \"errors\": [\"error1\", \"error2\", ...],\n }\n }\n ```\n\nAll fields are optional except for `message` and `code`.\n\nThe `message` field holds an overall description of the error, and the `code` field is an internal numerical\nidentifier useful when reporting problems to Load Impact support.\n\nThe optional `field_errors` object\nwill have keys named after the data field causing a problem (`fieldname1` and `fieldname2` above\nare just examples) whereas the `errors` array will hold details about any other errors.\n\nThe most common error codes are (not a full list):\n\n | Error Code | Description |\n | ---------- | ----------- |\n | 0 | UNKNOWN |\n | 1 | GENERAL |\n | 2 | VALIDATION |\n | 3 | NOT_FOUND |\n | 4 | NOT_ALLOWED |\n | 5 | NOT_AUTHENTICATED |\n | 6 | AUTHENTICATION_FAILED |\n | 7 | METHOD_NOT_ALLOWED |\n",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "v3",
"item": [
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/v3/organizations",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"v3",
"organizations"
]
},
"description": "Returns a list of organizations associated with the authenticated user along with organization details"
},
"response": []
},
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/v3/organizations/:organization_id",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"v3",
"organizations",
":organization_id"
],
"variable": [
{
"key": "organization_id"
}
]
},
"description": "Returns details for the specified organization"
},
"response": []
},
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/v3/organizations/:organization_id/projects",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"v3",
"organizations",
":organization_id",
"projects"
],
"variable": [
{
"key": "organization_id"
}
]
},
"description": "Returns all projects a user is member of in the specified organization."
},
"response": []
}
],
"description": "Folder for v3"
},
{
"name": "loadtests",
"item": [
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/tests?project_id={{project_id}}&ids[]={{ids[]}}&order_by={{order_by}}&q={{q}}&page={{page}}&page_size={{page_size}}",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"tests"
],
"query": [
{
"key": "project_id",
"value": "{{project_id}}"
},
{
"key": "ids[]",
"value": "{{ids[]}}"
},
{
"key": "order_by",
"value": "{{order_by}}"
},
{
"key": "q",
"value": "{{q}}"
},
{
"key": "page",
"value": "{{page}}"
},
{
"key": "page_size",
"value": "{{page_size}}"
}
]
},
"description": "Returns all tests within a specified project (if project is not specified then default project will be used). You may sort or query the results with the specfied options"
},
"response": []
},
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/tests/:id",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"tests",
":id"
],
"variable": [
{
"key": "id"
}
]
},
"description": "Returns details of a test with the specified ID"
},
"response": []
},
{
"name": "",
"request": {
"method": "PATCH",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/tests/:id",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"tests",
":id"
],
"variable": [
{
"key": "id"
}
]
},
"description": "Partially updates a test in Load Impact. Note: only given fields will be updated."
},
"response": []
},
{
"name": "",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/tests/:id",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"tests",
":id"
],
"variable": [
{
"key": "id"
}
]
},
"description": "Deletes a test in Load Impact with the specified test ID"
},
"response": []
},
{
"name": "",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/tests/:id/start-testrun",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"tests",
":id",
"start-testrun"
],
"variable": [
{
"key": "id"
}
]
},
"description": "Starts a test-run in the Load Impact cloud. It uses the specified test ID, previously retrieved from the create-test endpoint. The test-run will be managed by Load Impact from beginning to end. Testing progress can be seen in the Load Impact's cloud application. From there you can also export and analyze the result."
},
"response": []
},
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/metrics?test_run_id={{test_run_id}}",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"metrics"
],
"query": [
{
"key": "test_run_id",
"value": "{{test_run_id}}"
}
]
},
"description": "Returns all metrics within a specified test run. \nTest run id\\'s can be found from field **test_run_ids** in response of **Read Test** endpoint.\n"
},
"response": []
},
{
"name": "",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "https://api.loadimpact.com/loadtests/v2/series?test_run_id={{test_run_id}}&ids[]={{ids[]}}",
"protocol": "https",
"host": [
"api",
"loadimpact",
"com"
],
"path": [
"loadtests",
"v2",
"series"
],
"query": [
{
"key": "test_run_id",
"value": "{{test_run_id}}"
},
{
"key": "ids[]",
"value": "{{ids[]}}"
}
]
},
"description": "Returns timeseries data for specified **metrics ids** within a specified **test run id**. \nTest run id\\'s can be found from field **test_run_ids** in response of **Read Test** endpoint.\nMetric id\\'s of interested test runs could be found from field **id** in response of **List metrics** endpoint.\n"
},
"response": []
}
],
"description": "Folder for loadtests"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment