Clone wiki

BibSonomy / documentation / api / methods / CreateFriends

List of all users

Method POST
URL https://www.bibsonomy.org/api/users[username]/friends

Status codes

  • 201 created

  • 400 bad request

  • 401 Unauthorized
  • 403 Forbidden

  • 500 Internal Server Error

Example

Request:

curl -XPOST --user username:apikey "https://www.bibsonomy.org/api/users/username/friends" --header "Content-Type:application/xml" -d '
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bibsonomy>
  <user name="username"/>
</bibsonomy>'

Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bibsonomy stat="ok">
    <userid>username</userid>
</bibsonomy>

XML Schema

<!--
  this type encapsulates a list of users
-->
<xsd:complexType name="UsersType">
  <xsd:sequence>
    <xsd:element name="user" type="UserType" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
  <xsd:attribute name="start" type="xsd:positiveInteger" use="required"/>
  <xsd:attribute name="end" type="xsd:positiveInteger" use="required"/>
  <xsd:attribute name="next" type="xsd:anyURI"/>
</xsd:complexType>

<!--
  a user
-->
<xsd:complexType name="UserType">
  <xsd:sequence>
    <xsd:element name="groups" type="GroupsType" minOccurs="0" maxOccurs="1">
  </xsd:sequence>
  <xsd:attribute name="name" type="xsd:string" use="required"/>
  <xsd:attribute name="realname" type="xsd:string"/>
  <xsd:attribute name="email" type="xsd:string"/>
  <xsd:attribute name="homepage" type="xsd:string"/>
  <!-- link to details page -->
  <xsd:attribute name="href" type="xsd:anyURI"/>
</xsd:complexType>

Updated