'MLFlow Webhook calling Azure DevOps pipeline - retrieve body

I am using the MLFlow Webhooks , mentioned here. I am using that to queue an Azure Devops Pipeline.

However, I can't seem to to find a way to retrieve the payload variables inside my pipeline.

E.g. during transition of models, according to the document, such a payload is passed

POST
/your/endpoint/for/event/model-versions/stage-transition
--data {
  "event": "MODEL_VERSION_TRANSITIONED_STAGE",
  "webhook_id": "c5596721253c4b429368cf6f4341b88a",
  "event_timestamp": 1589859029343,
  "model_name": "Airline_Delay_SparkML",
  "version": "8",
  "to_stage": "Production",
  "from_stage": "None",
  "text": "Registered model 'someModel' version 8 transitioned from None to Production."
}

My webhook is created like this:

mlflow_webhook_triggerDevOps={
  "events": ["TRANSITION_REQUEST_CREATED", "REGISTERED_MODEL_CREATED"],
  "description": "Integration with Azure DevOps",
  "status": "ACTIVE",
  "http_url_spec": {
                    "url": "https://dev.azure.com/orgname/ProjectName/_apis/build/builds?definitionId=742&api-version=6.0",
                    "authorization": "Basic " + base64_message
                    }
 }

mlflow_createwebhook=requests.post('https://databricksurl/api/2.0/mlflow/registry-webhooks/create', headers=header, proxies=proxies, json=mlflow_webhook_body)

How do I then retrieve the payload variable e.g. model_name, inside my pipeline definition in Azure Devops?.

I looked at this post, but I can't seem to see any payload information (like mentioned above) under the Network-payload tab (or I am not using properly).

Right now, I can trigger the pipeline, but can't seem to find a way to retrieve the payload.

Is it possible? Am I missing something?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source