Skip to main content
POST
/
target-materials
/
layers
/
curl -X POST "https://api.atomscale.ai/target-materials/layers/" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "layer_id": 1,
    "sample_id": 42,
    "composition_string": "BaTiO3",
    "orientation": "001"
  }'
{
  "id": 100,
  "layer_id": 1,
  "sample_id": 42,
  "composition_string": "BaTiO3",
  "element_dict": { "Ba": 1, "Ti": 1, "O": 3 },
  "orientation": "001",
  "space_group": "P4mm",
  "mp_id": "mp-5020"
}
Adds one layer to a target material’s stack. The layer_id sets the layer position, and sample_id links the layer to its parent target material.
layer_id
integer
required
Layer position within the stack
sample_id
integer
ID of the parent target material
composition_string
string
Chemical composition of the layer (e.g., BaTiO3)
element_dict
object
Element counts or fractions that make up the layer
orientation
string
Crystallographic orientation of the layer
space_group
string
Space group of the layer
mp_id
string
Materials Project ID for the layer material
id
integer
Explicit record ID for the layer

Response

id
integer
Layer record ID
layer_id
integer
Layer position within the stack
sample_id
integer
ID of the parent target material
composition_string
string
Chemical composition of the layer
element_dict
object
Element counts or fractions that make up the layer
orientation
string
Crystallographic orientation of the layer
space_group
string
Space group of the layer
mp_id
string
Materials Project ID for the layer material
curl -X POST "https://api.atomscale.ai/target-materials/layers/" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "layer_id": 1,
    "sample_id": 42,
    "composition_string": "BaTiO3",
    "orientation": "001"
  }'
{
  "id": 100,
  "layer_id": 1,
  "sample_id": 42,
  "composition_string": "BaTiO3",
  "element_dict": { "Ba": 1, "Ti": 1, "O": 3 },
  "orientation": "001",
  "space_group": "P4mm",
  "mp_id": "mp-5020"
}