How to validate if REST API is successfully deployed on content server

Options

Hi

I am very new to the REST API & AppWorks arena. I have installed CS 10.5 on Windows 2008 & would like validate if REST API is successfully deployed. Also, what significance does jQuery.js file play in-terms authenticating, adding documents to content server using REST API's. In theory does REST API & jQuery always go together. Please Help.

Vijhay D

Comments

  • The CS REST API is a core module always deployed with the CS 10.5. You don't need to check it. Only for the previous version of the CS - 10.0 - you have to install it on the "Install Module" administration page; it is automatically deployed to the staging directory for you, at least. (Web Services are different, because their SOAP-handling part is implemented outside the OScript server core. The CS REST API is fully implemented in OScript.)

    jQuery is library simplifying access to the browser functionality: DOM access, AJAX support and it adds some generally useful utilities. It is not directly connected to or required for the CS REST API, but it is the most often used component to make the AJAX calls from the web browser. Samples you will find in this forum use it, for example.

    About the authentication, you can use both the explicit /auth call getting the OTCSTicket value, or the Basic Authentication which is widely supported by tools calling REST APIs.

    About the document upload, you'd use the FormData object, for which jQuery sets you the the multipart/form-data content type automatically. See also another topic here about this.

  • you can curl from the command line like this

    curl -v -d "username=your_name" -d "password=you_secret" http://www.server.com/<name-of-your-instance>/api/v1/auth
    

    If the REST API is available you should get back a JSON response.