---
updatedAt: 2026-05-28T15:59:25.000Z
agentTools:
  projectIndex: https://developers.qase.io/llms.txt
---

# Create test run result

This method allows to create test run result by Run Id.


# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Qase.io TestOps API v1",
    "description": "Qase TestOps API v1 Specification.\n\n## Rate limiting\n\nRequests are rate limited per workspace (shared across all API tokens of the\nworkspace). The exact limit depends on your subscription plan.\n\nEvery response advertises the current limit state through headers:\n\n- `RateLimit` and `RateLimit-Policy` — IETF rate-limit headers describing the\n  active policies and how much of each one is left.\n- `X-RateLimit-Limit` — maximum number of requests allowed in the window.\n- `X-RateLimit-Remaining` — requests left in the current window.\n- `X-RateLimit-Reset` — Unix timestamp at which the window resets.\n\nTwo policies apply at the same time. `rpm` caps the sustained rate over 60\nseconds. `burst` caps a short spike over 10 seconds. A request is served only\nwhen both policies allow it.\n\nExample headers on a served request, for a plan with a 600 rpm limit:\n\n```\nRateLimit-Policy: \"rpm\";q=600;w=60, \"burst\";q=100;w=10\nRateLimit: \"rpm\";r=412;t=37, \"burst\";r=88;t=2\nX-RateLimit-Limit: 100\nX-RateLimit-Remaining: 88\nX-RateLimit-Reset: 1756742400\n```\n\nIn `RateLimit-Policy`, `q` is the quota and `w` is the window in seconds. In\n`RateLimit`, `r` is the requests left and `t` is the seconds until that policy\nfrees a slot.\n\nThe `X-RateLimit-*` headers are a single-number mirror for older clients. They\nreport whichever of the two policies is closer to its limit, so they can show\nthe burst quota while a spike is in progress, as in the example above.\n\nWhen the limit is exceeded the API responds with `429 Too Many Requests`, a\n`Retry-After` header (seconds to wait before retrying), and the body:\n\n```\nRetry-After: 12\n```\n\n```json\n{\n  \"status\": false,\n  \"errorMessage\": \"API rate limit exceeded.\"\n}\n```\n",
    "termsOfService": "https://qase.io/terms",
    "version": "1.0.0",
    "contact": {
      "name": "Qase.io",
      "url": "https://qase.io",
      "email": "support@qase.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://github.com/qase-tms/specs/blob/master/LICENSE"
    }
  },
  "tags": [
    {
      "name": "results"
    }
  ],
  "servers": [
    {
      "url": "https://api.qase.io/v1",
      "description": "The production API server."
    }
  ],
  "paths": {
    "/result/{code}/{id}": {
      "post": {
        "operationId": "create-result",
        "tags": [
          "results"
        ],
        "summary": "Create test run result",
        "description": "This method allows to create test run result by Run Id.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Code"
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResultCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A result.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Response"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "object",
                          "properties": {
                            "case_id": {
                              "type": "integer",
                              "format": "int64"
                            },
                            "hash": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "404": {
            "description": "Not Found."
          },
          "422": {
            "description": "Unprocessable Entity."
          },
          "429": {
            "description": "Too Many Requests."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ResultCreate": {
        "type": "object",
        "properties": {
          "case_id": {
            "type": "integer",
            "format": "int64"
          },
          "case": {
            "type": "object",
            "description": "Could be used instead of `case_id`.",
            "properties": {
              "title": {
                "type": "string"
              },
              "suite_title": {
                "type": "string",
                "nullable": true,
                "description": "Nested suites should be separated with `TAB` symbol."
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "preconditions": {
                "type": "string",
                "nullable": true
              },
              "postconditions": {
                "type": "string",
                "nullable": true
              },
              "layer": {
                "type": "string",
                "description": "Slug of the layer. You can get it in the System Field settings."
              },
              "severity": {
                "type": "string",
                "description": "Slug of the severity. You can get it in the System Field settings."
              },
              "priority": {
                "type": "string",
                "description": "Slug of the priority. You can get it in the System Field settings."
              }
            }
          },
          "status": {
            "type": "string",
            "description": "Can have the following values `passed`, `failed`, `blocked`, `skipped`, `invalid` + custom statuses"
          },
          "start_time": {
            "type": "integer",
            "minimum": 0,
            "nullable": true
          },
          "time": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "minimum": 0,
            "maximum": 31536000
          },
          "time_ms": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "minimum": 0,
            "maximum": 31536000000
          },
          "defect": {
            "type": "boolean",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "stacktrace": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "param": {
            "type": "object",
            "nullable": true,
            "description": "A map of parameters (name => value)",
            "additionalProperties": {
              "type": "string",
              "nullable": false
            }
          },
          "param_groups": {
            "type": "array",
            "description": "List parameter groups by name only. Add their values in the 'param' field",
            "nullable": true,
            "items": {
              "type": "array",
              "description": "A list of parameters in group",
              "items": {
                "type": "string",
                "description": "A name of the parameter"
              }
            }
          },
          "steps": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/TestStepResultCreate"
            }
          },
          "author_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "required": [
          "status"
        ]
      },
      "TestStepResultCreate": {
        "type": "object",
        "properties": {
          "position": {
            "type": "integer",
            "deprecated": true
          },
          "status": {
            "type": "string",
            "enum": [
              "passed",
              "failed",
              "blocked",
              "in_progress"
            ]
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "action": {
            "type": "string"
          },
          "expected_result": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "string",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "description": "Nested steps results may be passed here. Use same structure for them.",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "status"
        ]
      },
      "Response": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "TokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Token"
      }
    },
    "parameters": {
      "Code": {
        "name": "code",
        "in": "path",
        "description": "Code of project, where to search entities.",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 2,
          "maxLength": 10
        }
      },
      "Id": {
        "name": "id",
        "in": "path",
        "description": "Identifier.",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    }
  },
  "security": [
    {
      "TokenAuth": []
    }
  ]
}
````