3DEXPERIENCE RESTful Web Services - Authentication Alternative

If you have experience with the 3DEXPERIENCE RESTful web service API, then you'll be very familiar with the fist step in the process -- Authentication. It can be quite cumbersome as it requires a multi-step process, involving login tickets along with cookie and session management.

What if there was an easier way? Well, now there is... using a Basic Authentication header provided by the license Enterprise Integration Architect (PFI)​​​​​​​ role!  The Enterprise Integration Architect role has many other robust features, but the ability to quickly and easily execute web services against the platform is one not to overlook. Currently, this role and capability is only available on-cloud.

Using the Agent Management widget bundled with PFI, you can create authorized credentials that can access the platform via a proxy 3DPassport user.  You can use these credentials to execute web service calls directly on behalf of this user.  All product web service licensing is still enforced, but is based on the 3DPassport proxy user that is defined when setting up a new integration agent.

To learn more about the PFI license and how it fits into the broader topic of the Enterprise Integration Framework, take a look at @RV's ​​​​​​​post.

 

Setup

As a user assigned the role PFI open the Agent Management widget and select the '+' to create a new agent.

Fill out the Agent Name and Allowed Passport User and click Generate.  After successful generation be sure to copy the Agent ID and Agent Password to secure location.  The Agent Password will not be shown again after this step and can only be regenerated to something new.

Name: Name of the agent (only used to identify the agent in the widget) Allowed Passport User: User credentials of a user to proxy web service calls 
       - The user must NOT have an Administrator role
       - The user must have the licenses corresponding to the web services you wish to call 
       - There is no credential authentication so ensure username matches the credentials used to login


Select the Available Services tab to view the base URLs that can be used to call web services on the cloud instance you have created the Agent.

Execute Web Service

The Agent ID and Agent Password created by the Agent Manager can be used to generate a Base64 encoded Basic Authorization header.

Encode String:   agent_id:agent_password (separated by a colon)

Ex.  5f5420bd-ee25-4f90-9714-1d35053bb0c9:dummy_password = NWY1NDIwYmQtZWUyNS00ZjkwLTk3MTQtMWQzNTA1M2JiMGM5OmR1bW15X3Bhc3N3b3Jk

Authorization Header = Basic NWY1NDIwYmQtZWUyNS00ZjkwLTk3MTQtMWQzNTA1M2JiMGM5OmR1bW15X3Bhc3N3b3Jk

This Authorization header can then be used by any of the 3DEXPERIENCE web service calls to the platform.


Tips_and_Tricks ​​​​​​​Platform ​​​​​​​Enterprise Integration Architect