There are situations when you need to get a single item value from JSON/XML after you make an HTTP request. It can later be used in further HTTP requests or simply used in other SSIS tasks/components. To get that value, simply do the following:
- Configure SSIS REST API Task HTTP request in Request Settings tab.
- Press Test Request/Response button to get a sample response. Suppose the response has this JSON body: { "data": { "animal": "dog" } } and you want to get "dog" text.
- Go to Response Settings and configure as illustrated in the image below.
This will assign value "dog" to your variable "MyProperty".
Process for XML is very similar. Just select XML as Response content type and instead of JSONPath (JPath) for filter expression, use XPath. For more information about how to do it check SSIS – Extract single XML node using XPath from SOAP response article.
Contact Us
If you have more question(s) feel free to contact us via Live chat or email to support@zappysys.com
Comments
0 comments
Please sign in to leave a comment.