Add/update user login for given portal.
If method is requested by GET request - return information needed to add/update login.
If data is posted to this url using POST or PUT requests - add/update login for portal.
Parameters
No additional parameters
Requesting subscription information
To request fields information need to request url with GET method. In response will be returned list of fields needed to be filled in order to add/update user login for portal. Every field has element and type.
- element - html element for field
- type - always login for this request. See /ws/rest/v1/portals/<portal_id>/subscribe
Example
Request
GET https://ws.idibu.com/ws/rest/v1/portals/517/set-user-login?hash=[your_hash]
Response
<?xml version="1.0" encoding="utf8"?>
<idibu generator="idibu" version="1.0">
<response>
<help></help>
<fields>
<field>
<element>text</element>
<name>userName</name><title></title>
<maxchars></maxchars>
<type>login</type>
</field>
<field>
<element>text</element>
<name>userPassword</name><title></title>
<maxchars></maxchars>
<type>login</type>
</field>
</fields>
</response>
<status>success</status>
</idibu>
Add/update user login
In order to add/update user login need to post/put variable called data with XML containing filled fields needed to subscribe.
Example
Posted data
POST https://ws.idibu.com/ws/rest/v1/portals/517/set-user-login?hash=[your_hash]
<?xml version="1.0"?>
<idibu>
<user-id>682</user-id>
<fields>
<field>
<name>userName</name>
<value>put your user name here</value>
</field>
<field>
<name>userPassword</name>
<value>put your password here</value>
</field>
</fields>
</idibu>
Response
<?xml version="1.0" encoding="utf8"?>
<idibu generator="idibu" version="1.0">
<response>
<message>User login has been set</message>
</response>
<status>success</status>
</idibu>