YouTrack InCloud 7.0 Help

Import Users

PUT /import/users

Bulk users import

PUT /rest/import/users?{test}

Parameters:

Name Type Description
test boolean If true, users are not saved, simple request check for correctness.

Request body xsd:

<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="list"> <xs:complexType> <xs:sequence> <xs:element name="user" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:attribute type="xs:string" name="login" use="required"/> <xs:attribute type="xs:string" name="fullName" use="optional"/> <xs:attribute type="xs:string" name="email" use="required"/> <xs:attribute type="xs:string" name="jabber" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

Response body xsd:

<?xml version="1.0" encoding="UTF-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="importReport"> <xs:complexType> <xs:sequence> <xs:element name="item" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="error" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute type="xs:string" name="fieldName" use="optional"/> <xs:attribute type="xs:string" name="value" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute type="xs:string" name="id"/> <xs:attribute type="xs:boolean" name="imported"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

Sample

Request:

PUT /rest/import/users?test=true <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <list> <user login="lenin" fullName="Ulyanov Vladimir Ilyich" email="lenin@mavzoley.su"/> <user login="stalin" fullName="Dzhugashvili Ioseb Besarionis" email="stalin@necropolis.cremlin.su"/> <user login="malenkov" fullName="Georgy Maximilianovich Malenkov" email="malenkov@kuntsevo.msk.ru"/> <user login="khrushchev" fullName="Khrushchev Nikita Sergeyevich" email="khrushchev@novodevichy.msk.ru"/> <user login="brezhnev" fullName="Brezhnev Leonid Ilyich" email="brezhnev@necropolis.cremlin.su"/> <user login="andropov" fullName="Andropov Yuri Vladimirovich" email="andropov@necropolis.cremlin.su"/> <user login="chernenko" fullName="Chernenko Konstantin Ustinovich" email="chernenko@necropolis.cremlin.su"/> <user login="gorbachev" fullName="Gorbachev Mikhail Sergeyevich" email="gorbachev@zaria.phoros.ua" jabber="gorbi@zaria.phoros.ua"/> </list>

Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <importReport> <item imported="false" id="lenin"> <error fieldName="login" value="lenin">Value is not unique</error> </item> <item imported="true" id="stalin"/> <item imported="true" id="malenkov"/> <item imported="true" id="khrushchev"/> <item imported="true" id="brezhnev"/> <item imported="true" id="andropov"/> <item imported="true" id="chernenko"/> <item imported="true" id="gorbachev"/> </importReport>
Last modified: 29 September 2016