The libraryRemove Web API Method

Remove existing library/ies. This process is asynchronous – the intial request will start the removal process and the initial response will show information about the library/ies being removed – however the removal process will proceed after the response is returned. The user is expected to continue checking the library/ies status using the libraryGetStatus method until the removal process is complete. Once libraryGetStatus contains no information about the specific library/ies, they have been completely remove. Note*: When the library is removed, its all library versions also are removed.

Note:

When the last library version from some library is removed the library itself is removed also.

Version: 1.5

Required Permissions: Full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

libraryIds

Array

Yes

Library IDs to remove. In case of empty array, no library is removed .

ignoreFailures

Boolean

No

Ignore failures during removing library versions if only some servers reported failures; If all servers report failures the operation will fail in any case. The default value is FALSE – meaning any failure will return an error.

Expected Response Code: 202 Accepted  - For more information see Response Format.

Response Type: libraryStatus

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

noSuchLibrary

One or more of the provided library IDs do not exist.

Example

Usage Example

Request

GET POST /ZendServer/Api/libraryVersionsRemove

Content-type: application/x-www-form-urlencoded

libraryVersionIds[]=1&libraryVersionIds[]=2

Response

<?xml version="1.0" encoding="UTF-8"?>

<zendServerAPIResponse >

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>libraryRemove</method>

</requestData>

 

<responseData>

<libraryList>

<libraryInfo>

<libraryId>1</libraryId>

<libraryName>Zend Framework</libraryName>

<status>removing</status>

<libraryVersions>

<libraryVersion>

<libraryVersionId>1</libraryVersionId>

<version>1.12.1</version>

<default>true</default>

<status>removing</status>

<installedLocation><![CDATA[/path/to/lib]]></installedLocation>

<isDefinedLibrary>false</isDefinedLibrary>

<creationTime>1970-01-01T02:00:00+02:00</creationTime>

<lastUsed>1970-01-01T02:00:00+02:00</lastUsed>

<servers>

<libraryServer>

<serverId>1</serverId>

<status>OK</status>

</libraryServer>

<libraryServer>

<serverId>4</serverId>

<status>OK</status>

</libraryServer>

<libraryServer>

<serverId>8</serverId>

<status>OK</status>

</libraryServer>

</servers>

</libraryVersion>

</libraryVersions>

</libraryInfo>

</libraryList>

</responseData>

</zendServerAPIResponse>