Develop > Application Programming Interface > Legacy APIs > Artifact API > Retrieve resolved properties for an artifact

Retrieve resolved properties for an artifact

A property can have a property mapping configured that indicates its value to be retrieved from a property of another artifact. The REST API provides a mechanism to retrieve the value from the source property. As part of this retrieval, relevant tokens configured on properties are also resolved.

There are two approaches to retrieving resolved properties:

  • Retrieve all properties
  • Retrieve a single named property

Details

URI /artifact/<artifact_id>/resolveProperties
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.

propertyName=<property_name>
    Optional; the name of the property you want to retrieve. Only retrieves the value for the property specified.

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

Examples

The following URL was used to retrieve all properties for an artifact:https://<host>:<port>/csa/rest/artifact/<id>/resolveProperties?userIdentifier=<user_id>

The following XML was returned in the response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Properties>
    <property> ... </property>
    <property> ... </property>
    <property>
        <id>90d9651a3684c7f0013684cafda80005</id>
        <createdOn>2012-04-05T16:15:57.480-07:00</createdOn>
        <updatedOn>2012-04-05T16:15:57.497-07:00</updatedOn>
        <isCriticalSystemObject>false</isCriticalSystemObject>
        <name>PARENT_SVC_COMPONENT_ID</name>
        <artifact>
            <id>90d9651a3684c7f0013684cafda80008</id>
            <isCriticalSystemObject>false</isCriticalSystemObject>
            <name>TEST_CHILD_COMPONENT</name>
            <disabled>false</disabled>
        </artifact>
        <propertyBindings>
            <id>90d9651a3684c7f0013684cb28820009</id>
            <createdOn>2012-04-05T16:16:08.450-07:00</createdOn>
            <updatedOn>2012-04-05T16:16:08.450-07:00</updatedOn>
            <propertyBindingType>
                <name>SOURCE</name>
                <categoryType>
                    <name>PROPERTY_BINDING_TYPE</name>
                </categoryType>
            </propertyBindingType>
            <artifact>90d9651a3684c7f0013684c91f8c0004</artifact>
            <artifactPropertyName>SVC_COMPONENT_ID</artifactPropertyName>
        </propertyBindings>
        <scope> ... </scope>
        <valueType> ... </valueType>
        <values><id>90d9651a3684c7f0013684c91f8b0002</id>
            <createdOn>2012-04-05T16:13:55.083-07:00</createdOn>
            <updatedOn>2012-04-05T16:13:55.083-07:00</updatedOn>
            <value>90d9651a3684c7f0013684c91f8c0004</value></values>
        <maxOccurs>0</maxOccurs>
        <minOccurs>0</minOccurs>
        <orderIndex>0</orderIndex>
        <confidential>false</confidential>
        <encrypted>false</encrypted>
        <consumerReadOnly>false</consumerReadOnly>
        <consumerVisible>false</consumerVisible>
    </property><property> ... </property>
</Properties>

The following URL was used to retrieve a single property:

https://<host>:<port>/csa/rest/artifact/<id>/resolveProperties? userIdentifier=<user_id>&propertyName=PARENT_SVC_COMPONENT_ID

The following XML was returned in the response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Properties>
	<property>
        <id>90d9651a3684c7f0013684cafda80005</id>
        <name>PARENT_SVC_COMPONENT_ID</name>
        ...
    </property>
</Properties>