Skip to content

TestSpacesCRUD

Create test space

Attempt to create a test space

Request

post /test-spaces/

Request body

Attribute Type Required Notes
name string yes defines the name of a test space, length 1-50 characters
projectId object yes object containing integer that defines the id of the project that the test space is assigned to
creatorId object no object containing integer that defines the id of the test space creator

Request body example

{
  "name": "test",
  "projectId": {
    "id": 1
  },
  "creatorId": {
    "id": 1
  }
}
curl --location 'https://example.juno.one/test-spaces' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'x-tenantId: example' \
--header 'Content-Type: application/json' \
--data '{
  "name": "test",
  "projectId": {
    "id": 1
  },
  "creatorId": {
    "id": 1
  }
}'
import requests
import json

url = "https://example.juno.one/test-spaces"

payload = json.dumps({
  "name": "test",
  "projectId": {
    "id": 1
  },
  "creatorId": {
    "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  \"name\": \"test\",\n  \"projectId\": {\n    \"id\": 1\n  },\n  \"creatorId\": {\n    \"id\": 1\n  }\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/test-spaces")
  .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 space create has the status 200 with following response body:

{
  "id": 1,
  "name": "test",
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "projectId": {
    "id": 13,
    "name": "test",
    "test_case_robust": true
  },
  "deleted": true,
  "deleted_at": "2023-03-16T10:17:04.000Z",
  "created_at": "2023-03-16T10:17:04.000Z",
  "updated_at": "2023-03-16T10:17:04.000Z"
}

400 Bad Request

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

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": "/test-spaces"
}

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": "/test-spaces"
}

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" : "/test-spaces"
}

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" : "/test-spaces",
}

Find test space

Attempt to find a test space specified by an id

Request

get /test-spaces/{id}

Parameters

Parameter Type Required Notes
id Path yes defines the id of a test space

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/test-spaces/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'X-tenantId: example'
import requests

url = "https://example.juno.one/test-spaces/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/test-spaces/2")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantId", "example")
  .build()
val response = client.newCall(request).execute()

Response

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

{
  "id": 1,
  "name": "test",
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "projectId": {
    "id": 13,
    "name": "test",
    "test_case_robust": true
  },
  "deleted": true,
  "deleted_at": "2023-03-16T10:17:04.000Z",
  "created_at": "2023-03-16T10:17:04.000Z",
  "updated_at": "2023-03-16T10:17:04.000Z"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test space with id 2 was not found.",
    "path": "/test-spaces/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": "/test-spaces/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": "/test-spaces/2"
}

Find test space by project id

Attempt to find a test space specified by a project id

Request

get /test-spaces/by-project-id/{ProjectId}

Parameters

Parameter Type Required Notes
projectId Path yes defines the id of project

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/test-spaces/by-project-id/13' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'X-tenantID: example'
import requests

url = "https://example.juno.one/test-spaces/by-project-id/13"

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/test-spaces/by-project-id/13")
  .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 space by project id has the status 200 with following response body:

[
  {
    "id": 1,
    "name": "test",
    "creatorId": {
      "id": 2,
      "firstname": "test",
      "lastname": "test",
      "email": "test@juno.one",
      "avatar": "9",
      "deleted": false
    },
    "projectId": {
      "id": 13,
      "name": "test",
      "test_case_robust": true
    },
    "deleted": true,
    "deleted_at": "2023-03-16T10:17:04.000Z",
    "created_at": "2023-03-16T10:17:04.000Z",
    "updated_at": "2023-03-16T10:17:04.000Z"
  }
]

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": "/test-spaces/by-project-id/13"
}

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": "/test-spaces/by-project-id/13"
}

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": "/test-spaces/by-project-id/13"
}

Update test space

Attempt to update the information of a test space specified by an id

Request

put /test-spaces/{id}

Parameters

Parameter Type Required Notes
id Path yes defines the id of test space

Request body

Attribute Type Required Notes
name string no defines the name of a test space
creatorId object no object containing integer that defines the id of the test space creator

Request body example

{
  "name": "test",
  "creatorId": {
    "id": 1
  }
}
curl --location --request PUT 'https://example.juno.one/test-space/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-TenantId: example'
import requests

url = "https://example.juno.one/test-space/2"

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

response = requests.request("PUT", 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/test-space/2")
  .put(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 space update has the status 200 with following response body:

{
  "id": 1,
  "name": "test",
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "projectId": {
    "id": 13,
    "name": "test",
    "test_case_robust": true
  },
  "deleted": true,
  "deleted_at": "2023-03-16T10:17:04.000Z",
  "created_at": "2023-03-16T10:17:04.000Z",
  "updated_at": "2023-03-16T10:17:04.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": "/test-spaces/2"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test space with id 2 was not found.",
    "path": "/test-spaces/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": "/test-spaces/2"
}

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" : "/test-spaces/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" : "/test-spaces/2"
}

Delete test space

Attempt to delete a test space specified by an id

Request

delete /test-spaces/{id}

Parameters

Parameter Type Required Notes
id Path yes defines the id of a test space

Request body

This endpoint does not have a request body


curl --location --request DELETE 'https://example.juno.one/test-spaces/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'x-tenantId: example'
import requests

url = "https://example.juno.one/test-spaces/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/test-spaces/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 space delete has the status 200 with following response body:

{
  "id": 1,
  "name": "test",
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "projectId": {
    "id": 13,
    "name": "test",
    "test_case_robust": true
  },
  "deleted": true,
  "deleted_at": "2023-03-16T10:17:04.000Z",
  "created_at": "2023-03-16T10:17:04.000Z",
  "updated_at": "2023-03-16T10:17:04.000Z"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test space with id 2 was not found.",
    "path": "/test-spaces/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": "/test-spaces/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": "/test-spaces/2"
}

Undelete test space

Attempt to undelete a test space specified by an id

Request

delete /test-spaces/undelete/{id}

Parameters

Parameter Type Required Notes
id Path yes defines the id of a test space

Request body

This endpoint does not have a request body


curl --location --request DELETE 'https://example.juno.one/test-spaces/undelete/2' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'x-tenantId: example'
import requests

url = "https://example.juno.one/test-spaces/undelete/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/test-spaces/undelete/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 space undelete has the status 200 with following response body:

{
  "id": 1,
  "name": "test",
  "creatorId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "projectId": {
    "id": 13,
    "name": "test",
    "test_case_robust": true
  },
  "deleted": true,
  "deleted_at": "2023-03-16T10:17:04.000Z",
  "created_at": "2023-03-16T10:17:04.000Z",
  "updated_at": "2023-03-16T10:17:04.000Z"
}

404 Not found

{
    "timestamp": "2022-02-16T17:11:34.422+00:00",
    "status": 404,
    "error": "Not Found",
    "message": "Test space with id 2 was not found.",
    "path": "/test-spaces/undelete/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": "/test-spaces/undelete/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": "/test-spaces/undelete/2"
}