ActivityCRUD
Create activity¶
Attempt to create an activity
Request¶
Request body¶
Attribute | Type | Required | Notes |
---|---|---|---|
activityTypeId | integer | yes | defines the activity type id |
place | integer | no | defines the place |
projectId | integer | no | defines the project id |
issueId | integer | no | defines the issue id |
teamId | integer | no | defines the team id |
includeWeekends | boolean | yes | defines if weekends and holidays are included |
description | string | yes | the description of the activity |
dateFrom | string | yes | defines the first day of the activity |
dateTo | string | yes | defines the last day of the activity |
timeFrom | string | yes | defines the starting time of the activity |
timeTo | string | yes | defines the end time of the activity |
Request body example¶
curl --location 'https://example.juno.one/v1/activity' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ' \
--header 'X-tenantID: example' \
--header 'Zone: GMT' \
--header 'Content-Type: application/json' \
--data '{
"activityTypeId": {
"id": 79
},
"place": {
"id": 6
},
"projectId": 432,
"issueId": 2911,
"teamId": 3,
"includeWeekends": false,
"description": "test",
"dateFrom": "2020-06-03",
"dateTo": "2020-07-03",
"timeFrom": "08:00",
"timeTo": "10:00"
}'
import requests
import json
url = "https://example.juno.one/v1/activity"
payload = json.dumps({
"activityTypeId": {
"id": 79
},
"place": {
"id": 6
},
"projectId": 432,
"issueId": 2911,
"teamId": 3,
"includeWeekends": False,
"description": "test",
"dateFrom": "2020-06-03",
"dateTo": "2020-07-03",
"timeFrom": "08:00",
"timeTo": "10:00"
})
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ',
'X-tenantID': 'example',
'Zone': 'GMT',
'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 \"activityTypeId\": {\n \"id\": 79\n },\n \"place\": {\n \"id\": 6\n },\n \"projectId\": 432,\n \"issueId\": 2911,\n \"teamId\": 3,\n \"includeWeekends\": false,\n \"description\": \"test\",\n \"dateFrom\": \"2020-06-03\",\n \"dateTo\": \"2020-07-03\",\n \"timeFrom\": \"08:00\",\n \"timeTo\": \"10:00\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://example.juno.one/v1/activity")
.post(body)
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ")
.addHeader("X-tenantID", "example")
.addHeader("Zone", "GMT")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()
Response¶
Successful response of create activity has the status 200
with following response body:
[
{
"id": 1,
"activityTypeId": {
"id": 1,
"name": "Andrej",
"description": "test",
"color": "#29a745",
"workingHours": true,
"approvable": true
},
"place": {
"id": 1,
"name": "test",
"type": "CUSTOM"
},
"author": {
"id": 2,
"firstname": "test",
"lastname": "test",
"email": "test@juno.one",
"avatar": "9",
"deleted": false
},
"projectId": {
"id": 13,
"name": "test",
"test_case_robust": true
},
"issueId": {
"id": 2,
"name": "test"
},
"teamId": {
"id": 1,
"name": "test",
"deleted": false
},
"includeWeekends": true,
"description": "test",
"dateFrom": "2020-06-03T00:00:00.000Z",
"dateTo": "2020-06-03T00:00:00.000Z",
"timeFrom": "720",
"timeTo": "720",
"duration": 1,
"statusId": {
"id": 1,
"name": "test",
"color": "#29a745",
"positiveFinal": false,
"negativeFinal": false
},
"statusEditor": {
"id": 2,
"firstname": "test",
"lastname": "test",
"email": "test@juno.one",
"avatar": "9",
"deleted": false
},
"deleted": false,
"created_at": "2020-06-03T00:00:00.000Z"
}
]
400
Bad Request
406
Insufficient permision
412
Precondition failed
Update activity¶
Attempt to update an activity specified by an id
Request¶
Parameters¶
Parameter | Path/Query | Type | Required | Notes |
---|---|---|---|---|
id | path | integer | yes | defines the id of the activity |
Request body¶
Attribute | Type | Required | Notes |
---|---|---|---|
activityTypeId | integer | yes | defines the activity type id |
place | integer | no | defines the place |
projectId | integer | no | defines the project id |
issueId | integer | no | defines the issue id |
teamId | integer | no | defines the team id |
includeWeekends | boolean | yes | defines if weekends and holidays are included |
description | string | yes | the description of the activity |
dateFrom | string | yes | defines the first day of the activity |
dateTo | string | yes | defines the last day of the activity |
timeFrom | string | yes | defines the starting time of the activity |
timeTo | string | yes | defines the end time of the activity |
Request body example¶
curl --location --request PUT 'https://example.juno.one/v1/activity/12' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ' \
--header 'X-tenantID: example' \
--header 'Zone: GMT' \
--header 'Content-Type: application/json' \
--data '{
"activityTypeId": {
"id": 79
},
"place": {
"id": 6
},
"projectId": 432,
"issueId": 2911,
"teamId": 3,
"includeWeekends": false,
"description": "test",
"dateFrom": "2020-06-03",
"dateTo": "2020-07-03",
"timeFrom": "08:00",
"timeTo": "10:00"
}'
import requests
import json
url = "https://example.juno.one/v1/activity/12"
payload = json.dumps({
"activityTypeId": {
"id": 79
},
"place": {
"id": 6
},
"projectId": 432,
"issueId": 2911,
"teamId": 3,
"includeWeekends": False,
"description": "test",
"dateFrom": "2020-06-03",
"dateTo": "2020-07-03",
"timeFrom": "08:00",
"timeTo": "10:00"
})
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ',
'X-tenantID': 'example',
'Zone': 'GMT',
'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 \"activityTypeId\": {\n \"id\": 79\n },\n \"place\": {\n \"id\": 6\n },\n \"projectId\": 432,\n \"issueId\": 2911,\n \"teamId\": 3,\n \"includeWeekends\": false,\n \"description\": \"test\",\n \"dateFrom\": \"2020-06-03\",\n \"dateTo\": \"2020-07-03\",\n \"timeFrom\": \"08:00\",\n \"timeTo\": \"10:00\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://example.juno.one/v1/activity/12")
.put(body)
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ")
.addHeader("X-tenantID", "example")
.addHeader("Zone", "GMT")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()
Response¶
Successful response of update activity has the status 200
with following response body:
[
{
"id": 1,
"activityTypeId": {
"id": 1,
"name": "Andrej",
"description": "test",
"color": "#29a745",
"workingHours": true,
"approvable": true
},
"place": {
"id": 1,
"name": "test",
"type": "CUSTOM"
},
"author": {
"id": 2,
"firstname": "test",
"lastname": "test",
"email": "test@juno.one",
"avatar": "9",
"deleted": false
},
"projectId": {
"id": 13,
"name": "test",
"test_case_robust": true
},
"issueId": {
"id": 2,
"name": "test"
},
"teamId": {
"id": 1,
"name": "test",
"deleted": false
},
"includeWeekends": true,
"description": "test",
"dateFrom": "2020-06-03T00:00:00.000Z",
"dateTo": "2020-06-03T00:00:00.000Z",
"timeFrom": "720",
"timeTo": "720",
"duration": 1,
"statusId": {
"id": 1,
"name": "test",
"color": "#29a745",
"positiveFinal": false,
"negativeFinal": false
},
"statusEditor": {
"id": 2,
"firstname": "test",
"lastname": "test",
"email": "test@juno.one",
"avatar": "9",
"deleted": false
},
"deleted": false,
"created_at": "2020-06-03T00:00:00.000Z"
}
]
400
Bad Request
404
Not found
406
Insufficient permision
412
Precondition failed
Find activity¶
Attempt to find an activity specified by an id
Request¶
Parameters¶
Parameter | Path/Query | Type | Required | Notes |
---|---|---|---|---|
id | path | integer | yes | defines the id of the user |
Request body¶
This endpoint does not have a request body
curl --location 'https://example.juno.one/v1/activity/12' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ' \
--header 'X-tenantID: example' \
--header 'Zone: GMT'
import requests
url = "https://example.juno.one/v1/activity/12"
payload = {}
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ',
'X-tenantID': 'example',
'Zone': 'GMT'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
val client = OkHttpClient()
val request = Request.Builder()
.url("https://example.juno.one/v1/activity/12")
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ")
.addHeader("X-tenantID", "example")
.addHeader("Zone", "GMT")
.build()
val response = client.newCall(request).execute()
Response¶
Successful response of find activity has the status 200
with following response body:
{
"id": 1,
"activityTypeId": {
"id": 1,
"name": "Andrej",
"description": "test",
"color": "#29a745",
"workingHours": true,
"approvable": true
},
"place": {
"id": 1,
"name": "test",
"type": "CUSTOM"
},
"author": {
"id": 2,
"firstname": "test",
"lastname": "test",
"email": "test@juno.one",
"avatar": "9",
"deleted": false
},
"projectId": {
"id": 13,
"name": "test",
"test_case_robust": true
},
"issueId": {
"id": 2,
"name": "test"
},
"teamId": {
"id": 1,
"name": "test",
"deleted": false
},
"includeWeekends": true,
"description": "test",
"dateFrom": "2020-06-03T00:00:00.000Z",
"dateTo": "2020-06-03T00:00:00.000Z",
"timeFrom": "720",
"timeTo": "720",
"duration": 1,
"statusId": {
"id": 1,
"name": "test",
"color": "#29a745",
"positiveFinal": false,
"negativeFinal": false
},
"statusEditor": {
"id": 2,
"firstname": "test",
"lastname": "test",
"email": "test@juno.one",
"avatar": "9",
"deleted": false
},
"deleted": false,
"created_at": "2020-06-03T00:00:00.000Z"
}
404
Not found
406
Insufficient permision
Delete activity¶
Attempt to delete an activity specified by an id
Request¶
Parameters¶
Parameter | Path/Query | Type | Required | Notes |
---|---|---|---|---|
id | path | integer | yes | defines the id of a user |
Request body¶
This endpoint does not have a request body
curl --location --request DELETE 'https://example.juno.one/v1/activity/12' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ' \
--header 'X-tenantID: example' \
--header 'Zone: GMT'
import requests
url = "https://example.juno.one/v1/activity/12"
payload = {}
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ',
'X-tenantID': 'example',
'Zone': 'GMT'
}
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/v1/activity/12")
.method("DELETE", body)
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ")
.addHeader("X-tenantID", "example")
.addHeader("Zone", "GMT")
.build()
val response = client.newCall(request).execute()
Response¶
Successful response of delete activity has the status 200
with no response body:
404
Not found
406
Insufficient permision
Undelete activity¶
Attempt to undelete an activity specified by an id
Request¶
Parameters¶
Parameter | Path/Query | Type | Required | Notes |
---|---|---|---|---|
id | path | integer | yes | defines the id of a user |
Request body¶
This endpoint does not have a request body
curl --location --request DELETE 'https://example.juno.one/v1/activity/undelete/12' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ' \
--header 'X-tenantID: example' \
--header 'Zone: GMT'
import requests
url = "https://example.juno.one/v1/activity/undelete/12"
payload = {}
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ',
'X-tenantID': 'example',
'Zone': 'GMT'
}
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/v1/activity/undelete/12")
.method("DELETE", body)
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NTA5NTk4Nn0.pv8kavc3kNXiXFgZfSQjRCrA-HDVyIzTzNgi9IUXhEW4_1uRRgzoD2ZQTJB77u9VamGwICZeEyi3-b1PjRFMBQ")
.addHeader("X-tenantID", "example")
.addHeader("Zone", "GMT")
.build()
val response = client.newCall(request).execute()
Response¶
Successful response of undelete activity has the status 200
with no response body:
404
Not found
406
Insufficient permision