Commit Graph

17 Commits

Author SHA1 Message Date
Cody Cutrer 4238d6d84b warn about the limit to per_page
Change-Id: I6e35498681ed760af2929d7fb651d18db53e60be
Reviewed-on: https://gerrit.instructure.com/5639
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-14 08:49:26 -06:00
Brian Palmer b317f0d264 clean up user querying in the api, refs #4756, #4746
Finding users is a bit different, since the user's sis information is
actually stored on the pseudonym. Before, we were working around this in
the submissions api. I've generalized it to work everywhere that uses
the Api find functionality, and in the process fixed the page views api
so that it works with sis ids.

This is necessary as we add more user apis, like the upcoming
/users/:user_id profile API.

Also added the /users/self shortcut to query the various user apis for
the user accessing the api.

Also for consistency, deprecate users/activity_stream in favor of
users/self/activity_stream

Change-Id: Icb0776231070b838bb341893d12b1061b90c5d04
Reviewed-on: https://gerrit.instructure.com/5628
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-13 12:33:45 -06:00
Brian Palmer 8fb11bd39c update oauth docs for new web app flow
Change-Id: I3f75a7439b86ed458b001a960204b67d3b70a266
Reviewed-on: https://gerrit.instructure.com/5263
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
2011-08-25 10:41:35 -06:00
Brian Palmer c8f7529d4e oauth2 web app flow, refs #5029
accepts a redirect_uri to return the code to, in addition to the OOB uri
support. matches the redirect_uri domain host against the one stored on
the developer key.

this doesn't yet include a UI for registering developer keys.

Change-Id: I6fbfe6ff3dbd6ebea9c2f9fc5ce3e45447a1cbc8
Reviewed-on: https://gerrit.instructure.com/4963
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-23 17:27:47 -06:00
Brian Palmer b4de1b0e37 account list/show apis, for account_users
Change-Id: I787d05965b6dc5cee461f1b3041418de89d5304f
Reviewed-on: https://gerrit.instructure.com/4964
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 15:51:46 -06:00
Brian Palmer a2e35e8e11 fix api support for sis ids in url with special chars, closes #5176
periods were being interpreted as the beginning of a file extension,
rather than part of the sis id. fixing this meant completely changing
our routing, unfortunately, since rails resourceful routing is very
oriented on numeric ids, with format extensions.

the .json extension is now optional for api requests, in api v2 we'll
drop it completely. there is the unfortunate edge case that a sis id
ending in ".json" can't be send through the v1 api -- except...

we also now support hex encoding sis ids in the api calls. this allows
arbitrary strings to be used. in theory this could just use uri
encoding, which is also "supported", but there are bugs in various
releases of apache and the rack/rails stack that make this impossible to
use with some characters, such as "." and "/".

the api documentation has been updated as well

Change-Id: Ifa4b529dffee0f30ef5384f94c64aa6e8f8f2542
Reviewed-on: https://gerrit.instructure.com/4940
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-04 16:25:21 -06:00
Bracken Mosbacker b3167f4640 start discussion topic api
refs #4752

Change-Id: I54712c27ef1c496c2c92f7805240ca91405b2858
Reviewed-on: https://gerrit.instructure.com/4797
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-07-28 12:05:18 -06:00
Brian Palmer 94fc36c7c2 some api doc updates for oauth, and make the api accessible from canvas
Once rake doc:api or canvas:compile_assets is run, the API will be
accessible from within Canvas at /doc/api/index.html

Change-Id: I503701c0ef3dc0df0ea67477053b328411553352
Reviewed-on: https://gerrit.instructure.com/4723
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-19 13:43:34 -06:00
Brian Palmer 6a2cc50391 document our oauth2 native app flow
next step: implement it

Change-Id: I6c6777ce046892d06048a2dcaac9a561a9fb7d3c
Reviewed-on: https://gerrit.instructure.com/4673
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-07-18 22:27:24 -06:00
Brian Palmer 493a26d541 use more specific sis field names in api, and support both user sis ids
users have both a SIS user_id and login_id, return both in the API and
allow both as ids when specifying a user in API calls using the syntax
sis_user_id:someid and sis_login_id:someid

These columns in the db aren't well named, unfortunately, but we'll try
to at least be consistent in the API.

This is technically a breaking change for the API. We've decided to go
ahead with it, as this API functionality was only recently added.

Change-Id: I8eabe4226580aa3b1aec7e5b7082b045f786e605
Reviewed-on: https://gerrit.instructure.com/4556
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-07-07 15:44:25 -06:00
Brian Palmer 50c4687c84 oauth 2 requests via access tokens
Added support for oauth 2 API requests.  HTTP Basic
only works for Canvas-auth and LDAP accounts, but
oauth 2 will also work with SSO accounts.  Also added
ability for users to create access tokens from the
profile page.

Change-Id: I13581b4e77bfa77bf11dbb732900012dd1e50ede
Reviewed-on: https://gerrit.instructure.com/3775
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-06-02 09:15:11 -06:00
Brian Palmer ace397540a support sis ids in the canvas apis, closes #4386
Change-Id: I2ae2a447f3950d09257b9ff6498326ec89c8bed8
Reviewed-on: https://gerrit.instructure.com/3621
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-05-16 13:25:07 -06:00
JT Olds 8651c9a3db link to troubleshooting wiki page for rails console
Change-Id: I76a8af7458e028579a0b90a935b528f4d70df3d1
Reviewed-on: https://gerrit.instructure.com/2735
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-22 14:43:03 -06:00
JT Olds 187141faeb editing api doc set up tutorial url
Change-Id: Ibf68ca15be1810a89c54acd17ac2a697c838564d
Reviewed-on: https://gerrit.instructure.com/2633
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-14 14:59:24 -06:00
Brian Palmer 8a14ca3b0d api doc readme, and explanation of auth and other api basics
refs #3956

Change-Id: I74b2fc8308c595ca3fb38bea5305d545b42329af
Reviewed-on: https://gerrit.instructure.com/2537
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-09 10:13:08 -07:00
Brian Palmer 8327ebac27 refactor the rest api docs, refs #3956
I removed the api_routes plugin, since the code is currently too tied to
canvas to be pulled out into a generic plugin anyway. The yardoc
templates now live in doc/templates, and I've done some major cleanup
and refactoring -- they don't have much in common with the default YARD
templates anymore, and they work much better as API documentation.

The styling is now a little bit more "canvas-like" now, too.

Change-Id: I80edd02e63d7815a292306741f2e8ea52872aae2
Reviewed-on: https://gerrit.instructure.com/2535
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-09 10:12:32 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00