Skip to content

IssueCounters

Issue count by project id

Attempt to count issues specified by a project id.

Request

get /issues/counter/{ProjectId}

Parameters

Parameter Type Path/Query Required Notes
projectId integer path yes defines the project id of an issue
deleted boolean query yes defines if an issue is deleted

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/issues/counter/13?deleted=false' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'X-TenantId: development'
import requests

url = "https://example.juno.one/issues/counter/13?deleted=false"

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/issues/counter/13?deleted=false")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-TenantId", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of issue counter has the status 200 with following response body:

{
    "data": {
        "allOpen": 4,
        "bugs": 3,
        "tasks": 1,
        "closed": 0
    }
}

404 Not found

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

Issue count by project id and status id

Attempt to count issues specified by project id and status id.

Request

get /issues/count-issues/project/{ProjectId}/status/{StatusId}

Parameters

Parameter Type Path/Query Required Notes
projectId integer path yes defines id of project
statusId integer path yes defines id of status

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/issues/count-issues/project/13/status/85' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'X-tenantId: example'
import requests

url = "https://example.juno.one/issues/count-issues/project/13/status/1"

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/issues/count-issues/project/13/status/1")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-tenantId", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of issue count has the status 200 with following response body:

1

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": "/issues/count-issues/project/30/status/1"
}

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": "/issues/count-issues/project/30/status/1"
}

Children counter

Attempt to count children issues specified by an id

Request

get /issues/{id}/count-children

Parameters

Parameter Type Required Notes
id Path yes defines the id of an issue

Request body

This endpoint does not have a request body


curl --location 'https://example.juno.one/issues/13/count-children' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4MjMzOTQwNn0.XWAuQmaKsv5fh60umfYO2gMwtXUjWLWsy6HbDt_fQXV6HPhgQhMkqmmzhWaCXsUP9h-dvKrQowLdqBqHHTYQAA' \
--header 'X-TenantID: example'
import requests

url = "https://example.juno.one/issues/13/count-children"

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/issues/13/count-children")
  .addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
  .addHeader("X-TenantID", "example")
  .build()
val response = client.newCall(request).execute()

Response

Successful response of issue children count has the status 200 with following response body:

{
    "comments": 0,
    "issues": 1,
    "tests": 1
}

404 Not found

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

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": "/issues/30/count-children"
}

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": "/issues/30/count-children"
}