WebSphere Process Server, WebSphere Business Monitor, WebSphere Business Services Fabric, WebSphere Business Modeler Publishing Server, Version 6.2 Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, i5/OS, z/OS


User Membership REST Interface - Resource User Attribute Definition - Method GET

Returns a representation of the user attribute definition.

Resource URI

GET /v1/attributes/users/{attribute_name}

Parameters

None.

Request Content

None.

Response Content

The specified attribute definition.

The default content-type is application/xml.

MIME Type: application/xml


+ View Schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
           targetNamespace="http://www.ibm.com/xmlns/prod/websphere/um.xsd" 
           xmlns="http://www.ibm.com/xmlns/prod/websphere/um.xsd" 
           elementFormDefault="qualified">
  <xs:element name="attribute">
    <xs:annotation>
      <xs:documentation>The element that represents an attribute definition.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="attributeValue" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>This element represents one value for the wrapping attribute. 
              It can be sequenced in arbitrary length for multi-valued attributes. 
              If the attribute element is only used to describe the attribute definition that is not 
              part of a profile, there is no attributeValue element wrapped inside.</xs:documentation>
        </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>This XML attribute is used to specify the name that identifies the attribute.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="type" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>This XML attribute is used to describe the type of the attribute. 
              The values correspond to the data types specified by the XML Schema data type definitions 
              described by	http://www.w3.org/2001/XMLSchema-datatypes. 
              The actual attribute types are part of the server	configuration and can not be changed by using 
              this XML attribute, but are only used for	description purposes.</xs:documentation>
        </xs:annotation>
      </xs:attribute>				
      <xs:attribute name="multiValued" type="xs:boolean" use="optional" default="false">
        <xs:annotation>
          <xs:documentation>This XML attribute specifies whether the attribute can have 
          multiple values or can have only one value.</xs:documentation>
        </xs:annotation>
      </xs:attribute>				
    </xs:complexType>
  </xs:element>
  <xs:element name="attributeValue" type="xs:string">
  <xs:annotation>
    <xs:documentation>This element wraps a single attribute value. The value itself is represented 
    by all character data inside the element, using the corresponding string representation, 
    depending on the attribute type.</xs:documentation>
  </xs:annotation>
  </xs:element>
  <xs:element name="profile">
  <xs:annotation>
    <xs:documentation>This element represents a user or group profile.</xs:documentation>
  </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="attribute" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>The profile can contain an arbitrary number of attributes
            and wrapped attribute value elements.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="type" type="profileType" use="required">
        <xs:annotation>
          <xs:documentation>Denotes whether the profile represents a user or group profile.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="identifier" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>Denotes the unique identifier of the principal, e.g. the DN</xs:documentation>
        </xs:annotation>
      </xs:attribute>			
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="profileType">
    <xs:annotation>
      <xs:documentation>Specifies the list of values that can be used to define the type of a profile.
      Currently, user and group profiles are distinguished.</xs:documentation>
      </xs:annotation>		
    <xs:restriction base="xs:string">
      <xs:enumeration value="user"/>
      <xs:enumeration value="group"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="profileRef">
    <xs:annotation>
      <xs:documentation>This element represents a reference to a profile.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="profile" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The profile reference can contain a full representation of the profile itself.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="uri" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The relative URI that points to the resource that represente the profile.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="groupMembershipList">
    <xs:annotation>
      <xs:documentation>This element represents a list of profile references to all groups
      of which a particular user or group is member.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="profileRef" maxOccurs="unbounded" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The groupMembershipList can contain an arbitrary number
                of references to group profiles.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="resourceList">
    <xs:annotation>
      <xs:documentation>This element represents a list of resource references to profile or
      attribute elements.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="resource" maxOccurs="unbounded" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The resourceList can contain an arbitrary number
            of references to profile or attrubute elements.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="uri" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The relative URI that points to the resourceList.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="resource">
    <xs:annotation>
      <xs:documentation>This element represents a reference to a profile or an attribute
      element.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:element ref="profile">
          <xs:annotation>
            <xs:documentation>
              The profile reference can contain a full representation of the profile itself.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="attribute">
          <xs:annotation>
            <xs:documentation>
              The attribute reference can contain a full representation of the attribute itself.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      <xs:attribute name="uri" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The relative URI that points to the resource that represent the
          profile or attribute.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
</xs:schema>

Example content:

<?xml version="1.0" encoding="UTF-8"?>
<um:resource uri="rest/ws/um/v1/attributes/users/uid?verbose=true&amp;expandRefs=true" 
             xmlns:um="http://www.ibm.com/xmlns/prod/websphere/um.xsd">
   <um:attribute name="uid" type="string" multiValued="false"></um:attribute>
</um:resource>

MIME Type: application/json


+ View Schema
{ id: "attribute",
  description: "The element that represents an attribute definition.",
  type: "object",
  properties: {
    attributeValue: { type: "string",
                      description: "A single attribute value" },
    type: { type: "string",
            description: "The type of the attribute. This should correspond to a
                          schema type definition, described by
                          http://www.w3.org/2001/XMLSchema-datatypes." },
    multiValued: { type: "boolean",
                   description: "Indicates whether the attribute can have multiple
                                 values or one." }
  }
}

{ id: "profile",
  description: "Represents a user or group profile",
  type: "object",
  properties: {
    type: { type: "string",
            description: "Denotes whether the profile represents a user or group profile." },
    identifier: { type: "string",
                  description: "Denotes the unique identifier of the principal, e.g., the DN" },
    attribute: { type: "object",
                 description: "Each key is an attribute of the profile, containing attribute content",
                 additionalProperties: { "$ref" : "attribute" } }
  }
}

{ id: "resource",
  description: "A reference to a profile or set of attribute definitions.",
  type: "object",
  properties: {
    profile: { "$ref" : "profile",
               description: "Present when the resource is a profile."
               optional: true },
    attribute: { "$ref" : "attribute",
                 description: "Present when the resource is an attribute.",
                 optional: true },
    uri: { type: "string",
           description: "Relative URI referencing this resource.",
           optional: false }
  }
}

{ id: "resourceList",
  description: "Container object for a list of resources.",
  type: "object",
  properties: {
    resourceList: { type: "array",
                    items: { "$ref" : "resource" } }
  }
}

Example content:

{
   "attribute": {
      "attributeValue": "",
      "multiValued": false,
      "type": "string"
   },
   "uri": "rest\/ws\/um\/v1\/attributes\/users\/uid?verbose=true&expandRefs=true"
}

Error Response Content

None.

Status Codes

The method returns one of the following status codes:
CodeDescription
401 UnauthorizedFailed access control check during processing.
403 ForbiddenThe operation the client tries to perform is not possible (e.g. using mutually exclusive request parameters).
404 Not FoundURI does not match any of the defined paths or the variable part of a defined URI path does not denote a resource that exists.
405 Method Not AllowedThe request addresses a defined URI, but uses an HTTP method that is not defined for this URI.
415 Unsupported Media TypeThe format specified in the MIME-type URI parameter or accept headers is not supported.

Available Since

6.2

Parent Topic: Resource "User Attribute Definition"