JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const response = await client.workflows.events.ingest({ eventType: 'x' });
console.log(response.eventId);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
response = client.workflows.events.ingest(
event_type="x",
)
print(response.event_id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Workflows.Events.Ingest(context.TODO(), mobileruncloud.WorkflowEventIngestParams{
EventType: "x",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.EventID)
}mobilerun-cloud workflows:events ingest \
--api-key 'My API Key' \
--event-type xcurl --request POST \
--url https://api.mobilerun.ai/events/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventType": "<string>",
"deviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payload": {}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/events/ingest",
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([
'eventType' => '<string>',
'deviceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payload' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.mobilerun.ai/events/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventType\": \"<string>\",\n \"deviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/events/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventType\": \"<string>\",\n \"deviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payload\": {}\n}"
response = http.request(request)
puts response.read_body{
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>"
}Events
Ingest an event
Ingest an event for trigger evaluation. Returns immediately with 202 Accepted.
POST
/
events
/
ingest
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const response = await client.workflows.events.ingest({ eventType: 'x' });
console.log(response.eventId);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
response = client.workflows.events.ingest(
event_type="x",
)
print(response.event_id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Workflows.Events.Ingest(context.TODO(), mobileruncloud.WorkflowEventIngestParams{
EventType: "x",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.EventID)
}mobilerun-cloud workflows:events ingest \
--api-key 'My API Key' \
--event-type xcurl --request POST \
--url https://api.mobilerun.ai/events/ingest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"eventType": "<string>",
"deviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payload": {}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/events/ingest",
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([
'eventType' => '<string>',
'deviceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payload' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.mobilerun.ai/events/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"eventType\": \"<string>\",\n \"deviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/events/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventType\": \"<string>\",\n \"deviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payload\": {}\n}"
response = http.request(request)
puts response.read_body{
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>"
}Was this page helpful?
⌘I