Returns an object that can be used to make web service requests to the repository.

It is critical to restrict user accounts associated with tokens embedded in JavaScript code to only be able to access content and perform operations available to the public.  This is because anyone can easily obtain the token from web browser developer tools or by sniffing internet traffic, and then used to perform their own custom requests to retrieve any content available to that user account.


repo repo(object options = {})


  • options - An object with the following optional property/value pairs.
    • token - The authorization token to make requests to the server.


Returns a repo, or false on failure.


The following example web page uses the JavaScript API to retrieve and display a list of contacts.

<script src="https://<account>.webcomand.com/js/comand.js"></script>
<!-- include your JavaScript(s) that use the API here, or... -->
    // write your inline code here, like:
    var repo = comand.repo({token: '<token>'});
    var contacts = repo.get('FROM Contact ORDER BY LastName, FirstName');
    contacts.forEach(function(contact) {
        document.writeln('<li>' + contact.FullName + '<li>');