{"id":964,"date":"2011-06-07T15:02:47","date_gmt":"2011-06-07T15:02:47","guid":{"rendered":"https:\/\/copyright.lboro.ac.uk\/lorls\/?page_id=964"},"modified":"2011-06-07T15:02:47","modified_gmt":"2011-06-07T15:02:47","slug":"fastgetstructuralunit","status":"publish","type":"page","link":"https:\/\/blog.lboro.ac.uk\/lorls\/documentation\/integration\/lumps-apis\/fastgetstructuralunit","title":{"rendered":"FastGetStructuralUnit"},"content":{"rendered":"<pre>NAME\n    FastGetStructuralUnit - LUMP CGI XML API to return the contents of a\n    Structural Unit (and its children).\n\nDESCRIPTION\n    The GetStructuralUnit CGI script is designed to allow Structural Units\n    held in a LUMP database to be returned in an XML container format. The\n    script can return a tree of Structural Units to an arbitrary depth\n    rooted at a particular Structural Unit specified by its ID.\n\nPARAMETERS\n  Standard\n    *username* - Name of user running this CGI script. Required unless web\n    server authentication is in use (when it is, the web server\n    authenticated user is used instead).\n    *password* - Password for the user. This is only required if the web\n    server is not handling the user authentication and if no security hash\n    parameter is being given.\n    *security_hash* - An opaque value used to authenticate the user without\n    requiring the password to be sent. This value is generated by a previous\n    execution of a LUMP API script and may well be time limited. It is only\n    required if no password or webserver authentication is done.\n    *act_as* - Users in the SysAdmins group can elect to act on the behalf\n    of other users once they are themselves authenticated. If this parameter\n    is present it should contain the username of the user that should be\n    switched to if this option is available and the real user has been\n    authenticated successfully. Optional.\n    *session_id* - An opaque string as far as the server is concerned that\n    is intended solely to allow async clients to differentiate different\n    results more easily. Optional.\n\n  Specific for this script\n    *suid* - ID of the root Structural Unit for the tree that should be\n    returned. This can be a comma separate list of IDs if more than one\n    Structural Unit is to be found.\n\nRESULTS\n    The script returns an XML document in the standard LUMP response format\n    (as documented in LUMP-XML-Response). The &lt;returns&gt; section&apos;s contents\n    depends on the display format requested with the *format* parameter in\n    the request. If this is specified (and isn&apos;t \"XML\") the &lt;returns&gt;\n    element will contain a &lt;rendered&gt; element that contains the Structural\n    Unit(s) rendered using the appropriated display format module(s). This\n    means that in this case the value of the &lt;rendered&gt; element can often be\n    transmitted straight into an output stream, DOM element, etc.\n\n    The &lt;returns&gt; element also contains the XML structure following this DTD\n    fragment:\n\n     &lt;!ELEMENT returns (su|rendered)&gt;\n     &lt;!ELEMENT rendered (#PCDATA)&gt;\n     &lt;!ELEMENT su (children|id|structural_unit_type_id|state|deleted|data+)&gt;\n     &lt;!ELEMENT children (su+)&gt;\n     &lt;!ELEMENT structural_unit_type_id (#PCDATA)&gt;\n     &lt;!ELEMENT id (#PCDATA)&gt;\n     &lt;!ELEMENT state (#PCDATA)&gt;\n     &lt;!ELEMENT deleted (#PCDATA)&gt;\n     &lt;!ELEMENT data (data_type|data_element)\n     &lt;!ELEMENT data_element (id|value|modified_time)&gt;\n     &lt;!ELEMENT data_type (id|name|edit_representation|default_value|\n        validation_pattern|repeatable|size)&gt;\n     &lt;!ELEMENT value (#PCDATA)&gt;\n     &lt;!ELEMENT edit_representation (#PCDATA)&gt;\n     &lt;!ELEMENT validation_pattern (#PCDATA)&gt;\n     &lt;!ELEMENT repeatable (#PCDATA)&gt;\n     &lt;!ELEMENT name (#PCDATA)&gt;\n     &lt;!ELEMENT size (#PCDATA)&gt;\n\n    For example:\n\n     &lt;response&gt;\n      &lt;returns&gt;\n       &lt;su&gt;\n        &lt;children&gt;\n         &lt;su&gt;\n          &lt;id&gt;350&lt;\/id&gt;\n          &lt;state&gt;published&lt;\/state&gt;\n          &lt;deleted&gt;N&lt;\/deleted&gt;\n         &lt;\/su&gt;\n        &lt;\/children&gt;\n        &lt;data&gt;\n         &lt;data_type&gt;\n          &lt;validation_pattern&gt;&lt;\/validation_pattern&gt;\n          &lt;edit_representation&gt;input text&lt;\/edit_representation&gt;\n          &lt;name&gt;Year&lt;\/name&gt;\n          &lt;id&gt;23&lt;\/id&gt;\n          &lt;repeatable&gt;N&lt;\/repeatable&gt;\n          &lt;size&gt;4&lt;\/size&gt;\n         &lt;\/data_type&gt;\n         &lt;data_element&gt;\n          &lt;value&gt;2006&lt;\/value&gt;\n          &lt;id&gt;1332&lt;\/id&gt;\n         &lt;\/data_element&gt;\n        &lt;\/data&gt;\n        &lt;data&gt;\n         &lt;data_type&gt;\n          &lt;validation_pattern&gt;&lt;\/validation_pattern&gt;\n          &lt;edit_representation&gt;input text&lt;\/edit_representation&gt;\n          &lt;name&gt;Semester&lt;\/name&gt;\n          &lt;id&gt;24&lt;\/id&gt;\n          &lt;repeatable&gt;N&lt;\/repeatable&gt;\n          &lt;size&gt;100&lt;\/size&gt;\n         &lt;\/data_type&gt;\n         &lt;data_element&gt;\n          &lt;value&gt;&lt;\/value&gt;\n          &lt;id&gt;1333&lt;\/id&gt;\n         &lt;\/data_element&gt;\n        &lt;\/data&gt;\n        &lt;data&gt;\n         &lt;data_type&gt;\n          &lt;validation_pattern&gt;&lt;\/validation_pattern&gt;\n          &lt;edit_representation&gt;input text&lt;\/edit_representation&gt;\n          &lt;name&gt;Module Name&lt;\/name&gt;\n          &lt;id&gt;25&lt;\/id&gt;\n          &lt;repeatable&gt;N&lt;\/repeatable&gt;\n          &lt;size&gt;100&lt;\/size&gt;\n         &lt;\/data_type&gt;\n         &lt;data_element&gt;\n          &lt;value&gt;Advanced Human-Computer Integration&lt;\/value&gt;\n          &lt;id&gt;1334&lt;\/id&gt;\n         &lt;\/data_element&gt;\n        &lt;\/data&gt;\n        &lt;data&gt;\n         &lt;data_type&gt;\n          &lt;validation_pattern&gt;&lt;\/validation_pattern&gt;\n          &lt;edit_representation&gt;input text&lt;\/edit_representation&gt;\n          &lt;name&gt;Student Numbers&lt;\/name&gt;\n          &lt;id&gt;27&lt;\/id&gt;\n          &lt;repeatable&gt;N&lt;\/repeatable&gt;\n          &lt;size&gt;10&lt;\/size&gt;\n         &lt;\/data_type&gt;\n         &lt;data_element&gt;\n          &lt;value&gt;0&lt;\/value&gt;\n          &lt;id&gt;1335&lt;\/id&gt;\n         &lt;\/data_element&gt;\n        &lt;\/data&gt;\n        &lt;data&gt;\n         &lt;data_type&gt;\n          &lt;validation_pattern&gt;dd[A-Z][A-Z][ABCPX]ddd&lt;\/validation_pattern&gt;\n          &lt;edit_representation&gt;input text&lt;\/edit_representation&gt;\n          &lt;name&gt;Module Code&lt;\/name&gt;\n          &lt;id&gt;28&lt;\/id&gt;\n          &lt;repeatable&gt;N&lt;\/repeatable&gt;\n          &lt;size&gt;10&lt;\/size&gt;\n         &lt;\/data_type&gt;\n         &lt;data_element&gt;\n          &lt;value&gt;06COC171&lt;\/value&gt;\n          &lt;id&gt;1336&lt;\/id&gt;\n         &lt;\/data_element&gt;\n        &lt;\/data&gt;\n        &lt;data&gt;\n         &lt;data_type&gt;\n          &lt;validation_pattern&gt;&lt;\/validation_pattern&gt;\n          &lt;edit_representation&gt;input text&lt;\/edit_representation&gt;\n          &lt;name&gt;Module Tutor&lt;\/name&gt;\n          &lt;id&gt;26&lt;\/id&gt;\n          &lt;repeatable&gt;Y&lt;\/repeatable&gt;\n          &lt;size&gt;100&lt;\/size&gt;\n         &lt;\/data_type&gt;\n         &lt;data_element&gt;\n          &lt;value&gt;Professor R S Kalawsky&lt;\/value&gt;\n          &lt;id&gt;1339&lt;\/id&gt;\n         &lt;\/data_element&gt;\n        &lt;\/data&gt;\n        &lt;id&gt;350&lt;\/id&gt;\n       &lt;\/su&gt;\n      &lt;\/returns&gt;\n      &lt;session&gt;\n       &lt;security_hash&gt;1248086710:a615619fd3d278c8a15154afade9ccec&lt;\/security_hash&gt;\n       &lt;lump_version&gt;1&lt;\/lump_version&gt;\n       &lt;acting_as&gt;&lt;\/acting_as&gt;\n      &lt;\/session&gt;\n      &lt;error&gt;\n       &lt;error_message&gt;Success&lt;\/error_message&gt;\n       &lt;error_code&gt;SUCCESS&lt;\/error_code&gt;\n      &lt;\/error&gt;\n     &lt;\/response&gt;\n\n    The &lt;error&gt; section contains SUCCESS in the &lt;error_code&gt; if the\n    operation finishes successfully, or a failure error code if it doesn&apos;t.\n    The &lt;error_message&gt; element contains a human readable message that can\n    be used to inform the user of problems if desired.\n\nSEE ALSO\n    FindSuid\n\n    LUMP-XML-Response\n\nCOPYRIGHT\n    Copyright 2009 Loughborough University Library &lt;library@lboro.ac.uk&gt;.\n\n    Permission is granted to copy, distribute and\/or modify this document\n    under the terms of the GNU Free Documentation License, Version 1.2 or\n    any later version published by the Free Software Foundation; with no\n    Invariant Sections, with no Front-Cover Texts, and with no Back-Cover\n    Texts.\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>NAME FastGetStructuralUnit &#8211; LUMP CGI XML API to return the contents of a Structural Unit (and its children). DESCRIPTION The GetStructuralUnit CGI script is designed to allow Structural Units held in a LUMP database to be returned in an XML container format. The script can return a tree of Structural Units to an arbitrary depth [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":125,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"page-col-1.php","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-964","page","type-page","status-publish","hentry","count-0","even alt","author-lbjlclboro-ac-uk","last"],"_links":{"self":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/pages\/964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/comments?post=964"}],"version-history":[{"count":0,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/pages\/964\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/pages\/125"}],"wp:attachment":[{"href":"https:\/\/blog.lboro.ac.uk\/lorls\/wp-json\/wp\/v2\/media?parent=964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}