Sampling and Simulation
Start pipeline tap
Start a tap operation to view data as it flows through the pipeline.
POST
/
pipeline
/
{pipeline_id}
/
tap
/
{component_id}
Start pipeline tap
curl --request POST \
--url https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 10,
"timeout": 5,
"edge_id": "<string>",
"filter": "<unknown>"
}
'import requests
url = "https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}"
payload = {
"limit": 10,
"timeout": 5,
"edge_id": "<string>",
"filter": "<unknown>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 10, timeout: 5, edge_id: '<string>', filter: '<unknown>'})
};
fetch('https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 10,
'timeout' => 5,
'edge_id' => '<string>',
'filter' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}"
payload := strings.NewReader("{\n \"limit\": 10,\n \"timeout\": 5,\n \"edge_id\": \"<string>\",\n \"filter\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 10,\n \"timeout\": 5,\n \"edge_id\": \"<string>\",\n \"filter\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 10,\n \"timeout\": 5,\n \"edge_id\": \"<string>\",\n \"filter\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Enter your token in the format: Token mytokengoeshere
Path Parameters
The component whose output is to be tapped
Pattern:
^([^\.]+)(?:\.(.+))?$Body
application/json
The maximum number of events to return
Required range:
1 <= x <= 100The amount of time, in seconds, to wait for limit events to return before timing out
Required range:
1 <= x <= 20Specific edge_id instance to tap
Minimum string length:
1A group of expressions joined together by an and/or operator.
Response
200
Default Response
⌘I
Start pipeline tap
curl --request POST \
--url https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 10,
"timeout": 5,
"edge_id": "<string>",
"filter": "<unknown>"
}
'import requests
url = "https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}"
payload = {
"limit": 10,
"timeout": 5,
"edge_id": "<string>",
"filter": "<unknown>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 10, timeout: 5, edge_id: '<string>', filter: '<unknown>'})
};
fetch('https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 10,
'timeout' => 5,
'edge_id' => '<string>',
'filter' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}"
payload := strings.NewReader("{\n \"limit\": 10,\n \"timeout\": 5,\n \"edge_id\": \"<string>\",\n \"filter\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 10,\n \"timeout\": 5,\n \"edge_id\": \"<string>\",\n \"filter\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mezmo.com/v3/pipeline/{pipeline_id}/tap/{component_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 10,\n \"timeout\": 5,\n \"edge_id\": \"<string>\",\n \"filter\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body
