Skip navigation links
Thingworx Platform API
8.5.0
com.thingworx.resources.content

Class ContentLoader

    • Constructor Detail

      • ContentLoader

        public ContentLoader()
    • Method Detail

      • GetCookies

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetCookies(java.lang.String url,
                                                                                     java.lang.String username,
                                                                                     java.lang.String password,
                                                                                     org.json.JSONObject headers,
                                                                                     java.lang.Boolean ignoreSSLErrors,
                                                                                     java.lang.Double timeout,
                                                                                     java.lang.Boolean useNTLM,
                                                                                     java.lang.String workstation,
                                                                                     java.lang.String domain,
                                                                                     java.lang.Boolean useProxy,
                                                                                     java.lang.String proxyHost,
                                                                                     java.lang.Integer proxyPort,
                                                                                     java.lang.String proxyScheme)
                                                                              throws java.lang.Exception
        Service Category:
        Cookies
        Service Description:
        Issue a URL call and get the returned cookies back.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Cookies - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • Delete

        @ThingworxExtensionApiMethod(since={6,6})
        public void Delete(java.lang.String url,
                                                                     java.lang.String username,
                                                                     java.lang.String password,
                                                                     org.json.JSONObject headers,
                                                                     java.lang.Boolean ignoreSSLErrors,
                                                                     java.lang.Boolean withCookies,
                                                                     java.lang.Double timeout,
                                                                     java.lang.Boolean useNTLM,
                                                                     java.lang.String workstation,
                                                                     java.lang.String domain,
                                                                     java.lang.Boolean useProxy,
                                                                     java.lang.String proxyHost,
                                                                     java.lang.Integer proxyPort,
                                                                     java.lang.String proxyScheme)
                                                              throws java.lang.Exception
        Service Category:
        Delete
        Service Description:
        Invoke an HTTP delete request on a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetText

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetText(java.lang.String url,
                                                                                  java.lang.String username,
                                                                                  java.lang.String password,
                                                                                  org.json.JSONObject headers,
                                                                                  java.lang.Boolean ignoreSSLErrors,
                                                                                  java.lang.Boolean withCookies,
                                                                                  java.lang.Double timeout,
                                                                                  java.lang.Boolean useNTLM,
                                                                                  java.lang.String workstation,
                                                                                  java.lang.String domain,
                                                                                  java.lang.Boolean useProxy,
                                                                                  java.lang.String proxyHost,
                                                                                  java.lang.Integer proxyPort,
                                                                                  java.lang.String proxyScheme,
                                                                                  java.lang.Boolean appendHeader)
                                                                           throws java.lang.Exception
        Service Category:
        Text
        Service Description:
        Get text content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        appendHeader - Append header in response; optional: default value is true - BOOLEAN
        Returns:
        result Loaded content as text content - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetXML

        @ThingworxExtensionApiMethod(since={6,6})
        public org.w3c.dom.Document GetXML(java.lang.String url,
                                                                                     java.lang.String username,
                                                                                     java.lang.String password,
                                                                                     org.json.JSONObject headers,
                                                                                     java.lang.Boolean ignoreSSLErrors,
                                                                                     java.lang.Boolean withCookies,
                                                                                     java.lang.Double timeout,
                                                                                     java.lang.Boolean useNTLM,
                                                                                     java.lang.String workstation,
                                                                                     java.lang.String domain,
                                                                                     java.lang.Boolean useProxy,
                                                                                     java.lang.String proxyHost,
                                                                                     java.lang.Integer proxyPort,
                                                                                     java.lang.String proxyScheme)
                                                                              throws java.lang.Exception
        Service Category:
        XML
        Service Description:
        Get XML content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as text content - XML
        Throws:
        java.lang.Exception - If an error occurs
      • GetJSON

        @ThingworxExtensionApiMethod(since={6,6})
        public org.json.JSONObject GetJSON(java.lang.String url,
                                                                                     java.lang.String username,
                                                                                     java.lang.String password,
                                                                                     org.json.JSONObject headers,
                                                                                     java.lang.Boolean ignoreSSLErrors,
                                                                                     java.lang.Boolean withCookies,
                                                                                     java.lang.Double timeout,
                                                                                     java.lang.Boolean useNTLM,
                                                                                     java.lang.String workstation,
                                                                                     java.lang.String domain,
                                                                                     java.lang.Boolean useProxy,
                                                                                     java.lang.String proxyHost,
                                                                                     java.lang.Integer proxyPort,
                                                                                     java.lang.String proxyScheme)
                                                                              throws java.lang.Exception
        Service Category:
        JSON
        Service Description:
        Get json content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as text content - JSON
        Throws:
        java.lang.Exception - If an error occurs
      • LoadXML

        @ThingworxExtensionApiMethod(since={6,6})
        public org.w3c.dom.Document LoadXML(java.lang.String url,
                                                                                      java.lang.String username,
                                                                                      java.lang.String password,
                                                                                      org.json.JSONObject headers,
                                                                                      java.lang.Boolean ignoreSSLErrors,
                                                                                      java.lang.Boolean withCookies,
                                                                                      java.lang.Double timeout,
                                                                                      java.lang.Boolean useNTLM,
                                                                                      java.lang.String workstation,
                                                                                      java.lang.String domain,
                                                                                      java.lang.Boolean useProxy,
                                                                                      java.lang.String proxyHost,
                                                                                      java.lang.Integer proxyPort,
                                                                                      java.lang.String proxyScheme)
                                                                               throws java.lang.Exception
        Service Category:
        XML
        Service Description:
        Load XML Content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as XML document - XML
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • LoadText

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String LoadText(java.lang.String url,
                                                                                   java.lang.String username,
                                                                                   java.lang.String password,
                                                                                   org.json.JSONObject headers,
                                                                                   java.lang.Boolean ignoreSSLErrors,
                                                                                   java.lang.Boolean withCookies,
                                                                                   java.lang.Double timeout,
                                                                                   java.lang.Boolean useNTLM,
                                                                                   java.lang.String workstation,
                                                                                   java.lang.String domain,
                                                                                   java.lang.Boolean useProxy,
                                                                                   java.lang.String proxyHost,
                                                                                   java.lang.Integer proxyPort,
                                                                                   java.lang.String proxyScheme,
                                                                                   java.lang.Boolean appendHeader)
                                                                            throws java.lang.Exception
        Service Category:
        Text
        Service Description:
        Load text content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        appendHeader - Append header in response; optional: default value is true - BOOLEAN
        Returns:
        result Loaded content as text content - STRING
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • LoadImage

        @ThingworxExtensionApiMethod(since={6,6})
        public byte[] LoadImage(java.lang.String url,
                                                                          java.lang.String username,
                                                                          java.lang.String password,
                                                                          org.json.JSONObject headers,
                                                                          java.lang.Boolean ignoreSSLErrors,
                                                                          java.lang.Double timeout,
                                                                          java.lang.Boolean useNTLM,
                                                                          java.lang.String workstation,
                                                                          java.lang.String domain,
                                                                          java.lang.Boolean useProxy,
                                                                          java.lang.String proxyHost,
                                                                          java.lang.Integer proxyPort,
                                                                          java.lang.String proxyScheme)
                                                                   throws java.lang.Exception
        Service Category:
        Image
        Service Description:
        Load image content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as an image primitive - IMAGE
        Throws:
        java.lang.Exception - If an error occurs
      • LoadBinary

        @ThingworxExtensionApiMethod(since={6,6})
        public byte[] LoadBinary(java.lang.String url,
                                                                           java.lang.String username,
                                                                           java.lang.String password,
                                                                           org.json.JSONObject headers,
                                                                           java.lang.Boolean ignoreSSLErrors,
                                                                           java.lang.Double timeout,
                                                                           java.lang.Boolean useNTLM,
                                                                           java.lang.String workstation,
                                                                           java.lang.String domain,
                                                                           java.lang.Boolean useProxy,
                                                                           java.lang.String proxyHost,
                                                                           java.lang.Integer proxyPort,
                                                                           java.lang.String proxyScheme)
                                                                    throws java.lang.Exception
        Service Category:
        Binary
        Service Description:
        Load binary content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as an blob/binary primitive - BLOB
        Throws:
        java.lang.Exception - If an error occurs
      • LoadJSON

        @ThingworxExtensionApiMethod(since={6,6})
        public org.json.JSONObject LoadJSON(java.lang.String url,
                                                                                      java.lang.String username,
                                                                                      java.lang.String password,
                                                                                      org.json.JSONObject headers,
                                                                                      java.lang.Boolean ignoreSSLErrors,
                                                                                      java.lang.Boolean withCookies,
                                                                                      java.lang.Double timeout,
                                                                                      java.lang.Boolean useNTLM,
                                                                                      java.lang.String workstation,
                                                                                      java.lang.String domain,
                                                                                      java.lang.Boolean useProxy,
                                                                                      java.lang.String proxyHost,
                                                                                      java.lang.Integer proxyPort,
                                                                                      java.lang.String proxyScheme)
                                                                               throws java.lang.Exception
        Service Category:
        JSON
        Service Description:
        Load JSON content from a URL.
        Parameters:
        url - URL to load - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as a JSON Object - JSON
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • PostText

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String PostText(java.lang.String url,
                                                                                   java.lang.String content,
                                                                                   java.lang.String contentType,
                                                                                   java.lang.String username,
                                                                                   java.lang.String password,
                                                                                   org.json.JSONObject headers,
                                                                                   java.lang.Boolean ignoreSSLErrors,
                                                                                   java.lang.Boolean withCookies,
                                                                                   java.lang.Double timeout,
                                                                                   java.lang.Boolean useNTLM,
                                                                                   java.lang.String workstation,
                                                                                   java.lang.String domain,
                                                                                   java.lang.Boolean useProxy,
                                                                                   java.lang.String proxyHost,
                                                                                   java.lang.Integer proxyPort,
                                                                                   java.lang.String proxyScheme)
                                                                            throws java.lang.Exception
        Service Category:
        Text
        Service Description:
        Load text content from a URL via HTTP POST.
        Parameters:
        url - URL to load - STRING
        content - Posted content as string - STRING
        contentType - Posted content type as string - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as string - STRING
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • PostMultipart

        @ThingworxExtensionApiMethod(since={7,2,1})
        public org.json.JSONObject PostMultipart(java.lang.String url,
                                                                                             java.lang.String repository,
                                                                                             java.lang.String pathOnRepository,
                                                                                             java.lang.Object partsToSend,
                                                                                             java.lang.String username,
                                                                                             java.lang.String password,
                                                                                             org.json.JSONObject headers,
                                                                                             java.lang.Boolean ignoreSSLErrors,
                                                                                             java.lang.Double timeout,
                                                                                             java.lang.Boolean useNTLM,
                                                                                             java.lang.String workstation,
                                                                                             java.lang.String domain,
                                                                                             java.lang.Boolean useProxy,
                                                                                             java.lang.String proxyHost,
                                                                                             java.lang.Integer proxyPort,
                                                                                             java.lang.String proxyScheme)
                                                                                      throws java.lang.Exception
        Service Category:
        Multipart
        Service Description:
        Multipart data upload from Thingworx to and external target via HTTP POST.
        Parameters:
        url - URL to load - STRING
        repository - Repository to get file from to upload - STRING
        pathOnRepository - Path on repository to file - STRING
        partsToSend - Infotable where each field is a part to send - INFOTABLE
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Response as JSON Object - JSON
        Throws:
        java.lang.Exception - If an error occurs
      • PostImage

        @ThingworxExtensionApiMethod(since={6,6})
        public byte[] PostImage(java.lang.String url,
                                                                          byte[] content,
                                                                          java.lang.String mimeType,
                                                                          java.lang.String username,
                                                                          java.lang.String password,
                                                                          org.json.JSONObject headers,
                                                                          java.lang.Boolean ignoreSSLErrors,
                                                                          java.lang.Double timeout,
                                                                          java.lang.Boolean useNTLM,
                                                                          java.lang.String workstation,
                                                                          java.lang.String domain,
                                                                          java.lang.Boolean useProxy,
                                                                          java.lang.String proxyHost,
                                                                          java.lang.Integer proxyPort,
                                                                          java.lang.String proxyScheme)
                                                                   throws java.lang.Exception
        Service Category:
        Image
        Service Description:
        Load Image content from a URL via HTTP POST.
        Parameters:
        url - URL to load - STRING
        content - Posted content as image - IMAGE
        mimeType - Mime Type - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as BLOB Object - BLOB
        Throws:
        java.lang.Exception - If an error occurs
      • PostBinary

        @ThingworxExtensionApiMethod(since={6,6})
        public byte[] PostBinary(java.lang.String url,
                                                                           byte[] content,
                                                                           java.lang.String username,
                                                                           java.lang.String password,
                                                                           org.json.JSONObject headers,
                                                                           java.lang.Boolean ignoreSSLErrors,
                                                                           java.lang.Double timeout,
                                                                           java.lang.Boolean useNTLM,
                                                                           java.lang.String workstation,
                                                                           java.lang.String domain,
                                                                           java.lang.Boolean useProxy,
                                                                           java.lang.String proxyHost,
                                                                           java.lang.Integer proxyPort,
                                                                           java.lang.String proxyScheme)
                                                                    throws java.lang.Exception
        Service Category:
        Binary
        Service Description:
        Load binary content from a URL via HTTP POST.
        Parameters:
        url - URL to load - STRING
        content - Posted content as image - BLOB
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as BLOB Object - BLOB
        Throws:
        java.lang.Exception - If an error occurs
      • PostJSON

        @ThingworxExtensionApiMethod(since={6,6})
        public org.json.JSONObject PostJSON(java.lang.String url,
                                                                                      org.json.JSONObject content,
                                                                                      java.lang.String username,
                                                                                      java.lang.String password,
                                                                                      org.json.JSONObject headers,
                                                                                      java.lang.Boolean ignoreSSLErrors,
                                                                                      java.lang.Boolean withCookies,
                                                                                      java.lang.Double timeout,
                                                                                      java.lang.Boolean useNTLM,
                                                                                      java.lang.String workstation,
                                                                                      java.lang.String domain,
                                                                                      java.lang.Boolean useProxy,
                                                                                      java.lang.String proxyHost,
                                                                                      java.lang.Integer proxyPort,
                                                                                      java.lang.String proxyScheme)
                                                                               throws java.lang.Exception
        Service Category:
        JSON
        Service Description:
        Load JSON content from a URL via HTTP POST.
        Parameters:
        url - URL to load - STRING
        content - Posted content as JSON object - JSON
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as JSON Object - JSON
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • PostXML

        @ThingworxExtensionApiMethod(since={6,6})
        public org.w3c.dom.Document PostXML(java.lang.String url,
                                                                                      org.w3c.dom.Document content,
                                                                                      java.lang.String username,
                                                                                      java.lang.String password,
                                                                                      org.json.JSONObject headers,
                                                                                      java.lang.Boolean ignoreSSLErrors,
                                                                                      java.lang.Boolean withCookies,
                                                                                      java.lang.Double timeout,
                                                                                      java.lang.Boolean useNTLM,
                                                                                      java.lang.String workstation,
                                                                                      java.lang.String domain,
                                                                                      java.lang.Boolean useProxy,
                                                                                      java.lang.String proxyHost,
                                                                                      java.lang.Integer proxyPort,
                                                                                      java.lang.String proxyScheme)
                                                                               throws java.lang.Exception
        Service Category:
        XML
        Service Description:
        Load XML content from a URL via HTTP POST.
        Parameters:
        url - URL to load - STRING
        content - Posted content as XML document. The xml content must start with an xml declaration, ie <?xml version="1.0" encoding="UTF-8"?> - XML
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as XML document - XML
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • PutJSON

        @ThingworxExtensionApiMethod(since={6,6})
        public org.json.JSONObject PutJSON(java.lang.String url,
                                                                                     org.json.JSONObject content,
                                                                                     java.lang.String username,
                                                                                     java.lang.String password,
                                                                                     org.json.JSONObject headers,
                                                                                     java.lang.Boolean ignoreSSLErrors,
                                                                                     java.lang.Boolean withCookies,
                                                                                     java.lang.Double timeout,
                                                                                     java.lang.Boolean useNTLM,
                                                                                     java.lang.String workstation,
                                                                                     java.lang.String domain,
                                                                                     java.lang.Boolean useProxy,
                                                                                     java.lang.String proxyHost,
                                                                                     java.lang.Integer proxyPort,
                                                                                     java.lang.String proxyScheme)
                                                                              throws java.lang.Exception
        Service Category:
        JSON
        Service Description:
        Load JSON content from a URL via HTTP PUT.
        Parameters:
        url - URL to load - STRING
        content - Posted content as JSON object - JSON
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as JSON Object - JSON
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • PutBinary

        @ThingworxExtensionApiMethod(since={6,6})
        public byte[] PutBinary(java.lang.String url,
                                                                          byte[] content,
                                                                          java.lang.String username,
                                                                          java.lang.String password,
                                                                          org.json.JSONObject headers,
                                                                          java.lang.Boolean ignoreSSLErrors,
                                                                          java.lang.Double timeout,
                                                                          java.lang.Boolean useNTLM,
                                                                          java.lang.String workstation,
                                                                          java.lang.String domain,
                                                                          java.lang.Boolean useProxy,
                                                                          java.lang.String proxyHost,
                                                                          java.lang.Integer proxyPort,
                                                                          java.lang.String proxyScheme)
                                                                   throws java.lang.Exception
        Service Category:
        Binary
        Service Description:
        Load binary content from a URL via HTTP PUT.
        Parameters:
        url - URL to load - STRING
        content - Posted content as image - BLOB
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as BLOB Object - BLOB
        Throws:
        java.lang.Exception - If an error occurs
      • PutText

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String PutText(java.lang.String url,
                                                                                  java.lang.String content,
                                                                                  java.lang.String contentType,
                                                                                  java.lang.String username,
                                                                                  java.lang.String password,
                                                                                  org.json.JSONObject headers,
                                                                                  java.lang.Boolean ignoreSSLErrors,
                                                                                  java.lang.Boolean withCookies,
                                                                                  java.lang.Double timeout,
                                                                                  java.lang.Boolean useNTLM,
                                                                                  java.lang.String workstation,
                                                                                  java.lang.String domain,
                                                                                  java.lang.Boolean useProxy,
                                                                                  java.lang.String proxyHost,
                                                                                  java.lang.Integer proxyPort,
                                                                                  java.lang.String proxyScheme)
                                                                           throws java.lang.Exception
        Service Category:
        Text
        Service Description:
        Load text content from a URL via HTTP PUT.
        Parameters:
        url - URL to load - STRING
        content - Posted content as string - STRING
        contentType - Posted content type as string - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as a string - STRING
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • PutXML

        @ThingworxExtensionApiMethod(since={6,6})
        public org.w3c.dom.Document PutXML(java.lang.String url,
                                                                                     org.w3c.dom.Document content,
                                                                                     java.lang.String username,
                                                                                     java.lang.String password,
                                                                                     org.json.JSONObject headers,
                                                                                     java.lang.Boolean ignoreSSLErrors,
                                                                                     java.lang.Boolean withCookies,
                                                                                     java.lang.Double timeout,
                                                                                     java.lang.Boolean useNTLM,
                                                                                     java.lang.String workstation,
                                                                                     java.lang.String domain,
                                                                                     java.lang.Boolean useProxy,
                                                                                     java.lang.String proxyHost,
                                                                                     java.lang.Integer proxyPort,
                                                                                     java.lang.String proxyScheme)
                                                                              throws java.lang.Exception
        Service Category:
        XML
        Service Description:
        Load XML content from a URL via HTTP PUT.
        Parameters:
        url - URL to load - STRING
        content - Posted content as XML document - XML
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        withCookies - Include cookies in response - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as XML document - XML
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information:
        If the parsing of the header fails, an exception is logged and the request execution continues. If the client code, which is expecting the header, has an exception (because the parsing of the header object previously failed), you can debug and find the header parsing errors in the logs.

      • LoadMediaEntity

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String LoadMediaEntity(java.lang.String name,
                                                                                          java.lang.String description,
                                                                                          TagCollection tags,
                                                                                          java.lang.String url,
                                                                                          java.lang.String username,
                                                                                          java.lang.String password,
                                                                                          org.json.JSONObject headers,
                                                                                          java.lang.Boolean ignoreSSLErrors,
                                                                                          java.lang.Double timeout,
                                                                                          java.lang.Boolean useNTLM,
                                                                                          java.lang.String workstation,
                                                                                          java.lang.String domain,
                                                                                          java.lang.Boolean useProxy,
                                                                                          java.lang.String proxyHost,
                                                                                          java.lang.Integer proxyPort,
                                                                                          java.lang.String proxyScheme)
                                                                                   throws java.lang.Exception
        Service Category:
        Image
        Service Description:
        Load an image via URL and create/update a media entity.
        Parameters:
        name - Name of the media entity to save or update - STRING
        description - Description for the media entity to save - STRING
        tags - Tags for the media entity to save - TAGS
        url - URL to load an image - STRING
        username - Optional user name credential - STRING
        password - Optional password credential - STRING
        headers - Optional HTTP headers - JSON
        ignoreSSLErrors - Ignore SSL Certificate Errors - BOOLEAN
        timeout - Optional timeout in seconds - NUMBER
        useNTLM - Use NTLM Authentication - BOOLEAN
        workstation - Auth workstation - STRING
        domain - Auth domain - STRING
        useProxy - Use Proxy server - BOOLEAN
        proxyHost - Proxy host - STRING
        proxyPort - Proxy port - INTEGER
        proxyScheme - Proxy scheme - STRING
        Returns:
        result Loaded content as image - IMAGELINK
        Throws:
        java.lang.Exception - If an error occurs