Develop > Application Programming Interface > Legacy APIs > User API > Get list of all components of a specific type for a specific user

Get all components of a specific type for a specific user

Details

URI /user/mycomponents?userIdentifier=<userId>&componentType=<comma-separated values of a componentType>&componentTypeWildcard=<comma-separated values of type that are treated with wild card>&creationDateBegin=<creationDateBegin>&creationDateEnd=<creationDateEnd>&updatedDateBegin=< updatedDateBegin>&updatedDateEnd=< updatedDateEnd>&returnActiveOnly=<true|false>&GMT=<true/false>
Method GET
Parameters

userIdentifier=<user_id>

Required; the user ID you want to use as credentials for this API call. This user should be a consumer user with the necessary permissions for the data you want to work with. See Get userIdentifier" for the steps required to retrieve the userIdentifier value.

componentType=<comma-separated values>

Optional; Specify the component name to retrieve. This parameter takes comma-separated values such as SERVER,INFRASTRUCTURE.

componentTypeWildCard=<comma-separated values>

Optional; use this parameter to specify the component name to retrieve.

This parameter takes comma-separated values. The names are appended with wildcard characters and should not be specified. For example, the value Server retrieves all components of type SERVER, SERVER_GROUP, or Server.

Using this parameter may affect the performance of the API. You should use the componentType parameter whenever possible.

creationDateBegin: <yyyy-MM-ddTHH:mm:ss>

Optional; subscriptions created on or after the start date and time are included in the return.

creationDateEnd: <yyyy-MM-ddTHH:mm:ss>

Optional; subscriptions created before the end date and time are included in the return. Note that the creationStartDate parameter must also be specified.

updatedDateBegin: <yyyy-MM-ddTHH:mm:ss>

Optional; subscriptions updated on or after the specified start date and time are included in the return.

updatedDateEnd: <yyyy-MM-ddTHH:mm:ss>

Optional; subscriptions updated before the specified end date and time are included in the return. Note that the modificationStartDate parameter must also be specified.

returnActiveOnly: true/false

Optional; specifying true for this parameter returns only subscriptions that are not in retired state.

GMT : true/false

Optional; specifying true for this parameter configures CSA to interpret date-related parameters in GMT. This is important if the application communicating to CSA is not in the same time zone.

Note: In all date parameters, T serves as a separator between date and time and time defaults to 00:00:00:00 if not specified.
Returns 200 - Ok
401 - Not authorized
404 - Not found
500 - Server exception

Example

The following URL was sent:

https://<host>:<port>/csa/rest/user/mycomponents?userIdentifier=90s96588670da0c701360da0f1d540a1&componentType=Server

The following XML was returned:


<UserSubscriptionComponentsList>
 <ServiceSubscription>
  <serviceInstanceId>9038afc8476159bc0147626081c01291</serviceInstanceId>
  <serviceInstanceState>ACTIVE</serviceInstanceState>
  <serviceOfferingName>TestOffering2</serviceOfferingName>
  <subscriberUserOrg>RND</subscriberUserOrg>
  <subscriptionId>9038afc8476159bc014762606e621232</subscriptionId>
  <subscriptionState>ACTIVE</subscriptionState>
  <subscriptionStatus>ACTIVE</subscriptionStatus>
  <subsriptionDisplayName>
Subscription 0 for 9038afc8465b3f9801465b56ad5e001b
</subsriptionDisplayName>
 <ServiceComponent>
  <componentId>9038afc8476159bc0147626081c51316</componentId>
  <componentLifecycleState>DEPLOYED</componentLifecycleState>
  <componentType>SERVER</componentType>
  <isVisible>true</isVisible>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>memory</propertyName>
   <valueType>Integer</valueType>
   <values>
    <value>1024</value>
   </values>
  </Property>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>datacenterName</propertyName>
   <valueType>String</valueType>
   <values />
  </Property>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>customSpec</propertyName>
   <valueType>String</valueType>
   <values />
  </Property>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>nCPU</propertyName>
   <valueType>Integer</valueType>
   <values>
   <value>2</value>
   </values>
  </Property>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>HostName</propertyName>
   <valueType>String</valueType>
   <values>
   <value>CentOS6.4_x64-Less-3601</value>
   </values>
  </Property>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>HostName</propertyName>
   <valueType>String</valueType>
   <values>
   <value>CentOS6.4_x64-Less-3601</value>
   </values>
  </Property>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>osType</propertyName>
   <valueType>String</valueType>
   <values>
   <value>Linux</value>
   </values>
  </Property>
 </ServiceComponent>
 <ServiceComponent>
  <componentId>9038afc8476159bc0147626081c51317</componentId>
  <componentLifecycleState>DEPLOYED</componentLifecycleState>
  <componentType>INFRASTRUCTURE_SERVICE</componentType>
  <isVisible>true</isVisible>
  <Property>
   <confidential>false</confidential>
   <consumerReadOnly>false</consumerReadOnly>
   <consumerVisible>false</consumerVisible>
   <encrypted>false</encrypted>
   <propertyName>templateReference</propertyName>
   <valueType>String</valueType>
   </Property>
  </ServiceComponent>
  <ServiceComponent>
   <componentId>9038afc8476159bc0147626081c51318</componentId>
   <componentLifecycleState>DEPLOYED</componentLifecycleState>
   <componentType>SERVICE_COMPOSITE</componentType>
   <isVisible>true</isVisible>
  </ServiceComponent>
  <ServiceComponent>
   <componentId>9038afc8476159bc0147626081c51319</componentId>
   <componentLifecycleState>DEPLOYED</componentLifecycleState>
   <componentType>SERVER_GROUP</componentType>
   <isVisible>true</isVisible>
   <Property>
    <confidential>false</confidential>
    <consumerReadOnly>false</consumerReadOnly>
    <consumerVisible>false</consumerVisible>
    <encrypted>false</encrypted>
    <propertyName>serverCount</propertyName>
    <valueType>Integer</valueType>
    <values>
     <value>1</value>
    </values>
   </Property>
   <Property>
    <confidential>false</confidential>
    <consumerReadOnly>false</consumerReadOnly>
    <consumerVisible>false</consumerVisible>
    <encrypted>false</encrypted>
    <propertyName>VCENTER_PROVIDER</propertyName>
    <valueType>String</valueType>
    <values>
     <value>90cd93d9439a378501439b1d000b1b02</value>
    </values>
   </Property>
   <Property>
    <confidential>false</confidential>
    <consumerReadOnly>false</consumerReadOnly>
    <consumerVisible>false</consumerVisible>
    <encrypted>false</encrypted>
    <propertyName>HostName</propertyName>
    <valueType>String</valueType>
    <values />
   </Property>
  </ServiceComponent>
 </ServiceSubscription>
<ServiceSubscription>
       :
       :
</ ServiceSubscription>
</UserSubscriptionComponentsList>