Add Resources

The add resource operation allows you to add new resources to the CSQ.

HTTPS Method

POST

URI

https://<server>/adminapi/csq/{id}/resources

Example URI

https://uccx-server/adminapi/csq/{id}/resources

Query Parameter

onNoImpact

Content TypeApplication/XML, Application/JSON
HTTPS Success Code

200

HTTPS Failure Codes

207,400,401,403,404,405,409,424,500,503

Error Codes

Sample Input XML—Add Resources (POST)

<resources>
    <resource id="Id of the resource">
        </resource>
    <resource id="Id of the resource">
        </resource>
</resources>

Output Response

The add resources API will have one of the following output responses:

  • Success

  • Partial Success

  • Failure

Success Response

HTTPS status code 200 OK for a successful POST operation.

Sample Output XML—Add Resources (POST)

<?xml version="1.0" encoding="UTF-8"?>
    <resources>
    <resource id="Steve">
        <csqs>
            <before>csq1,csq2</before>
            <newlyAdded>csq3,csq4</newlyAdded>
        </csqs>
    </resource>
    <resource id="Michael">
        <csqs>
            <before>csq1,csq2</before>
            <newlyAdded>csq3,csq4</newlyAdded>
        </csqs>
    </resource>
</resources>

Partial Success Response

Partial success response when query parameter onNoImpact is sent and if there is any impact on a resource:

HTTPS status code 207 Multi-Status.

Sample Output XML—Add Resources (POST)

<?xml version="1.0" encoding="UTF-8"?>
<resources>
   <resource id="Steve">
      <status>impact</status>
      <impacts>
         <impact type="ADDS_TO_OTHER_CSQ">
            <csqs>csq1,csq2</csqs>
         </impact>
      </impacts>
   </resource>
   <resource id="Michael">
      <status>success</status>
      <csqs>
         <before>csq1,csq2</before>
         <newlyAdded>csq3,csq4</newlyAdded>
      </csqs>
   </resource>
</resources>

Failure Response

Sample Output XML—Add Resources (POST)

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <resource id="sjefferson">
        <status>Error</status>
        <apiError>
            <errorData>sjefferson</errorData>
            <errorMessage>Resource sjefferson not found in Supervisor rickbarrows team.</errorMessage>
            <errorType>InstanceNotFound</errorType>
            <i18n>
                <key>adminapi.resource.notfound.inSupervisorTeam</key>
                <args>
                    <arg>sjefferson</arg>
                </args>
            </i18n>
        </apiError>
    </resource>
    <resource id="jopeter">
        <status>Error</status>
        <apiError>
            <errorData>jopeter</errorData>
            <errorMessage>Resource jopeter already part of CSQ with ID billingCsq.</errorMessage>
            <errorType>ObjectAlreadyExists</errorType>
            <i18n>
                <key>adminapi.resource.alreadyExists.inCsq</key>
                <args>
                    <arg>jopeter</arg>
                    <arg>billingCsq</arg>
                </args>
            </i18n>
        </apiError>
    </resource>
</resources>