Develop > Application Programming Interface > Legacy APIs > Artifact API > Retrieve a predefined view for an artifact

Retrieve a predefined view for an artifact

The API returns content in a different format when retrieving a single result, hence it is recommended to use View an artifact API.  You may use the following API for performance intensive applications:

Details

URI /artifact/fastview/<artifact_id>
Method GET
Parameters

userIdentifier=<user_id>
    Required; the user ID you want to use as credentials for this API call. See Get userIdentifier for the steps required to get the userIdentifier value.

view=<view_type>
    Required; see Artifact views for a list of view types.

obfuscate
  Optional; returns the password in obfuscated format. The obfuscate parameter can be used only when the artifact view is set to accesspoint (view=accesspoint.)

Returns 200 - Ok
401 - Not authorized
404 - Object not found
500 - Server exception

Examples

The following URL is sent. Note that artifact_id is the ID of any artifact that has an accesspoint.

https://<host>:port/csa/rest/artifact/fastview/90e72e4f3abe4bf4013ac24735730010?userIdentifier=<user_id>&view=accesspoint

The following XML is returned in the response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resultView>
  <resultMap>
    <entry>
      <key>accessPoint.uri</key>
      <value xsi:type="xs:string">http://amz:443</value>
    </entry>
    <entry>
      <key>accessPoint.password</key>
      <value xsi:type="xs:string">amz</value>
    </entry>
    <entry>
      <key>accessPoint.username</key>
      <value xsi:type="xs:string">amz</value>
    </entry>
    <entry>
      <key>accessPoint.category.name</key>
      <value xsi:type="xs:string">URL</value>
    </entry>
  </resultMap>
</resultView>

Filtering

You can filter the results by providing a value for a property in the URI. The query is then filtered based on that property. You can use the properties listed in Artifact views.

Note The property name that is specified in the URL must have the period (.) character replaced with the underscore (_) character.

The following example shows the result when the previous example is filtered on a property name.

The following URL is sent:

https://<host>:<port>/csa/rest/artifact/fastview/90e72e4f3b00a69e013b0c049ab0003?userIdentifier=<user_id>&view=propertyinfo&property_name=propBLN

The following XML is returned in response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resultView><resultMap>
    <entry>
      <key>property.values.value</key>
      <value xsi:type="xs:string">true</value>
    </entry>
    <entry>
      <key>property.consumerVisible</key>
      <value xsi:type="xs:boolean">true</value>
    </entry>
    <entry>
      <key>property.displayName</key>
      <value xsi:type="xs:string">Boolean property</value>
    </entry>
    <entry>
      <key>property.valueType.name</key>
      <value xsi:type="xs:string">BOOLEAN</value>
    </entry>
    <entry>
      <key>property.name</key>
      <value xsi:type="xs:string">propBLN</value>
   </entry>
  </resultMap></resultView>