Forum Discussion
Passing the Parameter while calling the Data Pipeline using REST API
Hello Readers,
I am trying to trigger the REST API to trigger an on-demand job on my datapipeline:
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/dataPipelines/{pipelineId}/jobs/execute/instances
Body/Payload:
Error:
Status Code: 403 Forbidden
Error Message:
My question : Why we can't pass the parameter while calling the datapipeline and is there another I can do this like using Power Automate or Logic apps?
Hi 12_shashank,
The body needs to contain an executionData element.
Also ensure that your jobType is Pipeline.
POST
https://api.fabric.microsoft.com/v1/workspaces/{WorkspaceID}/items/{ItemID}/jobs/Pipeline/instances
{ "executionData": { "parameters": { "config_file": "excess" } } }I have tested this and it is functional.
Here is the body I used:
{ "executionData": { "parameters": { "Subject": "Test", "Body": "This is a test" } } }and in the service here is the pipeline run with those parameters:
8 Replies
- tayloramy
Super User
Hi 12_shashank,
THe DataPipeline specific API doesn't mention anything about supporting parameters in the documentation, but the job scheduler API does.
Job Scheduler - Run On Demand Item Job - REST API (Core) | Microsoft Learn
Try using the job scheduler API to trigger the data pipeline instead.
- v-aatheeque
Community Support
Hi 12_shashank
Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.
- v-aatheeque
Community Support
Hi 12_shashank
We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.
Hi v-aatheeque ,
This error still persists:
POST:{
"parameters": [
{
"name": "config_file",
"value": "excess",
"type": "Text"
}
]
}
Error:{
"requestId": "d319018e-2bdd-46c7-8175-20268e2f69c5",
"errorCode": "FeatureNotAvailable",
"message": "Parameter is not allowed for this item type or this item job type",
"isRetriable": false
}
- 12_shashankNew Member
Hi v-aatheeque/ tayloramy ,
This will not work :
POST: https://api.fabric.microsoft.com/v1/workspaces/6220e1dd-8a9a-47dd-88f7-f6c5d0fa811c/items/18af0a8c-c663-4315-90c0-cf0426de9084/jobs/Execute/instances
body:{
"parameters": [
{
"name": "config_file",
"value": "excess",
"type": "Text"
}
]
}
Error:{"requestId": "d319018e-2bdd-46c7-8175-20268e2f69c5",
"errorCode": "FeatureNotAvailable",
"message": "Parameter is not allowed for this item type or this item job type",
"isRetriable": false
}
- 12_shashankNew Member
Hi v-aatheeque ,
This problem still persists:
POST : https://api.fabric.microsoft.com/v1/workspaces/6220e1dd-8a9a-47dd-88f7-f6c5d0fa811c/items/18af0a8c-c663-4315-90c0-cf0426de9084/jobs/Execute/instances
body: {"parameters": [{
"name": "config_file",
"value": "excess",
"type": "Text"
}
]
}
Error:{
"requestId": "d319018e-2bdd-46c7-8175-20268e2f69c5",
"errorCode": "FeatureNotAvailable",
"message": "Parameter is not allowed for this item type or this item job type",
"isRetriable": false
}
Hi 12_shashank,
The body needs to contain an executionData element.
Also ensure that your jobType is Pipeline.
POST
https://api.fabric.microsoft.com/v1/workspaces/{WorkspaceID}/items/{ItemID}/jobs/Pipeline/instances
{ "executionData": { "parameters": { "config_file": "excess" } } }I have tested this and it is functional.
Here is the body I used:
{ "executionData": { "parameters": { "Subject": "Test", "Body": "This is a test" } } }and in the service here is the pipeline run with those parameters:
It did work tayloramy. Thank You!!😀