Wiki

Clone wiki

BibSonomy / documentation / api / methods / ListOfRelationsForPerson

List of all relations for a person

Method GET
URL https://www.bibsonomy.org/api/persons/[personid]/relations

Status codes

  • 200 ok

  • 400 bad request

  • 401 Unauthorized
  • 403 Forbidden

  • 500 Internal Server Error

Example

Request:

curl  -XGET --user username:apikey "https://www.bibsonomy.org/api/persons/personid/relations"

Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bibsonomy stat="ok">
    <resourcePersonRelations>
        <resourcePersonRelation>
            <person personId="personid">
                <mainName firstName="Max" lastName="Mustermann"/>
                <user name="username"/>
            </person>
            <resource interHash="interhash" intraHash="intrahash"/>
            <relationType>author</relationType>
            <personIndex>1</personIndex>
        </resourcePersonRelation>
    </resourcePersonRelations>
</bibsonomy>

XML Schema

<!--
  this type encapsulated a list of relations
-->
<xsd:complexType name="ResourcePersonRelationsType">
    <xsd:sequence>
        <xsd:element maxOccurs="unbounded" minOccurs="0" name="resourcePersonRelation" type="ResourcePersonRelationType" />
    </xsd:sequence>
    <xsd:attribute name="start" type="positiveIntegerIncludingZero" use="required" />
    <xsd:attribute name="end" type="positiveIntegerIncludingZero" use="required" />
    <xsd:attribute name="next" type="xsd:anyURI" />
</xsd:complexType>

<!--
    a relation
-->
<xsd:complexType name="ResourcePersonRelationType">
    <xsd:sequence>
        <xsd:element name="person" type="PersonType" />
        <xsd:element name="resource" type="ResourceLinkType" />
        <xsd:element name="relationType" type="RelationType" />
        <xsd:element name="personIndex" type="xsd:integer" />
    </xsd:sequence>
</xsd:complexType>

<!--
    a person
-->
<xsd:complexType name="PersonType">
    <xsd:complexContent>
        <xsd:extension base="LinkableType">
            <xsd:sequence>
                <xsd:element name="mainName" type="PersonNameType" />
                <xsd:element name="names" type="PersonNameType" minOccurs="0" maxOccurs="unbounded" />
                <xsd:element name="user" type="UserType" minOccurs="0" />
            </xsd:sequence>
            <xsd:attribute name="college" type="xsd:string" />
            <xsd:attribute name="academicDegree" type="xsd:string" />
            <xsd:attribute name="personId" type="xsd:string" />
            <xsd:attribute name="homepage" type="xsd:anyURI" />
            <xsd:attribute name="email" type="xsd:string" />
            <xsd:attribute name="orcid" type="xsd:string" />
            <xsd:attribute name="gender" type="GenderType" />
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

Updated