PATCH /ambassadors/probes/{id}/
Retrieve or update a probe that the user is an ambassador of. Retrieval takes ambassadors.get_ambassador_probe_info; updating takes ambassadors.change_ambassador_probe. The two grants are independent, so a read-only key stays read-only. state is restricted on writes, for session and key alike — see AmbassadorProbeWriteSerializer. Every other field is as writable by a key as it is from the UI, including email, which triggers the host's initial email. PATCH is the verb to use: comment and state are both required, so a PUT missing either is a 400.
PATCH /ambassadors/probes/{id}/ — id
The unique ambassadorship ID. This identifies the record linking an ambassador to a probe they handed out -- it is not the probe ID.
PATCH /ambassadors/probes/{id}/ — include
Include additional fields named in comma-separated values in response as nested JSON objects.
PATCH /api/v2/ambassadors/probes/{id}/
Retrieve or update a probe that the user is an ambassador of.
Retrieval takes ambassadors.get_ambassador_probe_info; updating takes ambassadors.change_ambassador_probe. The two grants are independent, so a read-only key stays read-only.
state is restricted on writes, for session and key alike — see AmbassadorProbeWriteSerializer. Every other field is as writable by a key as it is from the UI, including email, which triggers the host's initial email. PATCH is the verb to use: comment and state are both required, so a PUT missing either is a 400.
Try it out
Playground
Authorization
Variables
Key
Value
Body
Authorizations
api-key
Type
API Key (header: Authorization)
or
session
Type
API Key (cookie: atlasess)
Parameters
Path Parameters
id*
The unique ambassadorship ID. This identifies the record linking an ambassador to a probe they handed out -- it is not the probe ID.
Type
Requiredinteger
Query Parameters
include
Include additional fields named in comma-separated values in response as nested JSON objects.
Type
string
Valid values
"probe"Request Body
Request Body
AmbassadorProbeListSerializer with state restricted to what an
ambassador is actually entitled to set.
Used for every write to the detail view — session and API key alike. The
model field allows all eleven states, and the rest are not the
ambassador's to set:
RESET(0) is described in signals.py as dev-only, and nothing enforced
that. It wipes the host email/name and every date, re-saves the row as
WITH_AMBASSADOR and detachesprobe.prb_user. This is the one the
restriction is really for.APPLIED,HOSTED,ONLINEandWITH_AMBASSADORare driven by the
sync task and the application flow.
Three things are allowed, and the last two are why this is a
validate_state rather than a narrower choice list:
- The five AMBASSADOR_STATES. That tuple has been on the model since it
was written with no reader anywhere; it is the intent, just never
enforced. - HANDED_OUT — handing a probe to someone is the ambassador action, and
AMBASSADOR_STATES simply omits it. The hand-out dialog posts it
directly. - Re-sending the state the row is already in. The edit dialog seeds its
form from the current row and postsstateback on every save, so
editing a comment on a HOSTED probe re-submits HOSTED. That is a no-op,
and refusing it would break commenting on any probe outside the list
above.
Reads keep the model's full choice list, so a row parked in any state
still serialises normally — only setting one is restricted.
Collapse
mac
string
Max Length
64event_year
integer
Maximum
2147483647Minimum
-2147483648event_extra
string
Max Length
100event
string
Max Length
240email
string
Format
"email"Max Length
128name
string
Max Length
240with_date
string
Format
"date"hand_date
string
Format
"date"appl_date
string
Format
"date"host_date
string
Format
"date"woff_date
string
Format
"date"refurbish_date
string
Format
"date"comment
string
date_initial_sent
string
Format
"date-time"state
integer
0- Reset1- Given to ambassador2- Handed out3- Applied5- Hosted4- Online, not hosted6- Written off10- Returned7- Refurbished8- Lost in transit9- Broken
Valid values
012354610789Responses
Responses
application/json
object
AmbassadorProbeListSerializer with state restricted to what an
ambassador is actually entitled to set.
Used for every write to the detail view — session and API key alike. The
model field allows all eleven states, and the rest are not the
ambassador's to set:
RESET(0) is described in signals.py as dev-only, and nothing enforced
that. It wipes the host email/name and every date, re-saves the row as
WITH_AMBASSADOR and detachesprobe.prb_user. This is the one the
restriction is really for.APPLIED,HOSTED,ONLINEandWITH_AMBASSADORare driven by the
sync task and the application flow.
Three things are allowed, and the last two are why this is a
validate_state rather than a narrower choice list:
- The five AMBASSADOR_STATES. That tuple has been on the model since it
was written with no reader anywhere; it is the intent, just never
enforced. - HANDED_OUT — handing a probe to someone is the ambassador action, and
AMBASSADOR_STATES simply omits it. The hand-out dialog posts it
directly. - Re-sending the state the row is already in. The edit dialog seeds its
form from the current row and postsstateback on every save, so
editing a comment on a HOSTED probe re-submits HOSTED. That is a no-op,
and refusing it would break commenting on any probe outside the list
above.
Reads keep the model's full choice list, so a row parked in any state
still serialises normally — only setting one is restricted.
Collapse
pk
integer
Required
user
integer
Required
mac
string
Required
Max Length
64probe_id
integer
Required
The unique identifier of this probe.
event_year
integer
Maximum
2147483647Minimum
-2147483648event_extra
string
Max Length
100event
string
Required
Max Length
240email
string
Format
"email"Max Length
128email_probe_host
string
Required
name
string
Max Length
240with_date
string
Format
"date"hand_date
string
Format
"date"appl_date
string
Format
"date"host_date
string
Format
"date"woff_date
string
Format
"date"refurbish_date
string
Format
"date"comment
string
Required
date_initial_sent
string
Format
"date-time"state
integer
Required
0- Reset1- Given to ambassador2- Handed out3- Applied5- Hosted4- Online, not hosted6- Written off10- Returned7- Refurbished8- Lost in transit9- Broken
Valid values
012354610789