Authenticating with Basic Authentication

Connecting to a REST API that requires basic access authentication is one of the simplest authentication mechanisms, as it passes the credentials (username and password) with each call in the Authorization HTTP header. For more information, refer to Web Services Authentication Methods.

To connect to a REST API using basic authentication:

  1. Open Workbench and in Project Explorer, expand your project > Data Connectivity.

  2. Right-click Web Services and select Create a new Folder. Give the folder a name and click Apply.

    You can skip this step and use an existing folder, like the default Sample Web Services folder.

  3. In Project Explorer, right-click the desired folder and select Add REST Service. The REST service configuration dialog is displayed.
  4. Give the service a name and in the General Settings section in Base URL, enter the URL for the desired REST API. This information is typically available in the API documentation.
  5. In Authentication, select Basic. The authentication settings are displayed in the Connection Credentials section.

  6. In User Name and Password, enter the appropriate credentials to access the REST API, and then click Apply. Every web method configured under this service passes the credentials in the Authorization HTTP header.