Module: Orchestrate::API::Procedural
- Included in:
- Wrapper
- Defined in:
- lib/orchestrate_api/procedural.rb
Overview
Procedural interface methods (optional).
This file serves as useful documentation for the Orchestrate.io REST API. Each method illustrates an example for the corresponding HTTP request, and documents the required keys for the send_request argument hash.
Instance Method Summary collapse
-
#delete_collection(args) ⇒ Object
-
required: { collection }.
-
-
#delete_graph(args) ⇒ Object
-
required: { collection, key, kind, to_collection, to_key }.
-
-
#delete_key(args) ⇒ Object
-
required: { collection, key }.
-
-
#get_by_ref(args) ⇒ Object
-
required: { collection, key, ref }.
-
-
#get_events(args) ⇒ Object
-
required: { collection, key, event_type } * optional: { timestamp }, where timestamp = { :start => start, :end => end }.
-
-
#get_graph(args) ⇒ Object
-
required: { collection, key, kind }.
-
-
#get_key(args) ⇒ Object
-
required: { collection, key }.
-
-
#list(args) ⇒ Object
-
required: { collection }.
-
-
#purge_key(args) ⇒ Object
-
required: { collection, key }.
-
-
#put_event(args) ⇒ Object
-
required: { collection, key, event_type, json } * optional: { timestamp }, where timestamp is a scalar value.
-
-
#put_graph(args) ⇒ Object
-
required: { collection, key, kind, to_collection, to_key }.
-
-
#put_key(args) ⇒ Object
-
required: { collection, key, json }.
-
-
#put_key_if_match(args) ⇒ Object
-
required: { collection, key, json, ref }.
-
-
#put_key_if_none_match(args) ⇒ Object
-
required: { collection, key, json }.
-
-
#search(args) ⇒ Object
-
required: { collection }.
-
Instance Method Details
#delete_collection(args) ⇒ Object
-
required: { collection }
28 29 30 |
# File 'lib/orchestrate_api/procedural.rb', line 28 def delete_collection(args) send_request :delete, args.merge(path: "?force=true") end |
#delete_graph(args) ⇒ Object
-
required: { collection, key, kind, to_collection, to_key }
114 115 116 |
# File 'lib/orchestrate_api/procedural.rb', line 114 def delete_graph(args) send_request :put, args.merge(path: "?purge=true") end |
#delete_key(args) ⇒ Object
-
required: { collection, key }
49 50 51 |
# File 'lib/orchestrate_api/procedural.rb', line 49 def delete_key(args) send_request :delete, args end |
#get_by_ref(args) ⇒ Object
-
required: { collection, key, ref }
64 65 66 |
# File 'lib/orchestrate_api/procedural.rb', line 64 def get_by_ref(args) send_request :get, args end |
#get_events(args) ⇒ Object
-
required: { collection, key, event_type }
-
optional: { timestamp }, where timestamp = { :start => start, :end => end }
86 87 88 |
# File 'lib/orchestrate_api/procedural.rb', line 86 def get_events(args) send_request :get, args end |
#get_graph(args) ⇒ Object
-
required: { collection, key, kind }
102 103 104 |
# File 'lib/orchestrate_api/procedural.rb', line 102 def get_graph(args) send_request :get, args end |
#get_key(args) ⇒ Object
-
required: { collection, key }
37 38 39 |
# File 'lib/orchestrate_api/procedural.rb', line 37 def get_key(args) send_request :get, args end |
#list(args) ⇒ Object
-
required: { collection }
16 17 18 |
# File 'lib/orchestrate_api/procedural.rb', line 16 def list(args) send_request :get, args end |
#purge_key(args) ⇒ Object
-
required: { collection, key }
55 56 57 |
# File 'lib/orchestrate_api/procedural.rb', line 55 def purge_key(args) send_request :delete, args.merge(path: "?purge=true") end |
#put_event(args) ⇒ Object
-
required: { collection, key, event_type, json }
-
optional: { timestamp }, where timestamp is a scalar value
93 94 95 |
# File 'lib/orchestrate_api/procedural.rb', line 93 def put_event(args) send_request :put, args end |
#put_graph(args) ⇒ Object
-
required: { collection, key, kind, to_collection, to_key }
108 109 110 |
# File 'lib/orchestrate_api/procedural.rb', line 108 def put_graph(args) send_request :put, args end |
#put_key(args) ⇒ Object
-
required: { collection, key, json }
43 44 45 |
# File 'lib/orchestrate_api/procedural.rb', line 43 def put_key(args) send_request :put, args end |
#put_key_if_match(args) ⇒ Object
-
required: { collection, key, json, ref }
70 71 72 |
# File 'lib/orchestrate_api/procedural.rb', line 70 def put_key_if_match(args) send_request :put, args end |
#put_key_if_none_match(args) ⇒ Object
-
required: { collection, key, json }
76 77 78 |
# File 'lib/orchestrate_api/procedural.rb', line 76 def put_key_if_none_match(args) send_request :put, args.merge(ref: '"*"') end |
#search(args) ⇒ Object
-
required: { collection }
22 23 24 |
# File 'lib/orchestrate_api/procedural.rb', line 22 def search(args) send_request :get, args.merge(path: "?query=#{args[:query].gsub(/\s/, '%20')}") end |