Shifts
-
Update a shift
PUT /api/1/shifts/:uuid.jsonFormats
json jsonpUpdate an existing shift. Requires a valid shift object to be posted. Missing attributes from the object will be merged with the existing shift.
Errors
- 401 Unauthorized
- 403 Read Denied - if the user is not allowed to update this shift
- 404 Record Not Found - returned if the project with the specified UUID is not found
- 404 Record Not Found - returned if the shift with the specified UUID is not found
- 422 Invalid Record - if the shift fails validation. An error message will be returned, declaring the error.
Example
PUT /api/1/shifts/2a3feeb3-c56d-48e2-8287-2bfac0ede323 { "shift": { "start": "2013-08-16T13:19:27+08:00", "stop": "2013-08-16T14:19:27+08:00", "notes": "repellat provident dolores amet tenetur", "time_zone": "Australia/Perth", "project_uuid": "1a28b403-3915-446a-bb70-f9d3f24a2ee7" } } 200Parameters
-
shift
A shift member JSON object.
Required-
uuid
A UUID to identify the shift. If null, one will be generated
Optional Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
start
Start time of the project. Format as a RFC3339 time string in UTC
Required Must be String -
stop
Stop time of the project. If omitted, the shift is considered to be running. Format as a RFC3339 time string in UTC
Optional Must be String -
notes
Notes associated with the shift
Optional Must be String -
time_zone
The time zone that the shift occured in. Must be a valid timezone string from the tz database.
Required Must be String -
time_zone_offset
time_zone_offset
Optional Must be String -
billable
Indicates whether the shift is billable or not. If omitted, true is assumed
Optional Must be one of: true, false. -
project_uuid
The UUID of the project begin clocked against. The project must be accessible by the authenticated user.
Required Must be String -
user_uuid
The UUID of the user that clocked the shift. The user must be a staff member of the authenticated user. If omitted, the authenticated user is used
Optional Must be String -
tag_list
Array of tags
Optional Must be Array -
local_start_as_string
A human readable time, that will attempted to be parsed. Will overwrite start if set.
Optional Must be String -
local_stop_as_string
A human readable time, that will attempted to be parsed. Will overwrite stop if set.
Optional Must be String -
activity_uuid
The UUID of the activity associated with this shift. Leave blank if there is no activity.
Optional Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
external_href
Populated if the shift was created on an external website. Points at the external resource
Optional Must be String
-
Update a shift against the specified project
PUT /api/1/projects/:project_uuid/shifts/:uuid.jsonFormats
json jsonpUpdate an existing shift. Requires a valid shift object to be posted. Missing attributes from the object will be merged with the existing shift.
Errors
- 401 Unauthorized
- 403 Read Denied - if the user is not allowed to update this shift
- 404 Record Not Found - returned if the project with the specified UUID is not found
- 404 Record Not Found - returned if the shift with the specified UUID is not found
- 422 Invalid Record - if the shift fails validation. An error message will be returned, declaring the error.
Example
PUT /api/1/shifts/2a3feeb3-c56d-48e2-8287-2bfac0ede323 { "shift": { "start": "2013-08-16T13:19:27+08:00", "stop": "2013-08-16T14:19:27+08:00", "notes": "repellat provident dolores amet tenetur", "time_zone": "Australia/Perth", "project_uuid": "1a28b403-3915-446a-bb70-f9d3f24a2ee7" } } 200Parameters
-
shift
A shift member JSON object.
Required-
uuid
A UUID to identify the shift. If null, one will be generated
Optional Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
start
Start time of the project. Format as a RFC3339 time string in UTC
Required Must be String -
stop
Stop time of the project. If omitted, the shift is considered to be running. Format as a RFC3339 time string in UTC
Optional Must be String -
notes
Notes associated with the shift
Optional Must be String -
time_zone
The time zone that the shift occured in. Must be a valid timezone string from the tz database.
Required Must be String -
time_zone_offset
time_zone_offset
Optional Must be String -
billable
Indicates whether the shift is billable or not. If omitted, true is assumed
Optional Must be one of: true, false. -
project_uuid
The UUID of the project begin clocked against. The project must be accessible by the authenticated user.
Required Must be String -
user_uuid
The UUID of the user that clocked the shift. The user must be a staff member of the authenticated user. If omitted, the authenticated user is used
Optional Must be String -
tag_list
Array of tags
Optional Must be Array -
local_start_as_string
A human readable time, that will attempted to be parsed. Will overwrite start if set.
Optional Must be String -
local_stop_as_string
A human readable time, that will attempted to be parsed. Will overwrite stop if set.
Optional Must be String -
activity_uuid
The UUID of the activity associated with this shift. Leave blank if there is no activity.
Optional Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
external_href
Populated if the shift was created on an external website. Points at the external resource
Optional Must be String
-