ID: 1883

Zoom Utility Web API

This section covers some of the utility APIs that will come in handy for IT administrators or users who depend on scripting with Zoom APIs

For purposes of scripting, or even in general, it is vital to know details about the deployment. By issuing the command “getcredentials” via the Web API framework, you can gather generic details like the address of the Zoom Preview Server, Zoom Admin Server, availability of support for SSL connections, etc. and also user-specific details like the current valid authentication cookie for the user, the roles he / she belongs in, the projects he / she belongs in etc.

Request URL:

http://zm.server:8443/command?zm_username=joe&zm_password=joe&data={clientVersion:%22ZoomClient/4.1-b5835%22,cmd:getcredentials}

Response JSON:

{

  • zm_cookie: “37-338dda46558ee05f6e0840cac3e0d2ca7bab79e0″,
  • ssl_webmin_desktop: “false”,
  • has_admin_right: “true”,
  • ssl_rv_desktop: “false”,
  • projects: “defproj, Señál, Website-WP, Android-Apps”,
  • rv_server: http://192.168.56.1:8873,
  • svr_realm: “ZoomRealm”,
  • roles: “superadmin”,
  • zm_username: “joe”,
  • success: true,
  • upload_to_preview_server: “true”,
  • wbm_server: http://192.168.56.1:8443

}

 

The API can be used to convert a Zoom FUID (File Unique Identifier aka Asset ID visible in Asset browser) to a fully qualified path for the asset stored on the Zoom server and vice versa.

Install

If util.jsp is not already installed (post 5.2 releases) in the the Zoom server folder located at  <zoom-server-install-folder>/web/app/webmin/, then do the following steps:

  1. Download and copy util.jsp to <zoom-server-install-folder>/web/app/webmin/
  2. Modify the J2EE web.xml file in <zoom-server-install-folder>/web/app/webmin/WEB-INF/ folder to add an entry for util.jsp under the following security-constraint tag:<security-constraint>
    <web-resource-collection>
    <web-resource-name>Access to all</web-resource-name>
    <url-pattern>/firsttime.jsp</url-pattern>
    ………….
          <url-pattern>/util.jsp</url-pattern>
    </web-resource-collection>
    </security-constraint>
  3. Restart the Zoom server

Syntax

The syntax of URL on which to make the JSON call is:

<zoom_webadmin_server:port>/util.jsp?op=getfuid&path=/fq/path[&json=true|false]
<zoom_webadmin_server:port>/util.jsp?op=getpath&fuid=<asset-id>[&json=true|false]
For example -
http://host:8443/util.jsp?op=getfuid&path=/Advertising/From%20Hot%20Folder/VH%20%C3%B1.png&json=true
Once URL is formed, then we can make an HTTP GET call to above URL with the URL Encoded parameters.
The 4 variants are described below:

 

URL GET Request to convert Asset ID to Path:

http://host:8443/util.jsp?fuid=10&op=getpath

Response:

path=”/fq/path”

URL GET Request to convert Asset ID to Path in JSON:

http://host:8443/util.jsp?fuid=10&op=getpath&json=true

JSON Response:

{

“path”: “/Advertising/From Hot Folder/VH ñ.png”,

“fuid”: “10”

}

URL GET Request to convert Path to Asset ID:

http://host:8443/util.jsp?op=getfuid&path=/Advertising/From%20Hot%20Folder/VH%20%C3%B1.png

Response:

Response: fuid=”10″

URL GET Request to convert Path to Asset ID in JSON:

http://host:8443/util.jsp?op=getfuid&path=/Advertising/From%20Hot%20Folder/VH%20%C3%B1.png&json=true

JSON response

{

“path”: “/Advertising/From Hot Folder/VH ñ.png”,

“fuid”: “10”

}