Skip to content

TestAnalysisComments

Create comment

Attempt to create a test analysis comment

Request

post /testanalysiscomments

Request body

Attribute Type Required Notes
testAnalysisId integer yes defines the test analysis id
userId object yes object containing id(integer) that defines the user id
description string yes the description of a comment

Request body example

{
  "testAnalysisId": 1,
  "userId": {
    "id": 1
  },
  "description": "description"
}
curl --location 'https://example.juno.one/testanalysiscomments' \
--header 'Content-Type: application/json' \
--data '{
  "testAnalysisId": 1,
  "userId": {
    "id": 1
  },
  "description": "description"
}'
import requests
import json

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

payload = json.dumps({
  "testAnalysisId": 1,
  "userId": {
    "id": 1
  },
  "description": "description"
})
headers = {
  '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  \"testAnalysisId\": 1,\n  \"userId\": {\n    \"id\": 1\n  },\n  \"description\": \"description\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/testanalysiscomments")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

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

{
  "id": 1,
  "userId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "description": "description",
  "deleted": false,
  "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 testAnalysisId parameter",
    "path": "/testanalysiscomments"
}

404 Not found

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

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

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

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

Update comment

Attempt to update a test analysis comment specified by an id

Request

put /testanalysiscomments/{id}

Parameters

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

Request body

Attribute Type Required Notes
description string yes a description of the comment

Request body example

{
    "description": "description"
}
curl --location --request PUT 'https://example.juno.one/testanalysiscomments' \
--header 'Content-Type: application/json' \
--data '{

  "description": "description"
}'
import requests
import json

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

payload = json.dumps({
  "description": "description"
})
headers = {
  '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\n  \"description\": \"description\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://example.juno.one/testanalysiscomments")
  .put(body)
  .addHeader("Content-Type", "application/json")
  .build()
val response = client.newCall(request).execute()

Response

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

{
  "id": 1,
  "userId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "description": "description",
  "deleted": false,
  "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 description parameter",
    "path": "/testanalysiscomments/30"
}

404 Not found

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

Delete comment

Attempt to delete a test analysis comment specified by an id

Request

delete /testanalysiscomments/delete/{id}

Parameters

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

Request body

This endpoint does not have a request body


Request body example

curl --location --request DELETE 'https://example.juno.one/testanalysiscomments/delete/2'
import requests

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

payload = {}
headers = {}

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/testanalysiscomments/delete/2")
  .method("DELETE", body)
  .build()
val response = client.newCall(request).execute()

Response

Successful response of delete test analysis comment has the status 200 with no response body

404 Not found

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

Undelete comment

Attempt to undelete a test analysis comment specified by an id

Request

delete /testanalysiscomments/undelete/{id}

Parameters

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

Request body

This endpoint does not have a request body


Request body example

curl --location --request DELETE 'https://example.juno.one/testanalysiscomments/undelete/2'
import requests

url = "https://example.juno.one/testanalysiscomments/undelete/2"

payload = {}
headers = {}

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/testanalysiscomments/undelete/2")
  .method("DELETE", body)
  .build()
val response = client.newCall(request).execute()

Response

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

{
  "id": 1,
  "userId": {
    "id": 2,
    "firstname": "test",
    "lastname": "test",
    "email": "test@juno.one",
    "avatar": "9",
    "deleted": false
  },
  "description": "description",
  "deleted": false,
  "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": "Comment with id 30 was not found.",
    "path": "/testanalysiscomments/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": "/testanalysiscomments/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": "/testanalysiscomments/undelete/30"
}