Skip to content

Instantly share code, notes, and snippets.

@sudeeptarlekar
Created December 6, 2018 10:09
Show Gist options
  • Save sudeeptarlekar/61b24e1c7b8d721eb279c3700ef302b8 to your computer and use it in GitHub Desktop.
Save sudeeptarlekar/61b24e1c7b8d721eb279c3700ef302b8 to your computer and use it in GitHub Desktop.
Daily Summary API

API

curl -X GET \
  'http://localhost:3000/api/v1/organizations/big_binary/time_entries/user_time_entries?date=2018-12-06&selected_user_id=8bdf8d08-feab-4fa6-ae00-69bd28681193' \
  -H 'Content-Type: application/json' \
  -H 'X-Auth-Email: neeraj@bigbinary.com' \
  -H 'X-Auth-Token: kCK-Wh-xk6oYwpJn4BdP' \

JSON Response

{
    "lastProjectId": "a0527eeb-ca96-48d1-8b63-c17f6142019b",
    "lastTaskId": "f4ee2934-c006-4231-a259-86666c361f11",
    "timeEntries": [
        {
            "id": "6825dd9a-fcae-4ed0-9e8d-f129bcf70c82",
            "recorded_on": "2018-11-07",
            "notes": "Call with Stephanie and Zan regarding handling CSV file, API and sftp.\nAfter the call made a recording for Stephanie.\nCall with Tina, Barry, Stephanie and others regarding Laserfische",
            "hours": 0.833333333333333,
            "billed": false,
            "task": {
                "id": "2ceabd9a-ea7f-480a-8176-42b8bcdd68a1",
                "name": "Healthicity-Work",
                "project": {
                    "id": "ad415523-09aa-4418-81d6-9174b2f4753c",
                    "identifier": "aapc_hcm",
                    "name": "Healthicity",
                    "client": {
                        "identifier": "aapc"
                    }
                }
            }
        },
        {
            "id": "878a2e60-ba82-4bb1-a928-b95bdd6f2d6b",
            "recorded_on": "2018-11-07",
            "notes": "The login page was not working for the urls that are created by the CI. Worked on fixing that.",
            "hours": 4.2,
            "billed": true,
            "task": {
                "id": "f4ee2934-c006-4231-a259-86666c361f11",
                "name": "Work",
                "project": {
                    "id": "a0527eeb-ca96-48d1-8b63-c17f6142019b",
                    "identifier": "8c978a8052d43d9a18d0",
                    "name": "Vineti",
                    "client": {
                        "identifier": "0808062ae403e930c5a3"
                    }
                }
            }
        }
    ]
}

Rails

  • /app/controllers/api/v1/time_entries_controller.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment