Class ContentLoader
- All Implemented Interfaces:
IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAvatar
,IEntityLifeCycleEvent
,IPersistable
,IServiceProvider
,ITaggableObject
,IDependencyScannableObject
,IEntityDefinition
,IPersistableObject<String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IAspectContainer
,INamedObject
,Serializable
- See Also:
-
Field Summary
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Delete
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Delete Service Description: Invoke an HTTP delete request on a URL.GetCookies
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Cookies Service Description: Issue a URL call and get the returned cookies back.org.json.JSONObject
GetJSON
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: JSON Service Description: Get json content from a URL.GetText
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme, Boolean appendHeader) Service Category: Text Service Description: Get text content from a URL.GetXML
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: XML Service Description: Get XML content from a URL.byte[]
LoadBinary
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Binary Service Description: Load binary content from a URL.byte[]
LoadImage
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Image Service Description: Load image content from a URL.org.json.JSONObject
LoadJSON
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: JSON Service Description: Load JSON content from a URL.LoadMediaEntity
(String name, String description, TagCollection tags, String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Image Service Description: Load an image via URL and create/update a media entity.LoadText
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme, Boolean appendHeader) Service Category: Text Service Description: Load text content from a URL.LoadXML
(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: XML Service Description: Load XML Content from a URL.byte[]
PostBinary
(String url, byte[] content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Binary Service Description: Load binary content from a URL via HTTP POST.byte[]
PostImage
(String url, byte[] content, String mimeType, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Image Service Description: Load Image content from a URL via HTTP POST.org.json.JSONObject
PostJSON
(String url, org.json.JSONObject content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: JSON Service Description: Load JSON content from a URL via HTTP POST.org.json.JSONObject
PostMultipart
(String url, String repository, String pathOnRepository, Object partsToSend, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) org.json.JSONObject
PostMultipart
(String url, String repository, String pathOnRepository, Object partsToSend, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme, Boolean useUTF8Encoding) Service Category: Multipart Service Description: Multipart data upload from Thingworx to and external target via HTTP POST.PostText
(String url, String content, String contentType, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Text Service Description: Load text content from a URL via HTTP POST.PostXML
(String url, Document content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: XML Service Description: Load XML content from a URL via HTTP POST.byte[]
PutBinary
(String url, byte[] content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Binary Service Description: Load binary content from a URL via HTTP PUT.org.json.JSONObject
PutJSON
(String url, org.json.JSONObject content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: JSON Service Description: Load JSON content from a URL via HTTP PUT.PutText
(String url, String content, String contentType, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: Text Service Description: Load text content from a URL via HTTP PUT.PutXML
(String url, Document content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) Service Category: XML Service Description: Load XML content from a URL via HTTP PUT.Methods inherited from class com.thingworx.resources.Resource
getEntityType
Methods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequest
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, AddTags, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, dispose, getAspects, GetAvatar, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetHomeMashup, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, SetDescription, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, SetTags, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies, validateConfiguration
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thingworx.types.INamedObject
getDescription, getName
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
Constructor Details
-
ContentLoader
public ContentLoader()
-
-
Method Details
-
GetCookies
@ThingworxExtensionApiMethod(since={6,6}) public String GetCookies(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Cookies
- Service Description:
- Issue a URL call and get the returned cookies back.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Cookies - STRING
- Throws:
Exception
- If an error occurs
-
Delete
@ThingworxExtensionApiMethod(since={6,6}) public void Delete(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Delete
- Service Description:
- Invoke an HTTP delete request on a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Throws:
Exception
- If an error occurs
-
GetText
@ThingworxExtensionApiMethod(since={6,6}) public String GetText(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme, Boolean appendHeader) throws Exception - Service Category:
- Text
- Service Description:
- Get text content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRINGappendHeader
- Append header in response; optional: default value is true - BOOLEAN- Returns:
- result Loaded content as text content - STRING
- Throws:
Exception
- If an error occurs
-
GetXML
@ThingworxExtensionApiMethod(since={6,6}) public Document GetXML(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- XML
- Service Description:
- Get XML content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as text content - XML
- Throws:
Exception
- If an error occurs
-
GetJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetJSON(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- JSON
- Service Description:
- Get json content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as text content - JSON
- Throws:
Exception
- If an error occurs
-
LoadXML
@ThingworxExtensionApiMethod(since={6,6}) public Document LoadXML(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- XML
- Service Description:
- Load XML Content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as XML document - XML
- Throws:
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 String LoadText(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme, Boolean appendHeader) throws Exception - Service Category:
- Text
- Service Description:
- Load text content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRINGappendHeader
- Append header in response; optional: default value is true - BOOLEAN- Returns:
- result Loaded content as text content - STRING
- Throws:
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(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Image
- Service Description:
- Load image content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as an image primitive - IMAGE
- Throws:
Exception
- If an error occurs
-
LoadBinary
@ThingworxExtensionApiMethod(since={6,6}) public byte[] LoadBinary(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Binary
- Service Description:
- Load binary content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as an blob/binary primitive - BLOB
- Throws:
Exception
- If an error occurs
-
LoadJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject LoadJSON(String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- JSON
- Service Description:
- Load JSON content from a URL.
- Parameters:
url
- URL to load - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as a JSON Object - JSON
- Throws:
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 String PostText(String url, String content, String contentType, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Text
- Service Description:
- Load text content from a URL via HTTP POST.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as string - STRINGcontentType
- Posted content type as string - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as string - STRING
- Throws:
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(String url, String repository, String pathOnRepository, Object partsToSend, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Parameters:
url
- URL to load - STRINGrepository
- Repository to get file from to upload - STRINGpathOnRepository
- Path on repository to file - STRINGpartsToSend
- Infotable where each field is a part to send - INFOTABLEusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Throws:
Exception
- If an error occurs
-
PostMultipart
@ThingworxExtensionApiMethod(since={9,4,4}) public org.json.JSONObject PostMultipart(String url, String repository, String pathOnRepository, Object partsToSend, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme, Boolean useUTF8Encoding) throws Exception - Service Category:
- Multipart
- Service Description:
- Multipart data upload from Thingworx to and external target via HTTP POST.
- Parameters:
url
- URL to load - STRINGrepository
- Repository to get file from to upload - STRINGpathOnRepository
- Path on repository to file - STRINGpartsToSend
- Infotable where each field is a part to send - INFOTABLEusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRINGuseUTF8Encoding
- Supports with UTF8 characters - BOOLEAN- Returns:
- result Response as JSON Object - JSON
- Throws:
Exception
- If an error occurs
-
PostImage
@ThingworxExtensionApiMethod(since={6,6}) public byte[] PostImage(String url, byte[] content, String mimeType, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Image
- Service Description:
- Load Image content from a URL via HTTP POST.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as image - IMAGEmimeType
- Mime Type - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as BLOB Object - BLOB
- Throws:
Exception
- If an error occurs
-
PostBinary
@ThingworxExtensionApiMethod(since={6,6}) public byte[] PostBinary(String url, byte[] content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Binary
- Service Description:
- Load binary content from a URL via HTTP POST.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as image - BLOBusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as BLOB Object - BLOB
- Throws:
Exception
- If an error occurs
-
PostJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject PostJSON(String url, org.json.JSONObject content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- JSON
- Service Description:
- Load JSON content from a URL via HTTP POST.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as JSON object - JSONusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as JSON Object - JSON
- Throws:
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 Document PostXML(String url, Document content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- XML
- Service Description:
- Load XML content from a URL via HTTP POST.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as XML document. The xml content must start with an xml declaration, ie <?xml version="1.0" encoding="UTF-8"?> - XMLusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as XML document - XML
- Throws:
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(String url, org.json.JSONObject content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- JSON
- Service Description:
- Load JSON content from a URL via HTTP PUT.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as JSON object - JSONusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as JSON Object - JSON
- Throws:
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(String url, byte[] content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Binary
- Service Description:
- Load binary content from a URL via HTTP PUT.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as image - BLOBusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as BLOB Object - BLOB
- Throws:
Exception
- If an error occurs
-
PutText
@ThingworxExtensionApiMethod(since={6,6}) public String PutText(String url, String content, String contentType, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- Text
- Service Description:
- Load text content from a URL via HTTP PUT.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as string - STRINGcontentType
- Posted content type as string - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as a string - STRING
- Throws:
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 Document PutXML(String url, Document content, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Boolean withCookies, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws Exception - Service Category:
- XML
- Service Description:
- Load XML content from a URL via HTTP PUT.
- Parameters:
url
- URL to load - STRINGcontent
- Posted content as XML document - XMLusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANwithCookies
- Include cookies in response - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as XML document - XML
- Throws:
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 String LoadMediaEntity(String name, String description, TagCollection tags, String url, String username, String password, org.json.JSONObject headers, Boolean ignoreSSLErrors, Double timeout, Boolean useNTLM, String workstation, String domain, Boolean useProxy, String proxyHost, Integer proxyPort, String proxyScheme) throws 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 - STRINGdescription
- Description for the media entity to save - STRINGtags
- Tags for the media entity to save - TAGSurl
- URL to load an image - STRINGusername
- Optional user name credential - STRINGpassword
- Optional password credential - STRINGheaders
- Optional HTTP headers - JSONignoreSSLErrors
- Ignore SSL Certificate Errors - BOOLEANtimeout
- Optional timeout in seconds - NUMBERuseNTLM
- Use NTLM Authentication - BOOLEANworkstation
- Auth workstation - STRINGdomain
- Auth domain - STRINGuseProxy
- Use Proxy server - BOOLEANproxyHost
- Proxy host - STRINGproxyPort
- Proxy port - INTEGERproxyScheme
- Proxy scheme - STRING- Returns:
- result Loaded content as image - IMAGELINK
- Throws:
Exception
- If an error occurs
-