TestSpacesCRUD
Create test space¶
Attempt to create a test space
Request¶
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¶
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
404
Not found
406
Insufficient permision
412
Precondition failed
Find test space¶
Attempt to find a test space specified by an id
Request¶
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
406
Insufficient permision
Find test space by project id¶
Attempt to find a test space specified by a project id
Request¶
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
406
Insufficient permision
Update test space¶
Attempt to update the information of a test space specified by an id
Request¶
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¶
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
404
Not found
406
Insufficient permision
412
Precondition failed
Delete test space¶
Attempt to delete a test space specified by an id
Request¶
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
406
Insufficient permision
Undelete test space¶
Attempt to undelete a test space specified by an id
Request¶
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
406
Insufficient permision