getResourceDetail

This request returns detailed information about one or more resources.

Syntax

com.tibco.wcc.base.Requests.getResourceDetail(requestId,
                                              entities);

Parameters

  • requestId - (String) Uniquely identifies the request. For more information, see Submitting Server Requests.
  • entities - (Array[Object]) Identifies the resource(s) whose detail information is to be returned. Note that the wccApiSample application requests the detailed information for a single resource, although the request can ask for detailed information from any number of resources by including more entities (resources) in the array:
    entities = [
      {
         type: entityType,
         guid: guid,
         modelVersion: modelVersion,
         qualifier: qualifier
      }
    ]

    where:

  • entityType - (String) Describes the type of entity. This must be RESOURCE.
  • guid - The GUID of the resource whose details are being requested.
  • modelVersion - (String) (optional) The version number of the organization model for the group or position. Passing -1 or no value causes it to use the latest version.
  • qualifier - (String) (optional) This is not applicable in this context, and is explicitly set to an empty string internally.

Returns

An <ap:ResourceDetail> element is returned for each resource that is mapped to the group or position. The <ap:ResourceDetail> element contains the following elements:

  • <ap:Guid> - The GUID for the resource.
  • <ap:Name> - The name of the resource.
  • <ap:Type> - The resource type. In this context, it is HUMAN.
  • <ap:ContainerId> - The ID of the LDAP container in which the resource was created.
  • <ap:ContainerName> - The name of the LDAP container in which the resource was created.
  • <ap:StartDate> - Not used at this time.
  • <ap:EndDate> - Not used at this time.
  • <ap:Alias> - The alias of the LDAP container in which the resource was created.
  • <ap:Dn> - The distinguished name for the resource.
  • <ap:Invalid> - true = the resource is considered invalid (the LDAP entry used to create the resource may have been deleted, or multiple resources were found in a secondary LDAP source that match the resource in the primary LDAP source. false = the resource is a valid resource.
  • <ap:InvalidReason> - If <ap:Invalid> is true, this contains the reason the resource is invalid.
  • <ap:GROUP> or <ap:POSITION> - One of these elements is included in the response for each group and position to which the resource is mapped. These elements contain the following elements:
    • <ap:Guid> - The GUID for the group or position.
    • <ap:EntityType> - The type of entity: GROUP or POSITION
    • <ap:ModelVersion> - The version of the organization model in which the group or position is defined.
    • <ap:Name> - The name of the group or position.
    • <ap:Qualifier> - This is not applicable in this context.
    • <ap:StartDate> - The date on which the resource’s membership in the group or position takes effect.
    • <ap:EndDate> - The date one which the resource’s membership in the group or position ends.
  • <ap:PRIVILEGE> - One of these elements is included in the response for each privilege possessed by the resource. This element contains the following elements:
    • <ap:Guid> - The GUID for the privilege.
    • <ap:EntityType> - The type of entity: PRIVILEGE
    • <ap:ModelVersion> - The version of the organization model in which the privilege is defined.
    • <ap:Name> - The name of the privilege.
    • <ap:Qualifier> - A qualifier assigned to the privilege.
    • <ap:Origin> - This element contains the following sub-elements, which provide information about the group or position from which the resource obtained the privilege.
    • <ap:Guid> - The GUID of the group or position.
    • <ap:ModelVersion> - The version of the organization model in which the group or position is defined.
    • <ap:Name> - The name of the group or position.
    • <ap:Qualifier> - This is not applicable in this context.
    • <ap:StartDate> - The date on which membership in the group or position takes effect.
    • <ap:EndDate> - The date on which membership in the group or position is no longer in effect.
  • <ap:TemporaryResourceDefinition> - A value is returned in this element, although it is not applicable when viewing resource information (it is only valid for potential resources, which are not returned by any of the server requests described here).
  • <ap:HasDuplicates> - This is applicable only to potential resources, which are not returned by any of the public server requests, therefore, this value is not applicable in this context.

For example:

<ap:Requests>
   <ap:Resources Id="ApiSample.getResourceDetail">
      <ap:ResourceDetail>
         <ap:Guid>E3A3FC77-10FD-4326-9F56-FE230C6FC579</ap:Guid>
         <ap:Name>Liam Lawrence</ap:Name>
         <ap:Type>HUMAN</ap:Type>
         <ap:ContainerId>1</ap:ContainerId>
         <ap:ContainerName>easyAs</ap:ContainerName>
         <ap:StartDate />
         <ap:EndDate />
         <ap:Alias>easyAs</ap:Alias>
         <ap:Dn>OU=Liam Lawrence, OU=London, OU=AllEmployees, O=easyAsInsurance</ap:Dn>
         <ap:Invalid>false</ap:Invalid>
         <ap:InvalidReason />
         <ap:GROUP>
              .        See separate <ap:GROUP> example below.
              .
         </ap:GROUP>
         <ap:POSITION>
              .        See separate <ap:POSITION> example below.
              .
         </ap:POSITION>
         <ap:PRIVILEGE>
              .        See separate <ap:PRIVILEGE> example below.
              .
         </ap:PRIVILEGE>
         <ap:TemporaryResourceDefinition>&lt;definition container_id="1" primary_dn="OU=Liam Lawrence,
               OU=London, OU=AllEmployees,O=easyAsInsurance" /&gt;</ap:TemporaryResourceDefinition>
         <ap:HasDuplicates>false</ap:HasDuplicates>
      </ap:ResourceDetail>
   </ap:Resources>
</ap:Requests>

<ap:GROUP> Example:

<ap:GROUP>
   <ap:Guid>_Jb8oYMpREd64gM7QE8RwxA</ap:Guid>
   <ap:EntityType>GROUP</ap:EntityType>
   <ap:ModelVersion>3</ap:ModelVersion>
   <ap:Name>Employees</ap:Name>
   <ap:Qualifier />
   <ap:StartDate />
   <ap:EndDate />
</ap:GROUP>

<ap:POSITION> Example:

<ap:POSITION>
   <ap:Guid>__O368MpREd64gM7QE8RwxA</ap:Guid>
   <ap:EntityType>POSITION</ap:EntityType>
   <ap:ModelVersion>3</ap:ModelVersion>
   <ap:Name>SalesManagers</ap:Name>
   <ap:Qualifier />
   <ap:StartDate />
   <ap:EndDate />
</ap:POSITION>

<ap:PRIVILEGE> Example:

<ap:PRIVILEGE>
   <ap:Guid>_P6ARUF-IEd-rno5lLiXABg</ap:Guid>
   <ap:EntityType>PRIVILEGE</ap:EntityType>
   <ap:ModelVersion>3</ap:ModelVersion>
   <ap:Name>WorkSupervisionSystemActions</ap:Name>
   <ap:Qualifier />
   <ap:Origin>
   <ap:Guid>_T1Fq0ALvEeCHF4vrCq9WPw</ap:Guid>
   <ap:ModelVersion>3</ap:ModelVersion>
   <ap:Name>AdminWorkSupervision</ap:Name>
   <ap:EntityType>GROUP</ap:EntityType>
   <ap:Qualifier />
   <ap:StartDate />
   <ap:EndDate />
   </ap:Origin>
</ap:PRIVILEGE>