X4 Produktdokumentation

Create new Sub-Group 1

The Create new Group operation creates a new sub-group in Keycloak. The data is defined in the input XML expected by the adapter.

Input XML

XML
<?xml version="1.0" encoding="UTF-8"?>
<ParentGroup>
	<ParentId></ParentId>
	<SubGroup>
		<Name></Name>
		<Attributes>
			<Attribute>
				<Name></Name>
				<Values>
					<Value></Value>
				</Values>
			</Attribute>
		</Attributes>
	</SubGroup>
</ParentGroup>

ParentGroup

Element

Description

Possible values

ParentGroup


The element contains the following elements:

  • ParentId

  • SubGroup

ParentId

UUID of the parent group

UUID

SubGroup

Subgroup definition

The element contains the following elements:

  • Name

  • Attributes (optional)

SubGroup

Element

Description

Possible values

SubGroup

Subgroup definition

The element contains the following elements:

  • Name

  • Attributes (optional)

Name

Name of the subgroup

Any string

Attributes

Personalized, configurable attributes

The element contains the following elements:

  • Attribute (multiple declaration possible)

Attributes

Element

Description


Attributes

Personalized, configurable attributes

The element contains the following elements:

  • Attribute (multiple declaration possible)

Attribute

Personalized, configurable attribute

The element contains the following elements:

  • Name

  • Values

Name

Attribute name

Any string

Values

Attribute values

The element contains the following elements:

  • Value (multiple declaration possible)

Value

Attribute value

Any string

XSD

XML
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:element name="ParentGroup">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="ParentId"/>
				<xs:element ref="SubGroup"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="ParentId" type="xs:string"/>
	<xs:element name="SubGroup">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Name"/>
				<xs:element ref="Attributes"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Attributes">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="Attribute"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Attribute">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Name"/>
				<xs:element ref="Values"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Values">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" ref="Value"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Value" type="xs:string"/>
	<xs:element name="Name" type="xs:string"/>
</xs:schema>

Example

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<ParentGroup>
    <ParentId>49bf25f9-7878-484e-87da-bebff1550379</ParentId>
    <SubGroup>
        <Name>Developer</Name>
        <Attributes>
            <Attribute>
                <Name>Team</Name>
                <Values>
                    <Value>Red</Value>
                </Values>
            </Attribute>
        </Attributes>
    </SubGroup>
</ParentGroup>