Mapping of REST Calls to DrawMGT Function Calls

Mapping of REST calls to DrawMGT function calls is defined in app/cfg/RestMap.php.

REST Calls to Display a Revision or to Download a File

URL

Parameters

DrawMgt Function

Purpose

document/*/*/detail

drawingCode/revisionCode

DrawingsRevisionsJoinSet::restDetail

Display Document/Revision in browser

document/*/*/pub

drawingCode/revisionCode

DrawingsRevisionsJoinSet::restPublishFile

Direct download publish file through browser

document/*/*/src

drawingCode/revisionCode

DrawingsRevisionsJoinSet::restSourceFile

Direct download source file through browser

Note, that this functions are public, however they call themselves through RedirectFSM to perform user authentication if user is not logged in.

REST Calls to Manage Document/Revision Links

Requirements for Linking Documents Using the Axpo Excel Integration Spreadsheet

  1. Linking documents to their technical and contractual Grundlagen documents

    • Document-to-document link:

      • drawingId

      • drawingCode of Grundlagen document

  2. Linking Stellungnahmen, Prüfberichte and Qualitäts-Eklärungen to revisions

    • Revision-to-document link:

      • revisionId

      • serialCode, linking to test document

Suggested REST Interfaces

Interface for Reference Add and Delete

  1. URLs:

    • reference/add

    • reference/remove

  2. CGI Parameters

    • refTypeId

    • note

    • From fields:

      • documentIdFr

      • revisionIdFr

      • documentCodeFr

      • revisionCodeFr

      • serialCodeFr

    • To fields:

      • documentIdTo

      • revisionIdTo

      • documentCodeTo

      • revisionCodeTo

      • serialCodeTo

Notes:

  1. If documentId is present it is used for the link

  2. If revisionId is present, it is used for the link

  3. If documentCode or serialCode is present then the code value is used to find the documentId, or if the revisionCode is present, the revisionId

Interface for Reference List

  1. URLs:

    • reference/list

  2. CGI Parameters

    • refTypeIds (optional, e.g: refTypeIds=22,23,24). If not present, then all links are returned

    • From fields (Either From or To fields can be present, but not both):

      • documentIdFr

      • revisionIdFr

      • documentCodeFr

      • revisionCodeFr

      • serialCodeFr

    • To fields (Either From or To fields can be present, but not both):

      • documentIdTo

      • revisionIdTo

      • documentCodeTo

      • revisionCodeTo

      • serialCodeTo

  3. Returned XML

    • Example 1: Get a list of contractual (refTypeId=20) and technical (refTypeId=21) Grundlagen documents for the document with the given document code. Note that the Excel integration would probably use the drawingId in the CGI request and make separate requests for the different Grundlagen document link types.

      • Input URL and CGI parameters:
        • reference/list?documentCodeFr=LA2-I-6-03-200-510-16_0001&refTypeIds=20,21
      • Returned XML:
        • <?xml version='1.0' encoding='ISO8859-1'?>
          <recordSet name='ObjectReferences' fromType='document' fromId='1567' refTypeIds='20,21'>
            <record id='3265' type='ObjectReferences' key='objectReferenceId'>
              <drawingCode>LA2-I-6-03-200-510-16_0001</drawingCode>
              <drawingId>6788</drawingId>
              <serialCode></serialCode>
            </record>
          </recordSet>
      • Notes:
        1. In the recordSet tag the fromType='document' fromId='1567', mean that the From document is the record with drawingId=1567.

    • Example 2: Get a list of Stellungnahmen (refTypeId=20) documents for the revision with the given id.

      • Input URL and CGI parameters:
        • reference/list?revisionIdFr=9117&refTypeIds=22
      • Returned XML:
        • <?xml version='1.0' encoding='ISO8859-1'?>
          <recordSet name='ObjectReferences' fromType='revision' fromId='1234' refTypeIds='22'>
            <record id='3265' type='ObjectReferences' key='objectReferenceId'>
              <drawingCode>LA2-I-6-03-200-510-16_0001</drawingCode>
              <drawingId>6788</drawingId>
              <serialCode>STN-LA2-2</serialCode>
            </record>
          </recordSet>
      • Notes:
        1. In the recordSet tag the fromType='document' fromId='1234', mean that the From revision is the record with revisionId=1234.

Notes:

  1. If documentId is present it is used for search links

  2. If revisionId is present, it is used for search links

  3. If documentCode or serialCode is present then the code value is used to find the documentId, or if the revisionCode is present, the revisionId

  4. As described above, either From fields or To fields should be passed as CGI Parameters, never both groups

  5. A format CGI parameter is not supported. Data is XML format is always returned

RestMap (last edited 2011-08-09 11:13:29 by vali)

Copyright 2008-2014, SoftXS GmbH, Switzerland