<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NCX94J4" height="0" width="0" style="display:none;visibility:hidden"></iframe>

ExecuteHttpRequest function for IBM Planning Analytics (TM1)

ExecuteHttpRequest is a TurboIntegrator function that executes an HTTP request to a server over the web, enabling the retrieval of web pages, data and other resources. Here are a couple of use cases for this function:

  • Retrieving a list of cubes from the TM1 Server
  • Fetching the local weather from an external data source
  • Submitting data to a central reporting system or database
  • Triggering an external service workflow, after data loading is complete

Overall, the ExecuteHttpRequest function significantly enhances the integration, automation, and extensibility of TM1, enabling it to be a central part of a larger ecosystem of business applications and services.

Learn how to use the GET and POST methods with ExecuteHttpRequest and supplementary functions HttpResponseGetStatusCode, HttpResponseGetHeader and HttpResponseGetBody.

Where can the ExecuteHttpRequest function be used?

TurboIntegrator

    Which TM1 Server version is the ExecuteHttpRequest function available for?

    Version 12

      What is the syntax for ExecuteHttpRequest?

      ExecuteHttpRequest(Method, URL, option1, option2, …)

      • Method: GET, POST, PATCH, PUT, DELETE
      • URL: where you want to execute the request. Must be either HTTP or HTTPS protocol.
      • Option: You can use these options in the request:
        • -u (Basic user credential)
        • -h (Header)
        • -d (Body. When started with an @ character, the body will be read from the file having the name found following ‘@’)
        • -o (A file name where the response will be written)
        • -c (A custom CA certificate file)
        • -k (Instructs the server to not verify the TLS certificates)

      Relevant Functions

      • DataMinorErrorCount = Counts minor errors that occur in Data tab
      • ExecuteCommand = Executes a command line
      • ExecuteHttpRequest = Executes an HTTP request to a server over the web, enabling the retrieval of web pages, data and other resources
      • ExecuteJavaN = Executes a Java TurboIntegrator process that returns a number
      • ExecuteJavaS = Executes a Java TurboIntegrator process that returns a string
      • ExecuteProcess = Executes a process
      • GetProcessErrorFileDirectory = Returns the full path name, with trailing slash, of the directory where error files are written
      • GetProcessErrorFilename = Returns the name of the error log file associated with the process
      • GetProcessName = Returns the name of the process
      • HttpResponseGetStatusCode = returns the status code
      • HttpResponseGetHeader = returns content from the header
      • HttpResponseGetBody = returns content from the body
      • If = Uses a conditional expression to check if an expression is true or false
      • ItemReject = Skips the current source data transaction like ItemSkip
      • ItemSkip = Skips the current transaction in the process
      • MetadataMinorErrorCount = A global variable that counts minor errors that occur in the Metadata portion in a process
      • ProcessBreak = Stops processing any data and moves straight to the Epilog
      • ProcessError = Immediately terminates the process and produces an error
      • ProcessExists = Checks if a process exists. 1 is returned if the process exist, 0 if it does not exist
      • ProcessExitByChoreRollback = triggers a chore rollback and exits with an error code that discards all pending edits and stops further processing in a TurboIntegrator process.
      • ProcessExitByProcessRollback = triggers a process rollback and exits with an error code that discards all pending edits and stops further processing in a TurboIntegrator process.
      • ProcessQuit = Immediately terminates the process and returns a Process Quit message
      • ProcessReturnCode = A global variable that stores the exist status of the most recently executed process
      • ProcessRollback = Terminates the process and begins a rollback
      • PrologMinorErrorCount = A global variable that counts minor errors that occur in the Prolog
      • RunProcess = Run multiple processes in parallel. This function can speed up data loads and other processes by dividing work into multiple parts
      • Sleep = Pauses a process for a specified interval
      • Synchronized = Forces processes to run in sequence
      • While = Repeats a set of command until a condition is true