Wiki

Clone wiki

BibSonomy / documentation / api / methods / AddRelationToPerson

Add a relation to a person

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

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/persons/[personid]/relations" --header "Content-Type:application/xml" -d \
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bibsonomy>
    <resourcePersonRelation>
        <resource interHash="interhash" intraHash="intrahash"/>
        <relationType>author</relationType>
        <personIndex>1</personIndex>
    </resourcePersonRelation>
</bibsonomy>'

Response:

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

Updated