The librarySetDefault Web API Method

Change library version to be the default version for the library.

Version: 1.6

Require valid license: Yes.

Required Permissions: Full

HTTP method: POST

Supported by Editions: Zend Server

Request Parameters:

Parameter

 Type

Required

Description

libraryVersionId

Integer

Yes

A library version ID

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

Response Type: libraryVersionInfo

Possible Action Specific Error Codes:

HTTP Code

 Error Code

Description

400

invalidParameter

A value provided for a parameter is invalid

Example

Usage Example

Request

POST /ZendServer/Api/librarySetDefault

Response

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

<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.3">

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>librarySetDefault</method>

</requestData>

<responseData>

<libraryList>

<libraryInfo>

<libraryId>1</libraryId>

<libraryName>Zend Framework</libraryName>

<status>OK</status>

<libraryVersions>

<libraryVersion>

<libraryVersionId>1</libraryVersionId>

<version>1.12.1</version>

<default>true</default>

<status>staging</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>

<prerequisites>

<dependencies>

<required>

<extension>

<name>pdo_mysql</name>

</extension>

</required>

</dependencies>

</prerequisites>

<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>2</id>

<status>staging</status>

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

<lastUpdatedTimestamp>1367237856</lastUpdatedTimestamp>

</libraryServer>

</servers>

</libraryVersion>

</libraryVersions>

</libraryInfo>

</libraryList>

</responseData>

</zendServerAPIResponse>