diff --git a/app/controllers/lti/data_services_controller.rb b/app/controllers/lti/data_services_controller.rb index bf2e77ef6c2..f30282bb866 100644 --- a/app/controllers/lti/data_services_controller.rb +++ b/app/controllers/lti/data_services_controller.rb @@ -152,7 +152,7 @@ module Lti # # @argument subscription[TransportType] [Optional, String] # Must be either 'sqs' or 'https'. - # + # # @argument subscription[State] [Optional, String] # Must be either 'Active' or 'Deleted" # @@ -180,12 +180,14 @@ module Lti # You can retrieve the next result set by setting a 'StartKey' header in your next request # with the value of the 'EndKey' header in the response. # + # Note that this will return all active subscription and the last 90 days of deleted subscriptions. + # # Example use of a 'StartKey' header object: # { "Id":"71d6dfba-0547-477d-b41d-db8cb528c6d1","OwnerId":"domain.instructure.com" } # # @returns DataServiceSubscription def index - response = Services::LiveEventsSubscriptionService.index(jwt_body) + response = Services::LiveEventsSubscriptionService.index(jwt_body, query: { limit_deleted: 90 }) forward_service_response(response) end diff --git a/lib/services/live_events_subscription_service.rb b/lib/services/live_events_subscription_service.rb index 6f242560414..60c5e1b2d58 100644 --- a/lib/services/live_events_subscription_service.rb +++ b/lib/services/live_events_subscription_service.rb @@ -81,8 +81,8 @@ module Services request(:delete, "/api/subscriptions/#{subscription_id}", options) end - def index(jwt_body, opts = {}) - options = { headers: headers(jwt_body, opts) } + def index(jwt_body, opts = {}, query: {}) + options = { headers: headers(jwt_body, opts), query: query } request(:get, '/api/root_account_subscriptions', options) end