Skip to content

TestStepCRUD

Create test step

Attempt to create a test step

Request

post /teststep

Request body

Attribute Type Required Notes
creatorId object yes object containing id(integer) that defines the creator
precondition string yes test case precondition
expected_result string no test case expected result
parentId integer yes defines the parent id
position integer no defines the test case position
labels array no array containing id(integer) that defines labels

Request body example

{
  "creatorId": {
    "id": 1
  },
  "precondition": "test",
  "expected_result": "test",
  "parentId": 1,
  "position": 1,
  "labels": [
    {
      "id": 1
    }
  ]
}
curl --location 'https://example.juno.one/teststep' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example' \
--header 'Content-Type: application/json' \
--data '{
  "creatorId": {
    "id": 1
  },
  "precondition": "test",
  "expected_result": "test",
  "parentId": 1,
  "position": 1,
  "labels": [
    {
      "id": 1
    }
  ]
}'
import requests
import json

url = "https://example.juno.one/teststep"

payload = json.dumps({
  "creatorId": {
    "id": 1
  },
  "precondition": "test",
  "expected_result": "test",
  "parentId": 1,
  "position": 1,
  "labels": [
    {
      "id": 1
    }
  ]
})
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n  \"creatorId\": {\n    \"id\": 1\n  },\n  \"precondition\": \"test\",\n  \"expected_result\": \"test\",\n  \"parentId\": 1,\n  \"position\": 1,\n  \"labels\": [\n    {\n      \"id\": 1\n    }\n  ]\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/teststep")
  .post(body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of create test step has the status 200 with following response body:

{
    "id": 116055,
    "creatorId": {
        "id": 1,
        "firstname": "Admin",
        "lastname": "Test",
        "email": "asdfsdfg@sdfgiluh.vzxcv",
        "avatar": null,
        "deleted": false,
        "language": "cs"
    },
    "precondition": "test",
    "expected_result": "test",
    "created_at": "2023-05-11T10:13:14Z",
    "updated_at": "2023-05-11T10:13:14Z",
    "position": 9,
    "deleted": false,
    "deleted_at": null,
    "visible": true,
    "testExecution": null,
    "labels": []
}

400 Bad Request

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "The request is missing creatorId parameter",
    "path": "/teststep"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Creator with id 30 was not found.",
    "path": "/teststep"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep"
}

412 Precondition failed

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 412,
    "error": "Precondition failed",
    "message": "You do not have permission for this action",
    "path" : "/teststep"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path" : "/teststep"
}

Bulk create test step

Attempt to create test steps in bulk

Request

post /teststep/create/bulk

Request body

Attribute Type Required Notes
creatorId object yes object containing id(integer) that defines the creator
precondition string yes test case precondition
expected_result string no test case expected result
parentId integer yes defines the parent id
position integer no defines the test case position
labels array no array containing id(integer) that defines labels

Request body example

[
    {
        "creatorId": {
            "id": 1
        },
        "precondition": "test",
        "expected_result": "test",
        "parentId": 1,
        "position": 1,
        "labels": [
            {
                "id": 1
            }
        ]
    }
]
curl --location 'https://example.juno.one/teststep/create/bulk' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example' \
--header 'Content-Type: application/json' \
--data '[
    {
        "creatorId": {
            "id": 1
        },
        "precondition": "test",
        "expected_result": "test",
        "parentId": 1,
        "position": 1,
        "labels": [
            {
                "id": 1
            }
        ]
    }
]'
import requests
import json

url = "https://example.juno.one/teststep/create/bulk"

payload = json.dumps([
  {
    "creatorId": {
      "id": 1
    },
    "precondition": "test",
    "expected_result": "test",
    "parentId": 1,
    "position": 1,
    "labels": [
      {
        "id": 1
      }
    ]
  }
])
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "[\n    {\n        \"creatorId\": {\n            \"id\": 1\n        },\n        \"precondition\": \"test\",\n        \"expected_result\": \"test\",\n        \"parentId\": 1,\n        \"position\": 1,\n        \"labels\": [\n            {\n                \"id\": 1\n            }\n        ]\n    }\n]".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/teststep/create/bulk")
  .post(body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of bulk create test step has the status 200 with following response body:

[
    {
        "id": 116056,
        "creatorId": {
            "id": 1,
            "firstname": "Admin",
            "lastname": "Test",
            "email": "asdfsdfg@sdfgiluh.vzxcv",
            "avatar": null,
            "deleted": false,
            "language": "cs"
        },
        "precondition": "test",
        "expected_result": "test",
        "created_at": "2023-05-11T10:16:52Z",
        "updated_at": "2023-05-11T10:16:52Z",
        "position": 10,
        "deleted": false,
        "deleted_at": null,
        "visible": true,
        "testExecution": null,
        "labels": []
    }
]

400 Bad Request

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "The request is missing creatorId parameter",
    "path": "/teststep/create/bulk"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Creator with id 30 was not found.",
    "path": "/teststep/create/bulk"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/create/bulk"
}

412 Precondition failed

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 412,
    "error": "Precondition failed",
    "message": "You do not have permission for this action",
    "path": "/teststep/create/bulk"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/teststep/create/bulk"
}

Find test step

Attempt to find a test step specified by an id

Request

get /teststep/{id}

Parameters

Parameter Path/Query Type Required Notes
id path integer yes defines id of test step

Request body

This endpoint does not have a request body


Request body example

curl --location 'https://example.juno.one/teststep/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4Mzg3OTk2Nn0.jMp0CqpwG4uspiWoBZ7gUEEavMtdJkeAdZzaiz3EV8UXTok-4y-81diOy8TuYz9LtDMXMxJytiWKBlMoLc1WoA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/teststep/2"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val request = Request.Builder()
  .url("https://example.juno.one/teststep/2")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of find test step has the status 200 with following response body:

{
  "id": 1,
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "precondition": "test",
  "expected_result": "test",
  "deleted": false,
  "deleted_at": "2020-06-03T00:00:00.000Z",
  "created_at": "2020-06-03T00:00:00.000Z",
  "updated_at": "2020-06-03T00:00:00.000Z",
  "position": 1,
  "visible": false,
  "testExecution": {
    "id": 1,
    "testPlanId": {
      "id": 2,
      "name": "test"
    },
    "testStepId": 1,
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "statusId": {
      "id": 0,
      "name": "test",
      "projectId": {
        "id": 13,
        "name": "test",
        "test_case_robust": true
      },
      "state": 0,
      "color": "#29a745"
    },
    "actual_result": "test",
    "duration": 1,
    "position": 1,
    "batchId": 1,
    "jirraIssueId": "DNTPPJI-1",
    "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
    "created_at": "2023-03-16T10:17:04.000Z",
    "updated_at": "2023-03-16T10:17:04.000Z",
    "related_issues": [
      {
        "id": 2,
        "issueTypeId": {
          "id": 2,
          "name": "test"
        },
        "statusId": {
          "id": 13,
          "name": "test",
          "color": "#29a745",
          "deleted": true,
          "final": true
        },
        "closed": true,
        "deleted": true
      }
    ],
    "related_jira_issues": [
      {
        "id": 2,
        "jiraIssueId": 14,
        "jiraKeyId": "DNTPPJI-1",
        "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
        "closed": true,
        "closed_at": "2023-03-16T12:23:30.000Z",
        "deleted": true,
        "deleted_at": true,
        "created_at": "2023-03-16T12:23:30.000Z",
        "updated_at": "2023-03-16T12:23:30.000Z"
      }
    ]
  },
  "labels": [
    {
      "id": 22,
      "name": "test",
      "previous_name": "prevtest",
      "color": "#c0507e",
      "previous_color": "#c0507e",
      "created_at": "2022-09-05T18:59:37.000Z",
      "updated_at": "2022-09-05T18:59:37.000Z",
      "projectId": 13,
      "gitlabLabelId": 2,
      "deleted": true,
      "deleted_at": "2022-09-05T18:59:37.000Z"
    }
  ]
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test step with id 30 was not found.",
    "path": "/teststep/30"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/30"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path" : "/teststep/30"
}

Find test step by test case id

Attempt to find test step specified by test case id

Request

get /teststep/byparent/{parent_id}

Parameters

Parameter Path/Query Type Required Notes
parent_id path integer yes defines id of parent test case

Request body

This endpoint does not have a request body


Request body example

curl --location 'https://example.juno.one/teststep/byparent/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4Mzg3OTk2Nn0.jMp0CqpwG4uspiWoBZ7gUEEavMtdJkeAdZzaiz3EV8UXTok-4y-81diOy8TuYz9LtDMXMxJytiWKBlMoLc1WoA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/teststep/byparent/2"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val request = Request.Builder()
  .url("https://example.juno.one/teststep/byparent/2")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of find test step by test case id has the status 200 with following response body:

[
  {
    "id": 1,
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "precondition": "test",
    "expected_result": "test",
    "deleted": false,
    "deleted_at": "2020-06-03T00:00:00.000Z",
    "created_at": "2020-06-03T00:00:00.000Z",
    "updated_at": "2020-06-03T00:00:00.000Z",
    "position": 1,
    "visible": false,
    "testExecution": {
      "id": 1,
      "testPlanId": {
        "id": 2,
        "name": "test"
      },
      "testStepId": 1,
      "creatorId": {
        "id": 2,
        "firstname": "test",
        "lastname": "test",
        "email": "test@juno.one",
        "avatar": "9",
        "deleted": false
      },
      "statusId": {
        "id": 0,
        "name": "test",
        "projectId": {
          "id": 13,
          "name": "test",
          "test_case_robust": true
        },
        "state": 0,
        "color": "#29a745"
      },
      "actual_result": "test",
      "duration": 1,
      "position": 1,
      "batchId": 1,
      "jirraIssueId": "DNTPPJI-1",
      "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
      "created_at": "2023-03-16T10:17:04.000Z",
      "updated_at": "2023-03-16T10:17:04.000Z",
      "related_issues": [
        {
          "id": 2,
          "issueTypeId": {
            "id": 2,
            "name": "test"
          },
          "statusId": {
            "id": 13,
            "name": "test",
            "color": "#29a745",
            "deleted": true,
            "final": true
          },
          "closed": true,
          "deleted": true
        }
      ],
      "related_jira_issues": [
        {
          "id": 2,
          "jiraIssueId": 14,
          "jiraKeyId": "DNTPPJI-1",
          "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
          "closed": true,
          "closed_at": "2023-03-16T12:23:30.000Z",
          "deleted": true,
          "deleted_at": true,
          "created_at": "2023-03-16T12:23:30.000Z",
          "updated_at": "2023-03-16T12:23:30.000Z"
        }
      ]
    },
    "labels": [
      {
        "id": 22,
        "name": "test",
        "previous_name": "prevtest",
        "color": "#c0507e",
        "previous_color": "#c0507e",
        "created_at": "2022-09-05T18:59:37.000Z",
        "updated_at": "2022-09-05T18:59:37.000Z",
        "projectId": 13,
        "gitlabLabelId": 2,
        "deleted": true,
        "deleted_at": "2022-09-05T18:59:37.000Z"
      }
    ]
  }
]

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test case with id 2 was not found.",
    "path": "/teststep/byparent/2"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/byparent/2"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/teststep/byparent/2"
}

Update test step

Attempt to update a test step specified by an id

Request

put /teststep/{id}

Parameters

Parameter Path/Query Type Required Notes
id path integer yes defines the id of a test step

Request body

Attribute Type Required Notes
precondition string no describes the test step precondition
expected_result string no describes the test step expected result

Request body example

{
    "precondition": "test",
    "expected_result": "test"
}
curl --location --request PUT 'https://example.juno.one/teststep/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4Mzg3OTk2Nn0.jMp0CqpwG4uspiWoBZ7gUEEavMtdJkeAdZzaiz3EV8UXTok-4y-81diOy8TuYz9LtDMXMxJytiWKBlMoLc1WoA' \
--header 'X-tenantID: example' \
--header 'Content-Type: application/json' \
--data '{
        "precondition": "test",
        "expected_result": "test"
        }'
import requests
import json

url = "https://example.juno.one/teststep/2"

payload = json.dumps({
  "precondition": "test",
  "expected_result": "test"
})
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example',
  'Content-Type': 'application/json'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n  \"precondition\": \"test\",\n  \"expected_result\": \"test\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/teststep/2")
  .put(body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of test step update has the status 200 with following response body:

{
  "id": 1,
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "precondition": "test",
  "expected_result": "test",
  "deleted": false,
  "deleted_at": "2020-06-03T00:00:00.000Z",
  "created_at": "2020-06-03T00:00:00.000Z",
  "updated_at": "2020-06-03T00:00:00.000Z",
  "position": 1,
  "visible": false,
  "testExecution": {
    "id": 1,
    "testPlanId": {
      "id": 2,
      "name": "test"
    },
    "testStepId": 1,
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "statusId": {
      "id": 0,
      "name": "test",
      "projectId": {
        "id": 13,
        "name": "test",
        "test_case_robust": true
      },
      "state": 0,
      "color": "#29a745"
    },
    "actual_result": "test",
    "duration": 1,
    "position": 1,
    "batchId": 1,
    "jirraIssueId": "DNTPPJI-1",
    "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
    "created_at": "2023-03-16T10:17:04.000Z",
    "updated_at": "2023-03-16T10:17:04.000Z",
    "related_issues": [
      {
        "id": 2,
        "issueTypeId": {
          "id": 2,
          "name": "test"
        },
        "statusId": {
          "id": 13,
          "name": "test",
          "color": "#29a745",
          "deleted": true,
          "final": true
        },
        "closed": true,
        "deleted": true
      }
    ],
    "related_jira_issues": [
      {
        "id": 2,
        "jiraIssueId": 14,
        "jiraKeyId": "DNTPPJI-1",
        "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
        "closed": true,
        "closed_at": "2023-03-16T12:23:30.000Z",
        "deleted": true,
        "deleted_at": true,
        "created_at": "2023-03-16T12:23:30.000Z",
        "updated_at": "2023-03-16T12:23:30.000Z"
      }
    ]
  },
  "labels": [
    {
      "id": 22,
      "name": "test",
      "previous_name": "prevtest",
      "color": "#c0507e",
      "previous_color": "#c0507e",
      "created_at": "2022-09-05T18:59:37.000Z",
      "updated_at": "2022-09-05T18:59:37.000Z",
      "projectId": 13,
      "gitlabLabelId": 2,
      "deleted": true,
      "deleted_at": "2022-09-05T18:59:37.000Z"
    }
  ]
}

400 Bad Request

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "The request is missing id parameter",
    "path": "/teststep/30"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test step with id 30 was not found.",
    "path": "/teststep/30"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/30"
}

412 Precondition failed

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 412,
    "error": "Precondition failed",
    "message": "You do not have permission for this action",
    "path" : "/teststep/30"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path" : "/teststep/30"
}

Delete test step

Attempt to delete a test step specified by an id

Request

delete /teststep/delete/{id}

Parameters

Parameter Path/Query Type Required Notes
id path integer yes defines the id of a test step

Request body

This endpoint does not have a request body


Request body example

curl --location --request DELETE 'https://example.juno.one/teststep/delete/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4Mzg3OTk2Nn0.jMp0CqpwG4uspiWoBZ7gUEEavMtdJkeAdZzaiz3EV8UXTok-4y-81diOy8TuYz9LtDMXMxJytiWKBlMoLc1WoA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/teststep/delete/2"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "text/plain".toMediaType()
val body = "".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/teststep/delete/2")
  .method("DELETE", body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of test step delete has the status 200 with following response body:

{
  "id": 1,
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "precondition": "test",
  "expected_result": "test",
  "deleted": false,
  "deleted_at": "2020-06-03T00:00:00.000Z",
  "created_at": "2020-06-03T00:00:00.000Z",
  "updated_at": "2020-06-03T00:00:00.000Z",
  "position": 1,
  "visible": false,
  "testExecution": {
    "id": 1,
    "testPlanId": {
      "id": 2,
      "name": "test"
    },
    "testStepId": 1,
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "statusId": {
      "id": 0,
      "name": "test",
      "projectId": {
        "id": 13,
        "name": "test",
        "test_case_robust": true
      },
      "state": 0,
      "color": "#29a745"
    },
    "actual_result": "test",
    "duration": 1,
    "position": 1,
    "batchId": 1,
    "jirraIssueId": "DNTPPJI-1",
    "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
    "created_at": "2023-03-16T10:17:04.000Z",
    "updated_at": "2023-03-16T10:17:04.000Z",
    "related_issues": [
      {
        "id": 2,
        "issueTypeId": {
          "id": 2,
          "name": "test"
        },
        "statusId": {
          "id": 13,
          "name": "test",
          "color": "#29a745",
          "deleted": true,
          "final": true
        },
        "closed": true,
        "deleted": true
      }
    ],
    "related_jira_issues": [
      {
        "id": 2,
        "jiraIssueId": 14,
        "jiraKeyId": "DNTPPJI-1",
        "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
        "closed": true,
        "closed_at": "2023-03-16T12:23:30.000Z",
        "deleted": true,
        "deleted_at": true,
        "created_at": "2023-03-16T12:23:30.000Z",
        "updated_at": "2023-03-16T12:23:30.000Z"
      }
    ]
  },
  "labels": [
    {
      "id": 22,
      "name": "test",
      "previous_name": "prevtest",
      "color": "#c0507e",
      "previous_color": "#c0507e",
      "created_at": "2022-09-05T18:59:37.000Z",
      "updated_at": "2022-09-05T18:59:37.000Z",
      "projectId": 13,
      "gitlabLabelId": 2,
      "deleted": true,
      "deleted_at": "2022-09-05T18:59:37.000Z"
    }
  ]
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test step with id 30 was not found.",
    "path": "/teststep/delete/30"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/delete/30"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/teststep/delete/30"
}

Undelete test step

Attempt to undelete a test step specified by an id

Request

delete /teststep/undelete/{id}

Parameters

Parameter Path/Query Type Required Notes
id path integer yes defines the id of a test step

Request body

This endpoint does not have a request body


Request body example

curl --location --request DELETE 'https://example.juno.one/teststep/undelete/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4Mzg3OTk2Nn0.jMp0CqpwG4uspiWoBZ7gUEEavMtdJkeAdZzaiz3EV8UXTok-4y-81diOy8TuYz9LtDMXMxJytiWKBlMoLc1WoA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/teststep/delete/2"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "text/plain".toMediaType()
val body = "".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/teststep/delete/2")
  .method("DELETE", body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of test step undelete has the status 200 with following response body:

{
  "id": 1,
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "precondition": "test",
  "expected_result": "test",
  "deleted": false,
  "deleted_at": "2020-06-03T00:00:00.000Z",
  "created_at": "2020-06-03T00:00:00.000Z",
  "updated_at": "2020-06-03T00:00:00.000Z",
  "position": 1,
  "visible": false,
  "testExecution": {
    "id": 1,
    "testPlanId": {
      "id": 2,
      "name": "test"
    },
    "testStepId": 1,
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "statusId": {
      "id": 0,
      "name": "test",
      "projectId": {
        "id": 13,
        "name": "test",
        "test_case_robust": true
      },
      "state": 0,
      "color": "#29a745"
    },
    "actual_result": "test",
    "duration": 1,
    "position": 1,
    "batchId": 1,
    "jirraIssueId": "DNTPPJI-1",
    "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
    "created_at": "2023-03-16T10:17:04.000Z",
    "updated_at": "2023-03-16T10:17:04.000Z",
    "related_issues": [
      {
        "id": 2,
        "issueTypeId": {
          "id": 2,
          "name": "test"
        },
        "statusId": {
          "id": 13,
          "name": "test",
          "color": "#29a745",
          "deleted": true,
          "final": true
        },
        "closed": true,
        "deleted": true
      }
    ],
    "related_jira_issues": [
      {
        "id": 2,
        "jiraIssueId": 14,
        "jiraKeyId": "DNTPPJI-1",
        "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
        "closed": true,
        "closed_at": "2023-03-16T12:23:30.000Z",
        "deleted": true,
        "deleted_at": true,
        "created_at": "2023-03-16T12:23:30.000Z",
        "updated_at": "2023-03-16T12:23:30.000Z"
      }
    ]
  },
  "labels": [
    {
      "id": 22,
      "name": "test",
      "previous_name": "prevtest",
      "color": "#c0507e",
      "previous_color": "#c0507e",
      "created_at": "2022-09-05T18:59:37.000Z",
      "updated_at": "2022-09-05T18:59:37.000Z",
      "projectId": 13,
      "gitlabLabelId": 2,
      "deleted": true,
      "deleted_at": "2022-09-05T18:59:37.000Z"
    }
  ]
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test step with id 30 was not found.",
    "path": "/teststep/undelete/30"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/undelete/30"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/teststep/undelete/30"
}

Filter test steps

Attempt to filter test steps

Request

post /teststep/junofilter

Request body

Attribute                                            Type Required Notes
testLabels array yes array of objects containing operator and value. operator defines if filter works with "=" or "!=" and value is an integer that defines what is being filtered
projectId integer yes defines project id
testExecStatusFilter array yes array of objects containing operator and value. operator defines if filter works with "=" or "!=" and value is an integer that defines what is being filtered
testAnalysisId integer yes defines test analysis id
deleted boolean no defines if deleted test steps are being filtered
navbar object yes object containing substring (type: string)

Request body example

{
    "testLabels": [
        {
            "operator": "=",
            "value": 1
        }
    ],
    "testExecStatusFilter": [
        {
            "operator": "=",
            "value": 1
        }
    ],
    "projectId": 3,
    "testAnalysisId": 106,
    "deleted": true,
    "navbar": {
        "substring": "string"
    }
}
curl --location 'https://example.juno.one/teststep/junofilter' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example' \
--header 'Content-Type: application/json' \
--data '{
    "testLabels": [
        {
            "operator": "=",
            "value": 1
        }
    ],
    "testExecStatusFilter": [
        {
            "operator": "=",
            "value": 1
        }
    ],
    "projectId": 3,
    "testAnalysisId": 106,
    "deleted": true,
    "navbar": {
        "substring": "string"
    }
}'
import requests
import json

url = "https://example.juno.one/teststep/junofilter"

payload = json.dumps({
  "testLabels": [
    {
      "operator": "=",
      "value": 1
    }
  ],
  "testExecStatusFilter": [
    {
      "operator": "=",
      "value": 1
    }
  ],
  "projectId": 3,
  "testAnalysisId": 106,
  "deleted": True,
  "navbar": {
    "substring": "string"
  }
})
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
  'X-tenantID': 'example',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n    \"testLabels\": [\n        {\n            \"operator\": \"=\",\n            \"value\": 1\n        }\n    ],\n    \"testExecStatusFilter\": [\n        {\n            \"operator\": \"=\",\n            \"value\": 1\n        }\n    ],\n    \"projectId\": 3,\n    \"testAnalysisId\": 106,\n    \"deleted\": true,\n    \"navbar\": {\n        \"substring\": \"string\"\n    }\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/teststep/junofilter")
  .post(body)
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantID", "example")
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of test step junofilter has the status 200 with following response body:

[
  {
    "id": 1,
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "precondition": "test",
    "expected_result": "test",
    "deleted": false,
    "deleted_at": "2020-06-03T00:00:00.000Z",
    "created_at": "2020-06-03T00:00:00.000Z",
    "updated_at": "2020-06-03T00:00:00.000Z",
    "position": 1,
    "visible": false,
    "testExecution": {
      "id": 1,
      "testPlanId": {
        "id": 2,
        "name": "test"
      },
      "testStepId": 1,
      "creatorId": {
        "id": 2,
        "firstname": "test",
        "lastname": "test",
        "email": "test@juno.one",
        "avatar": "9",
        "deleted": false
      },
      "statusId": {
        "id": 0,
        "name": "test",
        "projectId": {
          "id": 13,
          "name": "test",
          "test_case_robust": true
        },
        "state": 0,
        "color": "#29a745"
      },
      "actual_result": "test",
      "duration": 1,
      "position": 1,
      "batchId": 1,
      "jirraIssueId": "DNTPPJI-1",
      "jirraIssueUrl": "https://domain.atlassian.net/browse/DNTPPJI-189",
      "created_at": "2023-03-16T10:17:04.000Z",
      "updated_at": "2023-03-16T10:17:04.000Z",
      "related_issues": [
        {
          "id": 2,
          "issueTypeId": {
            "id": 2,
            "name": "test"
          },
          "statusId": {
            "id": 13,
            "name": "test",
            "color": "#29a745",
            "deleted": true,
            "final": true
          },
          "closed": true,
          "deleted": true
        }
      ],
      "related_jira_issues": [
        {
          "id": 2,
          "jiraIssueId": 14,
          "jiraKeyId": "DNTPPJI-1",
          "jiraLink": "https://domain.atlassian.net/browse/DNTPPJI-189",
          "closed": true,
          "closed_at": "2023-03-16T12:23:30.000Z",
          "deleted": true,
          "deleted_at": true,
          "created_at": "2023-03-16T12:23:30.000Z",
          "updated_at": "2023-03-16T12:23:30.000Z"
        }
      ]
    },
    "labels": [
      {
        "id": 22,
        "name": "test",
        "previous_name": "prevtest",
        "color": "#c0507e",
        "previous_color": "#c0507e",
        "created_at": "2022-09-05T18:59:37.000Z",
        "updated_at": "2022-09-05T18:59:37.000Z",
        "projectId": 13,
        "gitlabLabelId": 2,
        "deleted": true,
        "deleted_at": "2022-09-05T18:59:37.000Z"
      }
    ]
  }
]

400 Bad Request

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "The request is missing projectId parameter",
    "path": "/teststep/junofilter"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Project with id 30 was not found.",
    "path": "/teststep/junofilter"
}

406 Insufficient permision

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 406,
    "error": "Missing permission for action",
    "message": "You do not have a permission for this action",
    "path": "/teststep/junofilter"
}

412 Precondition failed

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 412,
    "error": "Precondition failed",
    "message": "You do not have permission for this action",
    "path": "/teststep/junofilter"
}

500 Unknown error

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 500,
    "error": "Unknown",
    "message": "There was a problem with your request. Please contact your administrator.",
    "path": "/teststep/junofilter"
}