Hey Priya,
Good day!
Agree with @KranthiPakala-MSFT ,Those are the standard response headers and you cannot restrict them,
You can enable secure output thereby restricting access to other data in output and then pull in the required outputs based on dynamic expressions
Get Specific column via REST API output in Web Activity
Hi All,
I am leveraging Web activity to trigger REST API and get its details :
https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties?tabs=azure-ad
Now this is expected response for web activity output :
I want the web activity output to have only specific values rather than entire output like I need only highlighted columns to be returned
so how to provide specific list
Azure Synapse Analytics
Azure Data Factory
-
Nandan Hegde 35,831 Reputation points MVP Volunteer Moderator
2023-04-20T08:23:40.61+00:00
1 additional answer
Sort by: Most helpful
-
KranthiPakala-MSFT 46,642 Reputation points Microsoft Employee Moderator
2023-04-20T06:07:55.9733333+00:00 @Priya Jha Thanks for using Microsoft Q&A forum and posting your query.
Those are the standard response headers and you cannot restrict them, but you can access only the specific response headers using dynamic expression as shown below. Please note below is an example but you can leverage similar implementations as per your need.
Dynamic expressions to access those specific headers:
@activity('Web1').output.ADFWebActivityResponseHeaders['x-ms-lease-status'] @activity('Web1').output.ADFWebActivityResponseHeaders['x-ms-lease-state'] @activity('Web1').output.ADFWebActivityResponseHeaders['x-ms-blob-type'] @activity('Web1').output.ADFWebActivityResponseHeaders['Date'] @activity('Web1').output.ADFWebActivityResponseHeaders['Content-Type']
{ "name": "pipeline13", "properties": { "activities": [ { "name": "Web1", "type": "WebActivity", "dependsOn": [], "policy": { "timeout": "0.12:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": false, "secureInput": false }, "userProperties": [], "typeProperties": { "url": "https://sharedblob.blob.core.windows.net/test/A.csv", "method": "GET", "headers": { "Authorization": "Bearer eyJ0eXcxxxxxxxxxxxxxxxxxxxxxxxxxx", "x-ms-version": "2022-11-02" "additionalHeaders": "x-ms-blob-type,x-ms-lease-status,x-ms-lease-state,Content-Type,Date" } } }, { "name": "Set variable1", "type": "SetVariable", "dependsOn": [ { "activity": "Web1", "dependencyConditions": [ "Succeeded" ] } ], "userProperties": [], "typeProperties": { "variableName": "var_ResponseHeaders", "value": { "value": "@concat(activity('Web1').output.ADFWebActivityResponseHeaders['x-ms-lease-status'], ' + ' ,activity('Web1').output.ADFWebActivityResponseHeaders['x-ms-lease-state'], ' + ' ,activity('Web1').output.ADFWebActivityResponseHeaders['x-ms-blob-type'], ' + ' ,activity('Web1').output.ADFWebActivityResponseHeaders['Date'], ' + ' ,activity('Web1').output.ADFWebActivityResponseHeaders['Content-Type'])", "type": "Expression" } } } ], "variables": { "var_ResponseHeaders": { "type": "String" } }, "annotations": [] } }
Hope this info helps.
Please don’t forget to
Accept Answer
andYes
for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.