Interesting. I have the reference document, Version 10.5, October 2019, and it does not have that note. Though I see it in the online version. This service was just added in 10.5. It would be interesting to get clarification from SAG on this. Normally, “internal only” services are not documented in the reference guide. The note stating “you must not execute this service manually” is a bit ambiguous. Executing a service manually means something specific and different from using it in a FLOW service.
The main caveat about making manual changes to the generated connector service is that your customizations will be lost if you re-generate the connector service.
I tried to find info about managing auth via the RAD connector service generated, without editing the connector service directly, but could not readily find it. Someone else have a pointer?
Once you have the token (how to get that is not covered here) you can map it to auth/token and set auth/type to Bearer when calling pub.client:http. Presumably supported for pub.client:restClient too as it has the same vars defined – but as noted above, it is unclear if restClient is intended for our use.
For such use case better to use httpClient service. The pub.client:restClient service is meant for internal use only and requires some parameters which are generated runtime only so it can’t be used independently. The httpClient service should be sufficient in itself for this purpose.
I agree that using pub.client:http is the way to go. But it is very curious to me that pub.client:restClient is in the WmPublic package and is documented in the reference guide (though it seems out of date) but it is for “internal” use only. Typically, such services are 1) not in WmPublic; 2) not documented.
Can anyone shed light on why that is and what the future plan for that service might be? Was it mistakenly exposed?
No this was not mistakenly exposed. pub.client:restClient is used in association with the Swagger First Consumer. When the consumer is created each of the rest APIs in the swagger is created as a connector service and we use the restclient service to perform the actual invocation of the API. As the users see this service being present in the connector service, we are forced to put the restClient in the WmPublic. Hence we have documented the usage to be strictly internal along with the Swagger First Consumer.