Sha256: f52dff92992fc7686f6979c36392798777f2e764a0eb16d37f59b356cd2b4d25

Contents?: true

Size: 1.57 KB

Versions: 1

Compression:

Stored size: 1.57 KB

Contents

Orchestrator::Engine.routes.draw do

    match '/*path' => 'api#options', :via => :options

    # Restful access to services
    namespace :api do
        # Allows multiple routes to resolve to the one controller
        concern :mods do
            resources :modules do # modules have settings
                post 'start',   on: :member
                post 'stop',    on: :member
                get  'state',   on: :member
            end
        end

        # Trusted Sessions - Create Trust (returns id), Update Session and Destroy Trust
        resources :trusts

        resources(:systems, {as: :control_system}) do       # systems have settings and define what zone they are in
            post 'remove',  on: :member
            post 'start',   on: :member
            post 'stop',    on: :member
            post 'exec',    on: :member
            get  'state',   on: :member
            get  'funcs',   on: :member
            get  'count',   on: :member
            get  'types',   on: :member

            concerns :mods
        end
        resources :dependencies do  # dependencies have settings
            post 'reload',  on: :member
        end
        resources :groups           # users define the groups they are in
        resources :zones            # zones define what groups can access them
        resources :users do
            get 'current',  on: :collection
        end
        resources :logs
        
        concerns  :mods
    end

    # These are non-restful endpoints
    # Websockets and Eventsources
    get 'websocket', to: 'persistence#websocket', via: :all
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
orchestrator-1.0.3 config/routes.rb