Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Have you reviewed the Knowledge Base Article: Article - CS361442 - Publishing data to an Azure Service Bus from ThingWorx Platform
Thank you for the response, I have gone through that article, but I am not able to understand how to establish the connectivity. I have a service(on THX) that gives me JSON output coming from the content loader, GetJSON, now how do I publish that JSON data to the Azure service bus. How to establish connectivity? Is there any example available for reference?
The ThingWorx has been designed to create a REST API to the services. This will allow you to execute a REST API from outside ThingWorx and get the results of a service. As a tool to getting the parameter information correct I would recommend using POSTMAN. https://www.postman.com/
I have placed a list of the articles relating to the POSTMAN and REST API.
Which side are you looking to start the interaction? If you are starting the interaction from ThingWorx then you can use the Content Loader Functions. The POSTMAN tool is great in that it provides a easer method of reviewing the errors which may be reported if the parameters are not correct. Once you have the parameters using POSTMAN the information can then be used to create the REST API call from ThingWorx.
If you are trying to extract information from ThingWorx, I would start with using POSTMAN to make a REST API call to ThingWorx and then transfer the information into the calling application.
Let me know where you are in the process and I will try to provide a more specific example.
Regards
Peter
Hi @PEHOWE,
I don't want to use any 3rd party, I want to publish my data from Thingworx to Azure Service Bus, to do so, I am making use of content loader functions in Thingworx, but I am not aware of how to put the URLs and where to put URLs on Azure service bus topic.
Hi @PEHOWE,
I am using PutJSON, and in headers
var headers = {
"Resource group": "Resource Group Name",
"Content-Type": "application/json",
"Accept": "application/json" ,
"RootManageSharedAccessKey" : "Access Key"
};
and in url using the topic url.
For this I am getting status 400!
What I am doing wrong? What should be the header format?
@MM_9023322
The tool POSTMAN is a developer tool. It is intended to allow testing and experiment with different parameter options in an environment where access to the error messages is better.
If you are using the ThingWorx ContentLoaderFunctions you can get a list of the parameters by going to the following location in composer:
Browse -> System -> Resources -> ContentLoaderFunctions -> Services ->
For example GetJSON has the following parameters:
The above REST API will extract a JSON result from the URL/Username/Password <etc>