/
admission_update ()

admission_update ()

Function prototype

admission_update (session, admission, [version])

API Version

2.7.31 and higher

Supported interfaces

SOAP, REST

Description

Updates the PROGRAM version of an ADMISSION to a newer version

When the PROGRAM version of a SUBSCRIPTION is updated to a most recent version of the PROGRAM, the ADMISSIONs that belong to that SUBSCRIPTION are not modified (remain with the same PROGRAM version that they had when created).

This function allows to update the version of a single ADMISSION to a newer version.

Updating the version of an ADMISSION involves the following actions:

  • The version number of the ADMISSION is updated

  • The TASKS defined in the stage “MIGRATION” are inserted. This mechanism allows to perform actions that the designer of the PROGRAM consider necessary when an ADMISSION is updated from a lower version to a greater one. Note that when the new version is several steps ahead of the current ADMISSION version, all migration actions in the intermediate versions are applied (e.g. when updating from version 2 to 5, the migration actions of versions 3, 4 and 5 will be executed)

Required permissions: The active user must be a LIBRARY MANAGER of the TEAM OWNER of the SUBSCRIPTION. Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.

Input parameters:

  • session: is the session token obtained in the session_init() call

  • admission: ADMISSION reference

  • version: If not specified, the version of the SUBSCRIPTION will be used. Note that the following rules apply:

    • It is not allowed to change the admission to a version smaller than the currently assigned.

    • It is not allowed to change the admission to a version greater than the one assigned to the Subscription.

Output parameters:

  • result: empty

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request example

admission_update ( “LCAAAAAAAAAAAA”, 12546)

Response

The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API

Return Error codes

ERROR CODE

 

ERROR CODE

 

INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to update the version of the ADMISSION

ADMISSION.NOT_FOUND

The reference of the ADMISSION is not valid

ADMISSION.UPDATE.INVALID_VERSION

The ADMISSION can't be updated because the selected version is lower that the current ADMISSION version or higher than the SUBSCRIPTION version

WRONG_PARAMS

Invalid version number



Related content