The libraryVersionRemove Web API Method

Remove existing library versions. This process is asynchronous – the initial request will start the removal process and the initial response will show information about the library versions being removed – however the removal process will proceed after the response is returned. The user is expected to continue checking the library versions status using the libVersionsGetStatus method until the removal process is complete. Once libVersionsGetStatus contains no information about the specific library versions, they have been completely remove.

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

libraryVersionId

Array

Yes

Library Version IDs to remove. In case of empty array no version is not 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: libraryVersionsInfo

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

404

noSuchLibrary

One or more of the provided library versions 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 xmlns="http://www.zend.com/server/api/1.3">

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>libraryVersionRemove</method>

</requestData>

 

<responseData>

<libraryList>

<libraryInfo>

<libraryId>1</libraryId>

<libraryName>Zend Framework</libraryName>

<status>unstaging</status>

<libraryVersions>

<libraryVersion>

<libraryVersionId>1</libraryVersionId>

<version>1.12.1</version>

<default>true</default>

<status>unstaging</status>

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

<isDefinedLibrary>false</isDefinedLibrary>

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

<creationTimeTimestamp>12345</creationTimeTimestamp>

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

<lastUsedTimeTimestamp>12345</lastUsedTimeTimestamp>

<servers>

<libraryServer>

<id>0</id>

<status>staging</status>

<lastMessage><![CDATA[]]></lastMessage>

<lastUpdatedTimestamp>1367237856</lastUpdatedTimestamp>

</libraryServer>

<libraryServer>

<id>1</id>

<status>staging</status>

<lastMessage><![CDATA[]]></lastMessage>

<lastUpdatedTimestamp>1367237856</lastUpdatedTimestamp>

</libraryServer>

<libraryServer>

<id>3</id>

<status>staging</status>

<lastMessage><![CDATA[]]></lastMessage>

<lastUpdatedTimestamp>1367237856</lastUpdatedTimestamp>

</libraryServer>

</servers>

</libraryVersion>

</libraryVersions>

</libraryInfo>

</libraryList>

</responseData>

</zendServerAPIResponse>