Skip to main content
PATCH
/
physical_samples
/
{physical_sample_id}
/
annotations
/
{annotation_id}
import requests

response = requests.patch(
    "https://api.atomscale.ai/physical_samples/a1b2c3d4-5678-90ab-cdef-1234567890ab/annotations/f47ac10b-58cc-4372-a567-0e02b2c3d479",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "property_value": 26.0
    }
)
annotation = response.json()
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "physical_sample_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "property_name": "thickness",
  "property_value": 26.0,
  "property_unit": "nm",
  "char_source_type": "xrd",
  "coord_ref_frame": "sample_relative",
  "coord_units": "mm",
  "coord_x": 1.5,
  "coord_y": 2.0,
  "coord_z": null,
  "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "annotation_metadata": null,
  "last_updated": "2024-01-16T10:15:00Z",
  "version": "0.269.1"
}
Updates a spatial annotation. Only the fields you include in the body are changed.
physical_sample_id
string
required
UUID of the physical sample
annotation_id
string
required
UUID of the annotation to update
property_name
string
Name of the property being annotated
property_value
number
Value of the annotated property
property_unit
string
Unit for the property value
coord_ref_frame
string
Coordinate reference frame. One of sample_relative or stage_absolute.
coord_units
string
Units for the coordinate values
coord_x
number
X coordinate of the annotation
coord_y
number
Y coordinate of the annotation
coord_z
number
Z coordinate of the annotation
metadata
object
Arbitrary key-value metadata for the annotation

Response

id
string
Annotation UUID
physical_sample_id
string
UUID of the physical sample the annotation belongs to
property_name
string
Name of the annotated property
property_value
number
Value of the annotated property
property_unit
string
Unit for the property value, or null if not set
char_source_type
string
Characterization source type, or null if not set
coord_ref_frame
string
Coordinate reference frame. One of sample_relative or stage_absolute.
coord_units
string
Units for the coordinate values, or null if not set
coord_x
number
X coordinate of the annotation, or null if not set
coord_y
number
Y coordinate of the annotation, or null if not set
coord_z
number
Z coordinate of the annotation, or null if not set
data_id
string
UUID of the data item the annotation is derived from, or null if not set
annotation_metadata
object
Arbitrary key-value metadata, or null if not set
last_updated
string
ISO 8601 timestamp of the last update
version
string
Version string of the annotation record
import requests

response = requests.patch(
    "https://api.atomscale.ai/physical_samples/a1b2c3d4-5678-90ab-cdef-1234567890ab/annotations/f47ac10b-58cc-4372-a567-0e02b2c3d479",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "property_value": 26.0
    }
)
annotation = response.json()
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "physical_sample_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "property_name": "thickness",
  "property_value": 26.0,
  "property_unit": "nm",
  "char_source_type": "xrd",
  "coord_ref_frame": "sample_relative",
  "coord_units": "mm",
  "coord_x": 1.5,
  "coord_y": 2.0,
  "coord_z": null,
  "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "annotation_metadata": null,
  "last_updated": "2024-01-16T10:15:00Z",
  "version": "0.269.1"
}