Import Links
PUT /import/links
Bulk links import
PUT /rest/import/links?{test}
Parameters:
Name | Type | Description |
---|---|---|
test | boolean | If true, links are not saved, but imported data is validated. |
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="link" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute type="xs:string" name="typeName" use="required"/>
<xs:attribute type="xs:string" name="source" use="required"/>
<xs:attribute type="xs:string" name="target" use="required"/>
</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:boolean" name="imported"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Sample
Request:
PUT /rest/import/links?test=false
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<list>
<link typeName="depend" source="CMN-1928" target="CMN-1917"/>
<link typeName="rescind" source="CMN-1987" target="CMN-1928"/>
</list>
Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<importReport>
<item imported="true"/>
<item imported="true"/>
</importReport>
Last modified: 30 March 2021