library_resource_get ()
Function prototype | library_resource_get (session, resource_id) |
---|---|
API Version | 2.6.20 and higher |
SOAP, REST (since API Version 2.7.29) |
Description
returns the contents of a LIBRARY RESOURCE object.
Note that this function can be used for small objects (up to 512.000 bytes). If the resource referenced is bigger than the maximum allowed, an error will be returned and library_resource_get_stream () should be used instead
Required permissions: The active user must have role XXXX. Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.
Input parameters: |
|
Output parameters: |
|
Request example
library_resource_get ( “LCAAAAAAAAAAAA”, 344);
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 use the requested resource |
LIBRARY_RESOURCE_NOT_FOUND | The LIBRARY RESOURCE reference provided does not correspond to an existing resource |
LIBRARY_RESOURCE_TOO_LARGE | The requested resource is too large and should be downloaded using streaming. See library_resource_get_stream () |