Wiki
Clone wikiBibSonomy / documentation / api / methods / CreatePerson
Create person
Method | POST |
---|---|
URL | https://www.bibsonomy.org/api/persons |
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" --header "Content-Type:application/xml" -d \ '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bibsonomy> <person> <mainName firstName="Max" lastName="Mustermann"/> </person> </bibsonomy>'
Response:
Iff successful the created person id personid
is returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bibsonomy stat="ok"> <personid>personid</personid> </bibsonomy>
XML Schema
<!-- 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