AnsweredAssumed Answered

Option Profile API Inconsistency.

Question asked by William Herrin on Jun 12, 2015
Latest reply on Jun 15, 2015 by WillB

I've noticed an inconsistency in the WAS API. It is difficult to get results for the Option Profile that are greater than Qualys' restriction per call. The Option Profile API's responses have "hasMoreRecords" as defined in the xsd (line 48). However it is missing the "ServiceRequestPreferences" in the request portion of the xsd that contains "startFromId". All of the other API's in the WAS API aren't like this.

,

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!--  REQUEST  -->
<xs:element name="ServiceRequest">
<xs:complexType>
<xs:all>
<xs:element name="filters" type="ServiceRequestFilters" minOccurs="0"/>
<xs:element name="data" type="ServiceRequestData" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:complexType name="ServiceRequestFilters">
<xs:sequence>
<xs:element name="Criteria" type="Criteria" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Criteria">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="field" type="xs:string"/>
<xs:attribute name="operator">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="CONTAINS"/>
<xs:enumeration value="IN"/>
<xs:enumeration value="EQUALS"/>
<xs:enumeration value="NOT EQUALS"/>
<xs:enumeration value="GREATER"/>
<xs:enumeration value="LESSER"/>
<xs:enumeration value="NONE"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="ServiceRequestData">
<xs:sequence>
<xs:element name="OptionProfile" type="OptionProfile" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!--  RESPONSE  -->
<xs:element name="ServiceResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="responseCode" type="ResponseCode"/>
<xs:element name="responseErrorDetails" type="ResponseErrorObject" minOccurs="0"/>
<xs:element name="count" type="xs:int" minOccurs="0"/>
<xs:element name="hasMoreRecords" type="xs:boolean" minOccurs="0"/>
<xs:element name="lastId" type="xs:long" minOccurs="0"/>
<xs:element name="data" type="ServiceResponseData" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

 

Here's the corresponding segment from the Web App API's xsd for comparison.


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!--  REQUEST  -->
<xs:element name="ServiceRequest">
<xs:complexType>
<xs:all>
<xs:element name="filters" type="ServiceRequestFilters" minOccurs="0"/>
<xs:element name="preferences" type="ServiceRequestPreferences" minOccurs="0"/>
<xs:element name="data" type="ServiceRequestData" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:complexType name="ServiceRequestFilters">
<xs:sequence>
<xs:element name="Criteria" type="Criteria" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Criteria">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="field" type="xs:string"/>
<xs:attribute name="operator">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="CONTAINS"/>
<xs:enumeration value="IN"/>
<xs:enumeration value="EQUALS"/>
<xs:enumeration value="NOT EQUALS"/>
<xs:enumeration value="GREATER"/>
<xs:enumeration value="LESSER"/>
<xs:enumeration value="NONE"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="ServiceRequestPreferences">
<xs:all>
<xs:element name="startFromId" type="xs:long" minOccurs="0"/>
<xs:element name="startFromOffset" type="xs:int" minOccurs="0"/>
<xs:element name="limitResults" type="xs:int" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="ServiceRequestData">
<xs:sequence>
<xs:element name="WebApp" type="WebApp" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!--  RESPONSE  -->
<xs:element name="ServiceResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="responseCode" type="ResponseCode"/>
<xs:element name="responseErrorDetails" type="ResponseErrorObject" minOccurs="0"/>
<xs:element name="count" type="xs:int" minOccurs="0"/>
<xs:element name="hasMoreRecords" type="xs:boolean" minOccurs="0"/>
<xs:element name="lastId" type="xs:long" minOccurs="0"/>
<xs:element name="data" type="ServiceResponseData" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

 

Thanks,

Will

Outcomes