Skip to main content

subscribe-to-portal-and-get-subscription-info

If you make a GET request to this URL, providing that the portal ID is valid, and you provide as well your hash, the system will return the subscription information for that board; namely, the list of fields that are required to subscribe to the board, the type of the field, and the possible values if applies. You will have to provide tags for non-required fields, but feel free to leave them blank if you don't wish to provide any value.

 

In order to subscribe, you have to make a POST request to the same address, with the data parameter set to the XML that provides the subscription information.

 

You can find examples of the information returned by the system when making either kind of request, and how the data should be sent when subscribing to a portal.

Parameters

No additional parameters

Requesting subscription information

To request subscription information need to request url with GET method. In response will be returned list of fields needed to be filled in order to subscribe to portal. Every field has element and type.

  • element - html element for field
  • type - can be general or login.
    • general - field is used globally for portal.
    • login - field is used to create logins for offices/teams/users, when subscribing to portal fields of login type are used to set global default login.

Example

Request

GET https://ws.idibu.com/ws/rest/v1/portals/123/subscribe?hash=[your_hash]

Response

<?xml version="1.0" encoding="utf8"?>
<idibu generator="idibu" version="1.0">
<response>
<help>Please contact the board before your first posting and let them know you\&#39;ll be using idibu as your service provider. They need to enable proper option on their end first.</help>
<fields>
<field>
<element>select</element>
<name>stv_method</name>
<values>
<value>
<name>Please Select...</name>
<value></value>
</value>
<value>
<name>Auto Forwarded Applications</name>
<value>AutoForwardedApplications</value>
</value>
<value>
<name>Response Management</name>
<value>ResponseManagement</value>
</value>
<value>
<name>External Redirect</name>
<value>ExternalRedirect</value>
</value>
<value>
<name>Offline Applications</name>
<value>OfflineApplications</value>
</value>
</values>
<type>general</type>
</field>
<field>
<element>text</element>
<name>stv_rid</name>
<maxchars></maxchars>
<type>login</type>
</field>
</fields>
</response>
<status>success</status>
</idibu>

Subscribing to portal

To subscribe to a portal you need to send xml in the data variable using POST method.

Request

POST https://ws.idibu.com/ws/rest/v1/portals/123/subscribe?hash=[your_hash]
<?xml version="1.0" encoding="utf8"?>
<request>
<fields>
<field>
<name>stv_method</name>
<value>bla bla</value>
</field>
<field>
<name>stv_rid</name>
<value>12345</value>
</field>
</fields>
</request>

Response:

<?xml version="1.0" encoding="utf8"?>
<idibu generator="idibu" version="1.0">
<response>
<message>Portal added</message>
</response>
<status>success</status>
</idibu>