canvas-lms/doc
Augusto Callejas 412e49baee Outcome import creation/status endpoints
closes OUT-1534

Scheduling of outcome import jobs will occur in a separate PS,
after this merges and OUT-1997 is merged too.

test plan:
  - start up canvas
  - generate api docs:
    > docker-compose run --rm web bundle exec rake doc:api
  - load api docs in http://canvas.docker/doc/api/index.html
  - read over the "Outcomes CSV Format" and make sure it reads well
  - read over the "Outcomes Import" and make sure it reads well
  - obtain an access token:
    https://community.canvaslms.com/docs/DOC-10806-4214724194
  - request an outcome import, replace "canvas-path" and "token" values:
    curl -F attachment=@<canvas-path>/spec/lib/outcomes/fixtures/demo.csv \
         -F 'import_type=instructure_csv' \
         -H "Authorization: Bearer <token>" \
         http://canvas.docker/api/v1/accounts/1/outcome_imports
  - in a rails console, confirm that the import was accepted:
    > docker-compose run --rm web bin/rails console
    % pp OutcomeImport.last
    # confirm that the import is in the 'created' state, associated with
      your user and associated with an account context
    # note the "id" value for later use
    % pp OutcomeImport.last.attachment
    # confirm that the attachment is in the 'processed' state and has
      the filename "test_outcomes_1.csv" passed in above
  - request the status of the outcome import (should return a message
    saying "The specified resource does not exist"):
    curl -H "Authorization: Bearer <token>" \
         http://canvas.docker/api/v1/accounts/1/outcome_imports/latest
  - back in the rails console created above, manually transition
    the import to "importing":
    % OutcomeImport.last.job_started
  - run the above curl command again, and this time the latest outcome
    import should be returned, in the 'importing' state
  - run the above curl command again, replacing "latest" with the "id"
    value obtained above. it should return the same response as the
    previous step.

Change-Id: Ice7d67b625b443cec70f531f2e673face6d6fbeb
Reviewed-on: https://gerrit.instructure.com/142024
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Frank Murphy <fmurphy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2018-03-05 19:22:03 +00:00
..
api Outcome import creation/status endpoints 2018-03-05 19:22:03 +00:00
diagrams API doc update for a group assignment override 2013-02-08 11:50:54 -07:00
docker Revert "enable better_errors for development part two" 2018-01-13 00:50:47 +00:00
examples Quiz Stats - Multiple Answers 2014-06-05 09:12:19 +00:00
images Store EULA agreement timestamp 2017-11-02 19:43:35 +00:00
styleguide s/jammit_css/css_bundle 2015-07-07 21:26:35 +00:00
yard_plugins update variable expanders 2017-02-27 23:15:19 +00:00
high_level.txt remove non-draft-state everything 2014-12-10 17:57:18 +00:00
live_events.md Change references to grade_changed event to grade_change event 2017-10-19 14:28:17 +00:00
merging-gradezilla.md add late_policy controller/serializer 2017-04-26 19:09:55 +00:00
testing_javascript.md Add Jest for testing JavaScript 2017-12-14 22:08:09 +00:00
working_with_webpack.md require yarn, not npm 2017-08-14 15:27:14 +00:00