Whenever the pipeline deployed, Pipeline API is instantly created and can be used to generate predictions out of the platform.
1) Create Pipeline
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F22516e96-15a3-4168-b2df-0231cc1b303c%2FScreenshot_2021-03-02_at_13.40.56.png?table=block&id=40051226-2eee-402f-b480-143224a9f7c5&cache=v2)
2) Deploy Pipeline
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F0021e5eb-6c93-4e29-a598-fee43f95e252%2FScreenshot_2021-03-02_at_13.36.40.png?table=block&id=5b332f6f-d3d1-42bf-9376-3643f603810d&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F3f5b8965-d4f5-4f50-939e-4a3784cfc2c7%2FScreenshot_2021-03-02_at_13.42.11.png?table=block&id=86529041-3750-485d-a678-b4f67058c433&cache=v2)
3) Go to Deployments and click to Copy api url button
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fbe08ee6f-6727-4f3b-afa8-748dfd590c15%2FScreenshot_2021-03-02_at_13.44.44.png?table=block&id=a2251816-a29f-40d6-bbd5-2f30b2d3742f&cache=v2)
You will get a URL with such structure:
https://api.testing.datrics.ai/api/v1/deploymentsV3/trigger?deploymentUuid={pipeline-id}&apiKey={yourApiKey}
4) Make a POST request to trigger pipeline deployment
With this URL you need to make a POST request with or without data. It depends if your pipeline has an API Input brick.
The body of the request must have a
apiInputData
parameter. Example of request body:{ "apiInputData": [ { "Survived": true, "Pclass": 1, "Age": 23.5, "Fare": 80, "is_male": true, "is_child": false }, { "Survived": false, "Pclass": 2, "Age": 2.4, "Fare": 80, "is_male": true, "is_child": true } ] }
As a result of the API request, you will receive
deploymentTaskUuid
. Example:{ "deploymentTaskUuid": "7014126a-d2ff-4bfd-8e87-0d65e87639c8" }
5) Get status of triggered pipeline
To get statusyou need to make GET request to the URL with such structure:
https://api.testing.datrics.ai/api/v1/deploymentsV3/status?deploymentTaskUuid={deploymentTaskUuid}&apiKey={yourApiKey}
6) Get result of triggered pipeline
To get result you need to make GET request to the URL with such structure:
https://api.testing.datrics.ai/api/v1/deploymentsV3/result?deploymentTaskUuid={deploymentTaskUuid}&type={json|csv}&apiKey={yourApiKey}
6) API Keys