Skip to end of metadata
Go to start of metadata

The apsdb object provides a number of methods that enable a wide range of operations inside Apstrata scripts.

  • beginTransactionInitiates a transaction. All API calls made after calling beginTransaction will be treated atomically until the transaction is terminated. 
  • callAPIAllows calling any Apstrata webservice. 
  • callHttpUsed to make external http requests.
  • createFileAllows the developer to create a file.
  • getApiCallUsed to generate a signed URL for making an apstrata API call. 
  • getAttachmentReturns a file attached to a given field in a document.
  • httpRedirectSends a redirect HTTP response from within a script.
  • httpRespondReturns a handle to the HTTP response stream, in order for you to be allowed to edit the response stream from within the script before being returned.
  • requireReturns a handle to another script in order to invoke functions within. This allows to build modular code, by bundling certain functions into libraries that can be included into other scripts.
  • serveDeviceFileStreams a file from a device document field into the response. It will remove any content that is in the response and has not been flushed yet. 
  • serveFileStreams a file from a document field to the response. It will remove any content that is in the response that has not been flushed yet.
  • serveUserFileStreams a file from a user document field into the response. It will remove any content that is in the response and has not been flushed yet.

  • No labels