Shifts

  • Update a shift

    PUT /api/1/shifts/:uuid.json
    Formats
    json jsonp

    Update 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
    • 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"
      }
    }
    200
    Parameters
    • shift

      A shift member JSON object.

      • uuid

        A UUID to identify the shift. If null, one will be generated

      • start

        Start time of the project. Format as a RFC3339 time string in UTC

      • stop

        Stop time of the project. If omitted, the shift is considered to be running. Format as a RFC3339 time string in UTC

      • notes

        Notes associated with the shift

      • time_zone

        The time zone that the shift occured in. Must be a valid timezone string from the tz database.

      • time_zone_offset

        time_zone_offset

      • billable

        Indicates whether the shift is billable or not. If omitted, true is assumed

      • project_uuid

        The UUID of the project begin clocked against. The project must be accessible by the authenticated user.

      • 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

      • tag_list

        Array of tags

      • local_start_as_string

        A human readable time, that will attempted to be parsed. Will overwrite start if set.

      • local_stop_as_string

        A human readable time, that will attempted to be parsed. Will overwrite stop if set.

      • activity_uuid

        The UUID of the activity associated with this shift. Leave blank if there is no activity.

      • external_href

        Populated if the shift was created on an external website. Points at the external resource

    Update a shift against the specified project

    PUT /api/1/projects/:project_uuid/shifts/:uuid.json
    Formats
    json jsonp

    Update 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
    • 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"
      }
    }
    200
    Parameters
    • shift

      A shift member JSON object.

      • uuid

        A UUID to identify the shift. If null, one will be generated

      • start

        Start time of the project. Format as a RFC3339 time string in UTC

      • stop

        Stop time of the project. If omitted, the shift is considered to be running. Format as a RFC3339 time string in UTC

      • notes

        Notes associated with the shift

      • time_zone

        The time zone that the shift occured in. Must be a valid timezone string from the tz database.

      • time_zone_offset

        time_zone_offset

      • billable

        Indicates whether the shift is billable or not. If omitted, true is assumed

      • project_uuid

        The UUID of the project begin clocked against. The project must be accessible by the authenticated user.

      • 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

      • tag_list

        Array of tags

      • local_start_as_string

        A human readable time, that will attempted to be parsed. Will overwrite start if set.

      • local_stop_as_string

        A human readable time, that will attempted to be parsed. Will overwrite stop if set.

      • activity_uuid

        The UUID of the activity associated with this shift. Leave blank if there is no activity.

      • external_href

        Populated if the shift was created on an external website. Points at the external resource