Get a table of the time spent of each person for each month of a year. Add project_id, department_id or studio_id to filter the table. An administrator gets the time spent of all persons. A manager gets the time spent logged on the tasks of the projects they manage, for all persons. A supervisor gets the time spent of the projects they supervise, for the task types of their departments. A supervisor without department gets all the task types. A manager or a supervisor who gives a project_id of another project gets a 403. A supervisor who gives a department_id that is not one of their departments gets a 400. Other users get their own time spent only. The filters still apply to them. The manager and supervisor roles are the roles held on the project team.
curl -X GET "http://api.example.com/data/persons/time-spents/month-table/2022" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/data/persons/time-spents/month-table/2022"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.get(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
{}