Skip to main content
POST
/
physical_samples
/
{physical_sample_id}
/
annotations
/
bulk
import requests

response = requests.post(
    "https://api.atomscale.ai/physical_samples/a1b2c3d4-5678-90ab-cdef-1234567890ab/annotations/bulk",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "annotations": [
            {
                "property_name": "thickness",
                "property_value": 25.1,
                "coord_ref_frame": "sample_relative",
                "coord_units": "mm",
                "coord_x": 1.5,
                "coord_y": 2.0
            },
            {
                "property_name": "thickness",
                "property_value": 24.8,
                "coord_ref_frame": "sample_relative",
                "coord_units": "mm",
                "coord_x": 3.0,
                "coord_y": 2.0
            }
        ]
    }
)
annotations = response.json()
[
  {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "physical_sample_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "property_name": "thickness",
    "property_value": 25.1,
    "property_unit": null,
    "char_source_type": null,
    "coord_ref_frame": "sample_relative",
    "coord_units": "mm",
    "coord_x": 1.5,
    "coord_y": 2.0,
    "coord_z": null,
    "data_id": null,
    "annotation_metadata": null,
    "last_updated": "2024-01-16T09:30:00Z",
    "version": "0.269.1"
  }
]
Creates several spatial annotations on a physical sample in a single request. Send the annotations as an array in the request body.
physical_sample_id
string
required
UUID of the physical sample
annotations
array
required
Array of annotations to create. Each item has the same shape as the body of a single annotation create request.

Response

Returns an array of the created spatial annotation objects.
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.post(
    "https://api.atomscale.ai/physical_samples/a1b2c3d4-5678-90ab-cdef-1234567890ab/annotations/bulk",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "annotations": [
            {
                "property_name": "thickness",
                "property_value": 25.1,
                "coord_ref_frame": "sample_relative",
                "coord_units": "mm",
                "coord_x": 1.5,
                "coord_y": 2.0
            },
            {
                "property_name": "thickness",
                "property_value": 24.8,
                "coord_ref_frame": "sample_relative",
                "coord_units": "mm",
                "coord_x": 3.0,
                "coord_y": 2.0
            }
        ]
    }
)
annotations = response.json()
[
  {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "physical_sample_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "property_name": "thickness",
    "property_value": 25.1,
    "property_unit": null,
    "char_source_type": null,
    "coord_ref_frame": "sample_relative",
    "coord_units": "mm",
    "coord_x": 1.5,
    "coord_y": 2.0,
    "coord_z": null,
    "data_id": null,
    "annotation_metadata": null,
    "last_updated": "2024-01-16T09:30:00Z",
    "version": "0.269.1"
  }
]