Document Relationships API documentation version v1
https://{hostname}/api/document-relationships/projects/{projectId}
- hostname: required (string)
Aconex instance.
- projectId: required (string)
Identifies the project for the document relationships.
Document Relationships
API definition for Document Relationships
/transactions
Transactions for a given period of time.
Request transactions for the given time period.
get /transactions
Request transactions for the given time period.
Headers
- Accept: required (string)
API version.
Example:
application/vnd.aconex.document.relationship.v1+xml
Query Parameters
- from: required (string)
The start of the date range we are requesting the transactions for in
yyyy-MM-dd'T'HH:mm:ss.SSS'Z'format.Example:
2005-07-25T04:59:08.340Z - to: required (string)
The end of the date range we are requesting the transactions for in
yyyy-MM-dd'T'HH:mm:ss.SSS'Z'format.Example:
2005-07-25T04:59:08.340Z - page: (string - default: 1)
Page number of the transactions for the given time period.
HTTP status code 200
The transactions for, or subset of for the given time period.
Body
Media type: application/vnd.aconex.document.relationship.v1+xml
Type:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="DirectionId">
<xs:restriction base="xs:string">
<!-- Affects -->
<xs:enumeration value="948aee85-8962-4d36-ae12-e0279fd10c99"/>
<!-- Affected By -->
<xs:enumeration value="0d97d641-da26-4b58-8f57-bf0115440aa2"/>
<!-- Cancel Affect -->
<xs:enumeration value="aa8d3bca-6317-4679-938d-a604eeb62db5"/>
<!-- Cancel Affect By -->
<xs:enumeration value="e7713c42-2ae6-4203-8f13-024fede0293f"/>
<!-- Deviates From -->
<xs:enumeration value="257bb753-f954-4d70-bc8d-f89e3760b72b"/>
<!-- Has Deviation Of -->
<xs:enumeration value="819cad43-0838-47f3-b4a3-e977fb1d0dfe"/>
<!-- Implements -->
<xs:enumeration value="2d2d8f4e-c01d-4a0a-95be-03f3af3efcb8"/>
<!-- Implemented By -->
<xs:enumeration value="0fae87b4-275f-4936-b439-b7c4fce858b6"/>
<!-- Includes -->
<xs:enumeration value="859ad735-f015-49e4-bedc-91784654d4fe"/>
<!-- Included With -->
<xs:enumeration value="331b8f3b-c0fc-4b30-a46c-f6b8809bb4bf"/>
<!-- Initiates -->
<xs:enumeration value="98deb348-629e-4586-9e67-1515ca11a674"/>
<!-- Initiated By -->
<xs:enumeration value="ed2c49e3-2008-4a3f-9863-556fcbd88f7e"/>
<!-- Is Input For -->
<xs:enumeration value="29b3317b-ece8-4199-b540-a7e3d83f5e8b"/>
<!-- Needs Input For -->
<xs:enumeration value="823a63c8-9b46-4cd1-a11b-cbea215ba43e"/>
<!-- May Affect -->
<xs:enumeration value="3b066c7f-5ab8-4475-8800-59ea76883b5f"/>
<!-- May Be Affected -->
<xs:enumeration value="5547ef7b-db1c-4e25-a7a5-aa2e2dda7cba"/>
<!-- References -->
<xs:enumeration value="5f510c61-f14c-47d8-a751-07a28ab3f344"/>
<!-- Referenced By -->
<xs:enumeration value="35be7473-6823-4158-87e9-f853d30e1c2c"/>
<!-- Replaces -->
<xs:enumeration value="ab6352ac-27d5-4c63-9bc1-26ba8958bd6d"/>
<!-- Replaced By -->
<xs:enumeration value="70b2a21c-145a-4834-a2b8-2c6af9bd44e2"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Link">
<xs:sequence>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
<xs:attribute name="Rel">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Href">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="ResourceLinks">
<xs:sequence>
<xs:element name="Links">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Link" type="Link"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
<xs:attribute name="Id">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Relationship">
<xs:sequence>
<xs:element name="Document" type="ResourceLinks"/>
<xs:element name="Direction">
<xs:complexType>
<xs:attribute name="Id" type="DirectionId"/>
</xs:complexType>
</xs:element>
<xs:element name="RelatedDocument" type="ResourceLinks"/>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
<xs:attribute name="Id">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="RelationshipAdded">
<xs:sequence>
<xs:element type="Relationship" name="Relationship" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="RelationshipDeleted">
<xs:sequence>
<xs:element type="Relationship" name="Relationship" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="RelationshipChanged">
<xs:sequence>
<xs:element type="Relationship" name="Relationship" />
<xs:element type="Relationship" name="NewRelationship" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Transaction">
<xs:sequence>
<xs:element type="RelationshipAdded" name="RelationshipAdded" minOccurs="0" maxOccurs="unbounded" />
<xs:element type="RelationshipDeleted" name="RelationshipDeleted" minOccurs="0" maxOccurs="unbounded" />
<xs:element type="RelationshipChanged" name="RelationshipChanged" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="User" type="ResourceLinks" />
<xs:element name="Organization" type="ResourceLinks"/>
</xs:sequence>
<xs:attribute name="Date">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:element name="Transactions">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Transaction" type="Transaction"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Example:
<Transactions>
<Transaction Date="2005-07-25T04:59:08.340Z">
<RelationshipAdded>
<Relationship Id="/api/document-relationships/projects/{projectId}/documents/2000/relationships/948aee85-8962-4d36-ae12-e0279fd10c99/related-documents/2001">
<Document Id="2000">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2000/metadata" />
</Links>
</Document>
<Direction Id="948aee85-8962-4d36-ae12-e0279fd10c99" />
<RelatedDocument Id="2001">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2001/metadata"/>
</Links>
</RelatedDocument>
</Relationship>
</RelationshipAdded>
<User Id="{userId}">
<Links>
<Link Rel="self" Href="/api/users/{userId}"/>
</Links>
</User>
<Organization Id="{organizationId}">
<Links>
<Link Rel="self" Href="/api/organizations/{organizationid}"/>
</Links>
</Organization>
</Transaction>
<Transaction Date="2005-07-25T04:59:08.340Z">
<RelationshipDeleted>
<Relationship Id="/api/document-relationships/projects/{projectId}/documents/2000/relationships/948aee85-8962-4d36-ae12-e0279fd10c99/related-documents/2001">
<Document Id="2000">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2000/metadata" />
</Links>
</Document>
<Direction Id="948aee85-8962-4d36-ae12-e0279fd10c99" />
<RelatedDocument Id="2001">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2001/metadata"/>
</Links>
</RelatedDocument>
</Relationship>
</RelationshipDeleted>
<User Id="{userId}">
<Links>
<Link Rel="self" Href="/api/users/{userId}"/>
</Links>
</User>
<Organization Id="{organizationId}">
<Links>
<Link Rel="self" Href="/api/organizations/{organizationid}"/>
</Links>
</Organization>
</Transaction>
<Transaction Date="2005-07-25T04:59:08.340Z">
<RelationshipChanged>
<Relationship Id="/api/document-relationships/projects/{projectId}/documents/2000/relationships/948aee85-8962-4d36-ae12-e0279fd10c99/related-documents/2001">
<Document Id="2000">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2000/metadata" />
</Links>
</Document>
<Direction Id="948aee85-8962-4d36-ae12-e0279fd10c99" />
<RelatedDocument Id="2001">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2001/metadata"/>
</Links>
</RelatedDocument>
</Relationship>
<NewRelationship Id="/api/document-relationships/projects/{projectId}/documents/2000/relationships/0d97d641-da26-4b58-8f57-bf0115440aa2/related-documents/2001">
<Document Id="2000">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2000/metadata" />
</Links>
</Document>
<Direction Id="0d97d641-da26-4b58-8f57-bf0115440aa2" />
<RelatedDocument Id="2001">
<Links>
<Link Rel="self" Href="/api/projects/{projectId}/register/2001/metadata"/>
</Links>
</RelatedDocument>
</NewRelationship>
</RelationshipChanged>
<User Id="{userId}">
<Links>
<Link Rel="self" Href="/api/users/{userId}"/>
</Links>
</User>
<Organization Id="{organizationId}">
<Links>
<Link Rel="self" Href="/api/organizations/{organizationid}"/>
</Links>
</Organization>
</Transaction>
</Transactions>
HTTP status code 400
Malformed request.
Body
Media type: application/vnd.aconex.document.relationship.v1+xml
Type:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Error" type="Error"/>
<xs:complexType name="Error">
<xs:sequence>
<xs:element name="ErrorCode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="ErrorDescription">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="RequestID">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="SystemTime">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:schema>Example:
<Error>
<ErrorCode>ERROR_CODE</ErrorCode>
<ErrorDescription>Description for specific error</ErrorDescription>
<RequestID>g5g8l8dk</RequestID>
<SystemTime>2017-02-22T13:43:44.208+11:00</SystemTime>
</Error>
HTTP status code 401
Authentication has failed or was not provided.
Body
Media type: application/vnd.aconex.document.relationship.v1+xml
Type:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Error" type="Error"/>
<xs:complexType name="Error">
<xs:sequence>
<xs:element name="ErrorCode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="ErrorDescription">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="RequestID">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="SystemTime">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:schema>Example:
<Error>
<ErrorCode>ERROR_CODE</ErrorCode>
<ErrorDescription>Description for specific error</ErrorDescription>
<RequestID>g5g8l8dk</RequestID>
<SystemTime>2017-02-22T13:43:44.208+11:00</SystemTime>
</Error>
HTTP status code 403
Document relationship behaviour is not enabled for the project.
Body
Media type: application/vnd.aconex.document.relationship.v1+xml
Type:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Error" type="Error"/>
<xs:complexType name="Error">
<xs:sequence>
<xs:element name="ErrorCode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="ErrorDescription">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="RequestID">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="SystemTime">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:schema>Example:
<Error>
<ErrorCode>ERROR_CODE</ErrorCode>
<ErrorDescription>Description for specific error</ErrorDescription>
<RequestID>g5g8l8dk</RequestID>
<SystemTime>2017-02-22T13:43:44.208+11:00</SystemTime>
</Error>
HTTP status code 404
Resource not found.
Body
Media type: application/vnd.aconex.document.relationship.v1+xml
Type:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Error" type="Error"/>
<xs:complexType name="Error">
<xs:sequence>
<xs:element name="ErrorCode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="ErrorDescription">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="RequestID">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="SystemTime">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:schema>Example:
<Error>
<ErrorCode>ERROR_CODE</ErrorCode>
<ErrorDescription>Description for specific error</ErrorDescription>
<RequestID>g5g8l8dk</RequestID>
<SystemTime>2017-02-22T13:43:44.208+11:00</SystemTime>
</Error>
HTTP status code 406
The Accept header is not acceptable.
HTTP status code 500
General error processing the request.
Body
Media type: application/vnd.aconex.document.relationship.v1+xml
Type:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Error" type="Error"/>
<xs:complexType name="Error">
<xs:sequence>
<xs:element name="ErrorCode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="ErrorDescription">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="RequestID">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="SystemTime">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:schema>Example:
<Error>
<ErrorCode>ERROR_CODE</ErrorCode>
<ErrorDescription>Description for specific error</ErrorDescription>
<RequestID>g5g8l8dk</RequestID>
<SystemTime>2017-02-22T13:43:44.208+11:00</SystemTime>
</Error>
Secured by basic-authentication
Headers
- Authorization: required (string)
Base64 encoded username and password.
Example:
Basic cG9sZWFyeTpBdXRoM250MWM=