Video: Access Resources via the REST API

You can access resources in Oracle B2C Service, using Connect REST API. The resources include collections of primary objects such as all Contacts or Organizations.

To access the resources in Oracle B2C Service using the Connect REST API, you need to create a URL by entering the interface name followed by the path to your REST resources on B2C Service in your browser. For example:

https://interface_name/services/rest/connect/version_number

If you know the version number, you can add it directly to the URL, for example:

https://interface_name/services/rest/connect/v1.3

If you want latest version, you need to add 'latest' to the URL, for example:

https://interface_name/services/rest/connect/latest

Note:

This is the base URL, which provides information on all the resource collections that you can access with REST. The names of resource collections are the same as the names of object types in Oracle B2C Service Common Object Model, except that they're plural and camelCase. That is, all the words after the first word are capitalized and there are no spaces, dashes, or underscores between the words. This capitalization is done to be consistent with standard REST practices.

For example, to access a single collection, such as a list of all the contacts present in a database, you need to query the database as follows:

https://interface_name/services/rest/connect/v1.3/contacts 

To get detailed information about an individual record in JSON format, you need to query the individual record id as follows:

https://interface_name/services/rest/connect/v1.3/contacts/contact_id 

You can also get specific details about a particular individual record. For example, if you need to know the emails related to a contact, you need to query the database as follows:

https://interface_name/services/rest/connect/v1.3/contacts/contact_id/emails 

If you want to get the email address itself, you need to query the database as follows:

https://interface_name/services/rest/connect/v1.3/contacts/contact_id/emails/email_id