Update a scanner
type and location_id cannot change. A change to prompt, config or model increments version; re-sending the same values does not. A model of the other provider than the client's key gets 422 model_provider_mismatch. Re-enabling sweeps from now on.
curl -X PATCH "https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/scanners/123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "John Doe",
"prompt": "example_string",
"config": {},
"filters": {},
"sampling_rate": 3.14,
"model": "example_string",
"monthly_scan_limit": 42,
"enabled": true
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/scanners/123e4567-e89b-12d3-a456-426614174000"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "John Doe",
"prompt": "example_string",
"config": {},
"filters": {},
"sampling_rate": 3.14,
"model": "example_string",
"monthly_scan_limit": 42,
"enabled": true
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/scanners/123e4567-e89b-12d3-a456-426614174000", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "John Doe",
"prompt": "example_string",
"config": {},
"filters": {},
"sampling_rate": 3.14,
"model": "example_string",
"monthly_scan_limit": 42,
"enabled": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "John Doe",
"prompt": "example_string",
"config": {},
"filters": {},
"sampling_rate": 3.14,
"model": "example_string",
"monthly_scan_limit": 42,
"enabled": true
}`)
req, err := http.NewRequest("PATCH", "https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/scanners/123e4567-e89b-12d3-a456-426614174000", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/scanners/123e4567-e89b-12d3-a456-426614174000')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "John Doe",
"prompt": "example_string",
"config": {},
"filters": {},
"sampling_rate": 3.14,
"model": "example_string",
"monthly_scan_limit": 42,
"enabled": true
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"location_id": "example_string",
"name": "John Doe",
"type": "monitor",
"prompt": "example_string",
"config": {},
"filters": {},
"sampling_rate": 3.14,
"model": "example_string",
"monthly_scan_limit": 42,
"enabled": true,
"version": 42,
"last_swept_at": "2024-12-25T10:00:00Z",
"last_error": "example_string",
"created_at": "2024-12-25T10:00:00Z",
"updated_at": "2024-12-25T10:00:00Z"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
/client/v1/replay-vision/scanners/{id}Target server for requests. Edit to use your own host.
Agency key (ak_) only; a location secret key (sk_) gets 403 agency_required. Agency-wide scoped keys (mcp_) need replay_vision:read or replay_vision:write.
ak_) only; a location secret key (sk_) gets 403 agency_required. Agency-wide scoped keys (mcp_) need replay_vision:read or replay_vision:write.The media type of the request body
The question. Required except for summarizer, where it is optional context.
monitor {allow_inconclusive}; classifier {tags (2-30, lowercase), multiple, freeform}; scorer {min, max, label}; summarizer {length: short|medium|long}.
Sweep filters: device_type, utm_source, utm_medium, utm_campaign, landing_page, country, browser, os (exact strings) and min_duration_s.
Model id of the key's provider. Null uses the key's default_model.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) only; a location secret key (sk_) gets 403 agency_required. Agency-wide scoped keys (mcp_) need replay_vision:read or replay_vision:write.
Path Parameters
Body
The question. Required except for summarizer, where it is optional context.
monitor \\{allow_inconclusive\\}; classifier \\{tags (2-30, lowercase), multiple, freeform\\}; scorer \\{min, max, label\\}; summarizer \\{length: short|medium|long\\}.
Sweep filters: device_type, utm_source, utm_medium, utm_campaign, landing_page, country, browser, os (exact strings) and min_duration_s.
Model id of the key's provider. Null uses the key's default_model.