Skip to content

Instantly share code, notes, and snippets.

@hobodave
Created April 19, 2017 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hobodave/4cf9564d2164858cc379075c91db5c9d to your computer and use it in GitHub Desktop.
Save hobodave/4cf9564d2164858cc379075c91db5c9d to your computer and use it in GitHub Desktop.
Rails.application.routes.draw do
scope '/api' do
scope '/v2' do
get 'debug/error_workflows', to: 'debug#error_workflows', as: :v2_debug
# Would like to duplicate :activities and :workflows under here
end
get 'debug/error_workflows', to: 'debug#error_workflows', as: :debug
resources :activities, only: :show do
collection { get 'search' }
member do
get 'errors'
get 'response', to: 'activities#node_response'
get 'status_changes'
put 'status/:new_status', to: 'activities#status', as: :new_status
put 'schedule'
put 'restart'
put 'reset'
post 'decisions'
end
end
resources :users, only: [:index, :show]
resources :workflows, except: [:put, :destroy] do
collection do
get 'names'
get 'search'
end
member do
post 'signal'
post 'signal/:name', to: 'workflows#signal'
put 'complete'
put 'pause'
put 'resume'
get 'tree'
get 'tree/print', to: 'workflows#tree_print'
get 'children'
get 'nodes'
end
end
end
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment