admission_update ()
Function prototype | admission_update (session, admission, [version]) |
---|---|
API Version | 2.7.31 and higher |
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: |
|
Output parameters: |
|
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 |
|
---|---|
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 |