Oracle Content & Experience Cloud Service: API REST Example

The following example shows how to make a REST API call to get folder information from ann HTML page:



function UserAction() {

    var xhttp = new XMLHttpRequest();"GET", "", false);

    xhttp.setRequestHeader("Accept", "application/json, text/plain, */*");

    xhttp.setRequestHeader("Authorization", "Basic " + btoa(document.getElementById('u').value + ':' + document.getElementById('p').value ));


    alert( document.getElementById('u').value );

    var response = JSON.parse(xhttp.responseText);






  User name:<br>

  <input type="text" name="username" id="u"><br>

  User password:<br>

  <input type="password" name="psw" id="p">


<button type="submit" onclick="UserAction()">Search</button>



Related post

Enjoy 😉

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.