blob: f335e1d7d2e72881a909d898653e0255dbde92ac [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Generated by Apache Maven Doxia at 2018-02-23
Rendered using Reflow Maven Skin 1.3.6 (http://devacfr.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<title>Apache OpenMeetings Project &#x2013; REST API sample</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Apache OpenMeetings Team" />
<meta http-equiv="content-language" content="en" />
<link href=".//css/bootstrap.min.css" rel="stylesheet" />
<link href=".//css/bootstrap-responsive.min.css" rel="stylesheet" />
<link href=".//css/docs.css" rel="stylesheet" />
<link href=".//css/reflow-skin.css" rel="stylesheet" />
<link href=".//css/lightbox.css" rel="stylesheet" />
<link href=".//css/site.css" rel="stylesheet" />
<link href=".//css/print.css" rel="stylesheet" media="print" />
<link rel="stylesheet" href=".//css/site.css"/>
</head> <!-- end : head -->
<body class="page-restapisample project-openmeetings-server" data-spy="scroll" data-offset="70" data-target="#toc-scroll-target">
<div id="m-top-navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#top-navbar-collapse-1" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><span class="color-highlight">Apache</span> OpenMeetings</a>
</div> <!-- .navbar-header -->
<div class="collapse navbar-collapse" id="top-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li ><a href="demo.html" title="Demo" >Demo</a></li>
<li ><a href="downloads.html" title="Download" >Download</a></li>
<li ><a href="https://cwiki.apache.org/confluence/display/OPENMEETINGS" title="Wiki" class="externalLink" >Wiki</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">General <b class="caret"></b></a>
<ul class="dropdown-menu">
<li ><a href="index.html" title="Home" >Home</a></li>
<li ><a href="http://www.apache.org/licenses/" title="License" class="externalLink" >License</a></li>
<li ><a href="http://www.apache.org/" title="ASF" class="externalLink" >ASF</a></li>
<li ><a href="https://www.apache.org/foundation/sponsorship" title="Sponsorship" class="externalLink" >Sponsorship</a></li>
<li ><a href="https://www.apache.org/foundation/thanks" title="Thanks" class="externalLink" >Thanks</a></li>
<li ><a href="CallForLogo.html" title="Call For Logo" >Call For Logo</a></li>
<li ><a href="NewsArchive.html" title="News archive" >News archive</a></li>
<li ><a href="security.html" title="Security" >Security</a></li>
<li ><a href="commercial-support.html" title="Commercial Support" >Commercial Support</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Installation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li ><a href="installation.html" title="Installation" >Installation</a></li>
<li ><a href="Upgrade.html" title="Upgrade" >Upgrade</a></li>
<li ><a href="https://cwiki.apache.org/confluence/display/OPENMEETINGS/Tutorials+for+installing+OpenMeetings+and+Tools" title="Tutorials" class="externalLink" >Tutorials</a></li>
<li ><a href="CommandLineAdmin.html" title="Command Line Admin" >Command Line Admin</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
<ul class="dropdown-menu">
<li ><a href="get-involved.html" title="Get Involved" >Get Involved</a></li>
<li ><a href="team-list.html" title="Committers" >Committers</a></li>
<li ><a href="OurUsers.html" title="Our Users" >Our Users</a></li>
<li ><a href="mail-lists.html" title="Mailing Lists" >Mailing Lists</a></li>
<li ><a href="http://cwiki.apache.org/confluence/display/OPENMEETINGS/" title="Wiki" class="externalLink" >Wiki</a></li>
</ul>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Configuration <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu ">
<a href="RestAPISample.html#integration" title="Integration" >Integration</a> <ul class="dropdown-menu">
<li ><a href="openmeetings-webservice/apidocs/index.html" title="SOAP/REST API" target="_blank" >SOAP/REST API</a></li>
<li class="active" ><a href="" title="REST API Sample" >REST API Sample</a></li>
<li ><a href="LdapAndADS.html" title="Ldap and ADS" >Ldap and ADS</a></li>
<li ><a href="oauth2.html" title="OAuth2" >OAuth2</a></li>
<li ><a href="voip-sip-integration.html" title="VoIP and SIP" >VoIP and SIP</a></li>
<li ><a href="errorvalues.html" title="Errors table" >Errors table</a></li>
<li ><a href="CalDAVandGCal.html" title="CalDAV and Google Calendar integration" >CalDAV and Google Calendar integration</a></li>
<li ><a href="ExternalVideo.html" title="External Video/Camera" >External Video/Camera</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#plugins" title="Plugins" >Plugins</a> <ul class="dropdown-menu">
<li ><a href="MoodlePlugin.html" title="Moodle Plugin" >Moodle Plugin</a></li>
<li ><a href="SakaiPlugin.html" title="Sakai Plugin" >Sakai Plugin</a></li>
<li ><a href="JiraPlugin.html" title="Jira Plugin" >Jira Plugin</a></li>
<li ><a href="JoomlaPlugin.html" title="Joomla Plugin" >Joomla Plugin</a></li>
<li ><a href="DrupalPlugin.html" title="Drupal Plugin" >Drupal Plugin</a></li>
<li ><a href="BitrixPlugin.html" title="Bitrix Plugin" >Bitrix Plugin</a></li>
<li ><a href="ConfluencePlugin.html" title="Confluence Plugin" >Confluence Plugin</a></li>
<li ><a href="SugarCRMPlugin.html" title="SugarCRM Plugin" >SugarCRM Plugin</a></li>
<li ><a href="RedminePlugin.html" title="Redmine Plugin" >Redmine Plugin</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#db" title="DB Sample Configurations" >DB Sample Configurations</a> <ul class="dropdown-menu">
<li ><a href="ApacheDerbyConfig.html" title="Apache Derby" >Apache Derby</a></li>
<li ><a href="IBMDB2Config.html" title="IBM DB2" >IBM DB2</a></li>
<li ><a href="OracleConfig.html" title="Oracle" >Oracle</a></li>
<li ><a href="MySQLConfig.html" title="MySQL" >MySQL</a></li>
<li ><a href="PostgresConfig.html" title="Postgres" >Postgres</a></li>
<li ><a href="MSSQLConfig.html" title="MSSQL" >MSSQL</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#localization" title="Localization and languages" >Localization and languages</a> <ul class="dropdown-menu">
<li ><a href="Internationalisation.html" title="Internationalisation" >Internationalisation</a></li>
<li ><a href="LanguageEditor.html" title="LanguageEditor" >LanguageEditor</a></li>
<li ><a href="TimeZoneHandling.html" title="TimeZoneHandling" >TimeZoneHandling</a></li>
<li ><a href="EditTemplates.html" title="EditTemplates" >EditTemplates</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#port" title="NAT Port Settings" >NAT Port Settings</a> <ul class="dropdown-menu">
<li ><a href="PortSettings.html" title="Port settings" >Port settings</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#performance" title="Performance" >Performance</a> <ul class="dropdown-menu">
<li ><a href="JVMPerformanceTuning.html" title="JVM performance tuning" >JVM performance tuning</a></li>
<li ><a href="NetworkCalculator.html" title="Network bandwidth calculator" >Network bandwidth calculator</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#interface" title="User Interface" >User Interface</a> <ul class="dropdown-menu">
<li ><a href="themes-and-branding.html" title="Themes" >Themes</a></li>
<li ><a href="Dashboard.html" title="Dashboard" >Dashboard</a></li>
<li ><a href="WebcamResolutions.html" title="Webcam resolutions" >Webcam resolutions</a></li>
<li ><a href="ConferenceRoomLayoutOptions.html" title="Room layout options" >Room layout options</a></li>
<li ><a href="HotKeys.html" title="Hot Keys" >Hot Keys</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#customize" title="Customization" >Customization</a> <ul class="dropdown-menu">
<li ><a href="WebappNamePath.html" title="Webapp name/path" >Webapp name/path</a></li>
<li ><a href="Navigation.html" title="Navigation" >Navigation</a></li>
<li ><a href="CalendarAndTimezone.html" title="Calendar and timezone" >Calendar and timezone</a></li>
<li ><a href="CustomRoomTypeHowTo.html" title="Custom room type" >Custom room type</a></li>
<li ><a href="CustomCryptMechanism.html" title="Custom crypt mechanism" >Custom crypt mechanism</a></li>
<li ><a href="GeneralConfiguration.html" title="General Configuration" >General Configuration</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#security" title="Security" >Security</a> <ul class="dropdown-menu">
<li ><a href="RestrictedAccess.html" title="Restricted Access" >Restricted Access</a></li>
<li ><a href="RTMPSAndHTTPS.html" title="RTMPS and HTTPS" >RTMPS and HTTPS</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#convert" title="Converters" >Converters</a> <ul class="dropdown-menu">
<li ><a href="OpenOfficeConverter.html" title="OpenOffice Converter" >OpenOffice Converter</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#cluster" title="Clustering" >Clustering</a> <ul class="dropdown-menu">
<li ><a href="Clustering.html" title="Clustering" >Clustering</a></li>
</ul>
</li>
<li class="dropdown-submenu ">
<a href="RestAPISample.html#misc" title="Misc" >Misc</a> <ul class="dropdown-menu">
<li ><a href="GetVersionInfo.html" title="Get version info" >Get version info</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
<ul class="dropdown-menu">
<li ><a href="source-repository.html" title="Source Code" >Source Code</a></li>
<li ><a href="issue-tracking.html" title="Bugs / Issues" >Bugs / Issues</a></li>
<li ><a href="dependencies.html" title="Dependencies" >Dependencies</a></li>
<li ><a href="integration.html" title="Continuous Integration" >Continuous Integration</a></li>
<li ><a href="BuildInstructions_3.0.x.html" title="Build Instructions 3.0.x" >Build Instructions 3.0.x</a></li>
<li ><a href="BuildInstructions.html" title="Build Instructions" >Build Instructions</a></li>
<li ><a href="JUnitTesting.html" title="JUnit Testing" >JUnit Testing</a></li>
<li ><a href="ManualTesting.html" title="Manual Testing" >Manual Testing</a></li>
<li ><a href="ReleaseGuide.html" title="Release Guide" >Release Guide</a></li>
<li ><a href="WebsiteGuide.html" title="Website Guide" >Website Guide</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div> <!--/.container -->
</div> <!--/.navbar -->
<div class="container">
<!-- Masthead -->
<!-- ================================================== --> <div class="header container-fluid">
<div class="jumbotron subhead">
<div class="row" id="banner">
<div class="col-md-12">
<div class="pull-left">
<a href="index.html" id="bannerLeft">
<img src="images/logo.png"
alt='"'Apache OpenMeetings'"'
/> </a>
</div>
<div class="pull-right">
<a href="https://apache.org" id="bannerRight">
<img src="https://apache.org/img/asf_logo.png"
alt='"'Apache'"'
/> </a>
</div>
</div>
</div>
</div>
<div>
<ol class="breadcrumb">
<li class="publishDate version-date">
Last Published: 2018-02-23
</li>
</ol>
</div>
</div> <!-- end : header -->
<div class="main-body">
<div class="row">
<div class="col-md-8">
<div class="body-content">
<div class="section">
<div class="page-header">
<h2 id="_toc_introduction">Introduction</h2>
</div>
<p> For a detailed instruction which services, methods and params are available see the list in the <a href="/openmeetings-webservice/apidocs/index.html" target="_blank">SOAP/REST API</a> . ALL methods that are implemented for the SOAP API are also available via REST. </p>
<div>
you can query methods of each service using following suffixes
<ul>
<li>SOAP: <tt>?wsdl</tt> suffix, for example <tt>http://localhost:5080/openmeetings/services/UserService?wsdl</tt></li>
<li>REST: as xml <tt>?_wadl</tt> for example <tt>http://localhost:5080/openmeetings/services/user?_wadl</tt></li>
<li>REST: as json <tt>?_wadl&amp;type=json</tt> for example <tt>http://localhost:5080/openmeetings/services/user?_wadl&amp;type=json</tt></li>
</ul>
<div class="bs-callout bs-callout-info">
The full list of services with All WSDLs/WADLs is available at following URL:
<tt>http://localhost:5080/openmeetings/services/services</tt>
</div>
</div>
</div>
<div class="section">
<h2 id="_toc_how_to_get_room_hash_via_rest">How to get room hash via REST</h2>
<ul>
<li> First of all you need to perform login and get authorized SID to perform authorized operations
<table border="0" class="bodyTable table table-striped table-hover">
<tbody>
<tr class="a">
<td>Request</td>
<td>Error response</td>
<td>Successful response</td>
</tr>
<tr class="b">
<td>
<div class="source">
<pre>
$.ajax({
method: "GET",
url: "services/user/login",
data: {user: 'admin', pass: '12345'},
dataType: "json"
});
</pre>
</div> </td>
<td>
<div class="source">
<pre>
{
"serviceResult": {
"code": -11,
"type": "ERROR"
}
}
</pre>
</div> </td>
<td>
<div class="source">
<pre>
{
"serviceResult": {
"code": 1,
"message": "78189aff-d68d-458a-8840-5b18d15a50b0",
"type": "SUCCESS"
}
}
</pre>
</div> </td>
</tr>
</tbody>
</table> </li>
<li> In case of error you can get detailed error message in your language as result of following query <tt>http://localhost:5080/openmeetings/services/error/<b>ERROR_ID</b>/<b>LANGUAGE_ID</b></tt> (for ex. http://localhost:5080/openmeetings/services/error/<b>-11</b>/<b>9</b>) </li>
<li>If your request was successful you will get your SID as <b>message</b> (78189aff-d68d-458a-8840-5b18d15a50b0)</li>
<li>Then you can use SID to generate room hash
<table border="0" class="bodyTable table table-striped table-hover">
<tbody>
<tr class="a">
<td>Request</td>
<td>Successful response</td>
</tr>
<tr class="b">
<td>
<div class="source">
<pre>
$.ajax({
method: "POST",
url: "services/user/hash?sid=78189aff-d68d-458a-8840-5b18d15a50b0",
data: {user: JSON.stringify({
firstname: 'John',
lastname: 'Doe',
externalId: 'uid1',
externalType: 'myCMS',
login: 'superjohn'
}),
options: JSON.stringify({
roomId: 5,
moderator: true,
showAudioVideoTest: true
})
},
dataType: "json"
})
</pre>
</div> </td>
<td>
<div class="source">
<pre>
{
"serviceResult": {
"code": 0,
"message": "fa1f9381-bd03-42ae-9fd9-332b5f775a1b",
"type": "SUCCESS"
}
}
</pre>
</div> </td>
</tr>
</tbody>
</table> </li>
<li>If your request was successful you will get your hash as <b>message</b> (fa1f9381-bd03-42ae-9fd9-332b5f775a1b)</li>
<li>Now you can use following URL to enter the room: <tt>http://localhost:5080/openmeetings/hash?secure=fa1f9381-bd03-42ae-9fd9-332b5f775a1b&amp;language=1</tt></li>
</ul>
</div> </div>
</div>
<div class="col-md-4">
<div id="toc-sidebar" class="hidden-print hidden-xs hidden-sm" data-spy="affix" >
<div id="toc-scroll-target">
<div class="well">
<ul class="nav m-nav--sidebar m-aside-toc">
<li class="nav-header">Table of Contents</li>
<li>
<a href="#_toc_introduction" title="Introduction">
<span class="fa fa-angle-double-right"></span> Introduction
</a>
</li>
<li>
<a href="#_toc_how_to_get_room_hash_via_rest" title="How to get room hash via REST">
<span class="fa fa-angle-double-right"></span> How to get room hash via REST
</a>
</li>
</ul>
</div>
</div>
</div>
</div> <!-- /row -->
</div>
</div> <!-- end : row -->
</div> <!-- /container -->
<!-- Footer
================================================== -->
<footer class="well">
<div class="container">
<div class="row">
<div class="col-md-3 bottom-nav">
<ul class="nav nav-list">
<li class="nav-header">General</li>
<li ><a href="index.html" title="Home" >Home</a></li>
<li ><a href="http://www.apache.org/licenses/" title="License" class="externalLink" >License</a></li>
<li ><a href="http://www.apache.org/" title="ASF" class="externalLink" >ASF</a></li>
<li ><a href="https://www.apache.org/foundation/sponsorship" title="Sponsorship" class="externalLink" >Sponsorship</a></li>
<li ><a href="https://www.apache.org/foundation/thanks" title="Thanks" class="externalLink" >Thanks</a></li>
<li ><a href="CallForLogo.html" title="Call For Logo" >Call For Logo</a></li>
<li ><a href="NewsArchive.html" title="News archive" >News archive</a></li>
<li ><a href="security.html" title="Security" >Security</a></li>
<li ><a href="commercial-support.html" title="Commercial Support" >Commercial Support</a></li>
</ul>
</div>
<div class="col-md-3 bottom-nav">
<ul class="nav nav-list">
<li class="nav-header">Installation</li>
<li ><a href="installation.html" title="Installation" >Installation</a></li>
<li ><a href="Upgrade.html" title="Upgrade" >Upgrade</a></li>
<li ><a href="https://cwiki.apache.org/confluence/display/OPENMEETINGS/Tutorials+for+installing+OpenMeetings+and+Tools" title="Tutorials" class="externalLink" >Tutorials</a></li>
<li ><a href="CommandLineAdmin.html" title="Command Line Admin" >Command Line Admin</a></li>
</ul>
</div>
<div class="col-md-3 bottom-nav">
<ul class="nav nav-list">
<li class="nav-header">Community</li>
<li ><a href="get-involved.html" title="Get Involved" >Get Involved</a></li>
<li ><a href="team-list.html" title="Committers" >Committers</a></li>
<li ><a href="OurUsers.html" title="Our Users" >Our Users</a></li>
<li ><a href="mail-lists.html" title="Mailing Lists" >Mailing Lists</a></li>
<li ><a href="http://cwiki.apache.org/confluence/display/OPENMEETINGS/" title="Wiki" class="externalLink" >Wiki</a></li>
</ul>
</div>
<div class="col-md-3 bottom-nav">
<ul class="nav nav-list">
<li class="nav-header">Development</li>
<li ><a href="source-repository.html" title="Source Code" >Source Code</a></li>
<li ><a href="issue-tracking.html" title="Bugs / Issues" >Bugs / Issues</a></li>
<li ><a href="dependencies.html" title="Dependencies" >Dependencies</a></li>
<li ><a href="integration.html" title="Continuous Integration" >Continuous Integration</a></li>
<li ><a href="BuildInstructions_3.0.x.html" title="Build Instructions 3.0.x" >Build Instructions 3.0.x</a></li>
<li ><a href="BuildInstructions.html" title="Build Instructions" >Build Instructions</a></li>
<li ><a href="JUnitTesting.html" title="JUnit Testing" >JUnit Testing</a></li>
<li ><a href="ManualTesting.html" title="Manual Testing" >Manual Testing</a></li>
<li ><a href="ReleaseGuide.html" title="Release Guide" >Release Guide</a></li>
<li ><a href="WebsiteGuide.html" title="Website Guide" >Website Guide</a></li>
</ul>
</div>
</div>
</div>
</footer>
<div class="container subfooter">
<div class="row">
<div class="col-md-12">
<p class="pull-right"><a id="m-scroll-top" href="#">Back to top</a></p>
<p class="copyright">Copyright &copy;2012-2018 <a href="http://apache.org">Apache Software Foundation</a>
. All Rights Reserved.</p>
<p>Apache OpenMeetings, OpenMeetings, Apache, the Apache feather, and the Apache OpenMeetings project logo</p>
<p>are trademarks of the Apache Software Foundation.</p>
</div>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src=".//js/jquery.min.js"></script>
<script src=".//js/bootstrap.min.js"></script>
<script src=".//js/lightbox.min.js"></script>
<script src=".//js/reflow-scroll.js"></script>
<script src=".//js/site.js" type="text/javascript"></script>
<script src=".//js/jquery-ui.min.js" type="text/javascript"></script>
<script src=".//js/netcalc.js" type="text/javascript"></script> <script src=".//js/reflow-skin.js"></script>
<script src=".//js/anchor.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
anchors.options = {
placement: 'left',
};
anchors.add('h1,h2, h3, h4, h5, h6');
});
</script>
</body>
</html>