Action: HasAttribute

Purpose: Determines whether or not an Element has a specific attribute. This Action simply returns true or false. Note: attempting to use this Action on any type of node other than an Element node will return an error.

Action-specific name/value pairs:

Parameter Name Description
AttributeName The Name of the Attribute.
ElementOID The Element that is being checked to determine if it owns the Attribute.

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

{AttributeName:"myAttrib",ElementOID:"1-4"}

Example Request

Action=HasAttribute
&AttributeName=myAttrib
&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=HasAttribute
&JSON=%7BAttributeName%3A%22myAttrib%22%2CElementOID%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'?>
<HasAttributeResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <HasAttributeResult>
      <HasAttribute>
         false
      </HasAttribute>
   </HasAttributeResult>
</HasAttributeResponse>

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

{HasAttribute:false}