subscription_admissions_update ()
Function prototype | subscription_admissions_update (session, subscription , [from_version], [to_version]) |
---|---|
API Version | 2.7.31 and higher |
SOAP, REST |
Description
Updates the version of the ADMISSIONS of a SUBSCRIPTION to a newer PROGRAM 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 the ADMISSIONS in a SUBSCRIPTION 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 have role LIBRARY MANAGER in the TEAM owner of the SUBSCRIPTION. Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.
Input parameters: |
|
Output parameters: |
|
Request example
Update the version of all the outdated ADMISSIONS of the SUBSCRIPTION to version 5
subscription_admissions_update ( “LCAAAAAAAAAAAA”, 1336, null, 5)
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 ADMISSIONS of the selected SUBSCRIPTION |
SUBSCRIPTION.NOT_FOUND | The SUBSCRIPTION reference doesn’t correspond to an existing SUBSCRIPTION |
WRONG_PARAMS | An invalid version number has been provided |
ADMISSION.UPDATE.INVALID_VERSION | The ADMISSIONS can't be updated because the selected version is greater than the SUBSCRIPTION version |
PROGRAM.NOT_FOUND | The PROGRAM version requested doesn’t exist |