cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve PI service user id from REST request message?

ivan_kalcha
Explorer
0 Kudos

Hi, I have a scenario in which a service consumer application makes a synchronous web service call via PI to ECC. The consumer application sends in the request with PI user credentials along with required parameters. Is it possible retrieve the PI user id from the request message? I know it is possible to do for SOAP adapter using ASMA and getting SRemoteUser value from dynamic configuration. That seems not working for REST. Anybody know how to do that for REST adapter?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ivan,

Have a look at this blog  below, hope it helps.

Cheers,

Faith

ivan_kalcha
Explorer
0 Kudos

I don't know how to add PI user ID into Dynamic Configuration structure. For SOAP adapter, it is done by enabling ASMA parameters but ASMA parameters checkbox is not possible for REST.

former_member186851
Active Contributor
0 Kudos

Hello Ivan,

Check the link shared by Faith it has the method to get dyanmic parameters.

ivan_kalcha
Explorer
0 Kudos

I checked the link and it was very helpful to show how to access the values from Dynamic Configuration list. I just need to know the name of the key that I need to pass to access the PI User ID value. Would you please suggest the name of the key?

former_member186851
Active Contributor
0 Kudos

Hello Ivan,

Little confused.

You need to add any key for authentication or retrieve any key from XML?

ivan_kalcha
Explorer
0 Kudos

I am not sure I understand when you wrote "You need to add any key". PI login credentials will be passed from the service consumer application at the time of the wen service call. In my scenario I need to retrieve the PI user id from the message request. I was hoping PI makes it possible to retrieve PI user id for REST adapter.

former_member186851
Active Contributor
0 Kudos

Hello Ivan,

You can select custom attributes and mention the name of the field in which has the PI user ID as the custom value.

ivan_kalcha
Explorer
0 Kudos

The calling application is required to authenticate with PI by using HTTP basic authentication. PI user ID is not passed as URL parameter.