Author |
Message
|
Vitor |
Posted: Thu Mar 16, 2017 12:06 pm Post subject: Best practice for REST in IIBv9 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
So we're (belatedly) getting into REST services inside the organization. Where we've called such services up to this point, it's been to external services to a single URL.
In the SOAP world, endpoint and operation are separately selectable attributes. In the REST world, it's a single URL. We observe that you can dynamically build both query parameters and operation in the local environment tree, but the operation seems to replace the URL specific in the HTTP request node. Remediating that is a simple matter of holding the URL as a UDP and building the whole URL in ESQL, but is there a better way? What (if anything) are we missing? How do other people manage a situation where the base URL is the same for all operations, but changes by environment so can't be hard coded?
Helpful links in the InfoCenter that I've overlooked may be posted with as much sarcasm and irony as the poster feels is relevant. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 16, 2017 12:35 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 17, 2017 4:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 17, 2017 4:55 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
... are you listening to URLs or calling them?
If you're calling them, it's the usual case of 'how do I know what environment I'm running in'
If you're listening to them, then it's a configurable property on the HTTTPInputNode, isn't it? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 17, 2017 5:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Calling them.
So environment specific UDPs is pretty good? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 17, 2017 5:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
Calling them.
So environment specific UDPs is pretty good? |
Well, it certainly works.
But, how do you solve this question of "what environment am I in?" elsewhere? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 17, 2017 6:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Promoting node properties and changing them at deploy time.
So to clarify:
We can either promote the URL property of the HTTP request node or we can build the URL in the LocalEnvironment and pass it forward. We're not missing a capability where we can set http://rest.example.org in the node and either /music or /books in LocalEnvironment. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 17, 2017 6:28 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 17, 2017 6:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Now that's the missing piece!
God bless you oh most worthy associate! Buy you a drink on next meeting. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 17, 2017 7:03 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
Now that's the missing piece! |
My KC foo is still strong... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|