Action: GetAttributes

Purpose: Retrieves all attributes for a specified Element

Action-specific name/value pairs:

Parameter Name Description
ElementOID The Element whose attributes are to be retrieved.

Alternatively, the parameters above can be incorporated into a single JSON string and specified using the parameter name JSON, eg:

{ElementOID:"1-4"}

Example Request

Action=GetAttributes
&ElementOID=1-4
&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

or:

Action=GetAttributes
&JSON=%7BElementOID%3A%221-4%22%7D
&MDBAccessKeyId=[your access key id]
&OutputFormat=JSON
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

Example Response

XML

<?xml version='1.0'?>
<GetAttributesResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <GetAttributeResult>
      <Attribute>
         <Name>
            id
         </Name>
         <Value>
            testid
         </Value>
         <AttributeOID>
            1-15
         </AttributeOID>
      </Attribute>
      <Attribute>
         <Name>
            myAttr
         </Name>
         <Value>
            1234
         </Value>
         <AttributeOID>
            1-26
         </AttributeOID>
      </Attribute>
      <GetAttributesResult />
   </GetAttributeResult>
</GetAttributesResponse>

JSON (ie if OutputFormat=JSON specified in the Request)

{id:"testid",myAttr:1234}

The GetAttributes Action returns the name and value of all Attribute Nodes. The XML response also returns the OID for each Attribute Node.

So in the example above, the specified Element has the attributes id='testid' myAttr='1234'