List Group

List group information from your Xtracta account.

Information Circle

Hierarchical Data: When you request a group, the response includes all subgroups in a nested structure, allowing you to see the complete organizational hierarchy.

POST Parameters

ParameterRequiredValueDescription
api_key{key}An API key that has access to the resource you want to query for
group_id{integer}ID of the group. If omitted, returns information for the API key's group

Code Examples

The cURL, PHP, Python, Node.js, and C# examples call Xtracta from a trusted server. The React example calls an application-defined backend proxy so the API key is never exposed in browser code.

Warning

Store XTRACTA_API_KEY as a server-side environment variable. Never embed it in browser-delivered code.

curl --request POST 'https://api-app.xtracta.com/v1/group/list' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'api_key=<API_KEY>'

Sample Request

POST https://api-app.xtracta.com/v1/group/list HTTP/1.1
api_key=123

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<group_response>
    <status>200</status>
    <message>The request has been successfully processed</message>
    <group>
        <Id>1234</Id>
        <ParentId>234</ParentId>
        <Name>Test Group</Name>
        <IsDataExtractionEnabled>1</IsDataExtractionEnabled>
        <PasswordExpiryDays>0</PasswordExpiryDays>
        <BlockPasswordReuseDays>45</BlockPasswordReuseDays>
        <InactiveLogOutTime>120</InactiveLogOutTime>
        <Subgroup>
            <Id>123</Id>
            <ParentId>1234</ParentId>
            <Name>demo - xtracta</Name>
            <IsDataExtractionEnabled>1</IsDataExtractionEnabled>
            <PasswordExpiryDays/>
            <BlockPasswordReuseDays/>
            <InactiveLogOutTime/>
        </Subgroup>
        <Subgroup>
            <Id>123</Id>
            <ParentId>1234</ParentId>
            <Name>ABC Tech</Name>
            <IsDataExtractionEnabled>1</IsDataExtractionEnabled>
            <PasswordExpiryDays>0</PasswordExpiryDays>
            <BlockPasswordReuseDays>45</BlockPasswordReuseDays>
            <InactiveLogOutTime>120</InactiveLogOutTime>
        </Subgroup>
    </group>
</group_response>

Schema Definition

Response Elements

ElementDescription
<status>A status code in response to the operation
<message>Additional information about the operation – human readable
<group>Container for group information
<group>→<Id>The unique ID of the group
<group>→<ParentId>The ID of the parent group (if applicable)
<group>→<Name>The name of the group
<group>→<IsDataExtractionEnabled>Whether data extraction is enabled (1 = enabled, 0 = disabled)
<group>→<PasswordExpiryDays>Number of days before password expiry
<group>→<BlockPasswordReuseDays>Number of days to block password reuse
<group>→<InactiveLogOutTime>Inactive logout time in minutes
<group>→<Subgroup>Container for subgroup information (can appear multiple times)
<group>→<Subgroup>→<Id>The unique ID of the subgroup
<group>→<Subgroup>→<ParentId>The ID of the parent group for the subgroup
<group>→<Subgroup>→<Name>The name of the subgroup
<group>→<Subgroup>→<IsDataExtractionEnabled>Whether data extraction is enabled for the subgroup (1 = enabled, 0 = disabled)
<group>→<Subgroup>→<PasswordExpiryDays>Number of days before password expiry for the subgroup
<group>→<Subgroup>→<BlockPasswordReuseDays>Number of days to block password reuse for the subgroup
<group>→<Subgroup>→<InactiveLogOutTime>Inactive logout time in minutes for the subgroup
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:complexType name="GroupType">
    <xs:sequence>
      <xs:element name="Id" type="xs:positiveInteger"/>
      <xs:element name="ParentId" type="xs:nonNegativeInteger"/>
      <xs:element name="Name" type="xs:string"/>
      <xs:element name="IsDataExtractionEnabled" type="xs:nonNegativeInteger"/>
      <xs:element name="PasswordExpiryDays" type="xs:string"/>
      <xs:element name="BlockPasswordReuseDays" type="xs:string"/>
      <xs:element name="InactiveLogOutTime" type="xs:string"/>
      <xs:element name="Subgroup" type="GroupType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="group_response">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="status" type="xs:positiveInteger"/>
        <xs:element name="message" type="xs:string"/>
        <xs:element name="group" type="GroupType" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Error Responses

For JSON and XML responses generated by this endpoint, the response is wrapped in group_response and includes the HTTP status code and a message.

StatusMessageDescription
400group_id must be natural numberUse a positive integer group ID.
500Internal server error occurred. Please try again later or contact support@xtracta.comRetry and contact support with the request parameters and timestamp if it persists.
Information Circle

Authentication, permission, IP-access-control, and rate-limit failures can be returned before this endpoint processes the request. Confirm the API key and caller access first.