• Contact Us close
  • Home
  • Welcome to Alteia keyboard_arrow_right
    Getting Started keyboard_arrow_right
    Quick Guide to the Alteia Software Interface Notification Center Alteia Glossary
    Platform Administration keyboard_arrow_right
    System Requirements and Supported Browsers Account and User Roles Management Company Information Edition User Profile Edition Alteia's Terms of Use - October 2021
    Release Notes keyboard_arrow_right
    Release Note R2022.35 - August 30th, 2022 Release Note R2022.43 - October 25th, 2022 Release Note R2022.47 - November 22th, 2022
    Get Support keyboard_arrow_right
    Contact Support Platform Status
  • The Alteia Platform keyboard_arrow_right
    Fuse
    Build
    Deploy
  • Applications by Industry keyboard_arrow_right
    Worksite Management keyboard_arrow_right
    Site Settings for Mines & Aggregates Material Management Safety and High Walls Analytics Building Information Modeling (BIM) Solar Plant Thermal Inspection Change Map Advanced Stockpile Analytics and Stockpile Module Haul Roads Analytics
    Field Trial Analysis keyboard_arrow_right
    Microplot Designer Plant Height from RGB and Multispectral Plant Count and Emergence for Trial Field Scouting Maps Generic and Custom Scouting Maps Custom Composition Map Supported Crops for Trial Fields & Production Fields Row Vectorization Microplot Boundaries Adjustment Task Fraction of Vegetation Cover (FCover) Flowering Characterization Stay Green Plant Height from LiDAR Statistics for Trial Fields and Production Fields Agriculture and Forestry Analytics Description
    Mine Productivity Analysis keyboard_arrow_right
    Haul Roads Analytics Site Settings for Mines & Aggregates Material Management Safety and High Walls Analytics Change Map Advanced Stockpile Analytics and Stockpile Module
    Plantation and Forestry Management keyboard_arrow_right
    Supported Plantations and Forests Advanced Tree Analysis Tree Detection Grid Designer Tree Density Indicators Agriculture and Forestry Analytics Description
    Precision Agriculture keyboard_arrow_right
    Scouting Maps Generic and Custom Scouting Maps Custom Composition Map Field Boundaries Creation Supported Crops for Trial Fields & Production Fields Fraction of Vegetation Cover (FCover) Stay Green Statistics for Trial Fields and Production Fields Grid Designer Weed Management Plant Count for Production Field Emergence Characterization for Production Field Agriculture and Forestry Analytics Description
  • For Developers keyboard_arrow_right
    SDK and APIs keyboard_arrow_right
    SDK Introduction SDK Use Case Examples Custom Analytics Creation with CLI API Calls Using Alteia and YOLO to Train and Run Detection Models
US
FR
Contact Us
  • Home
  • Welcome to Alteia keyboard_arrow_right
    Getting Started keyboard_arrow_right
    Quick Guide to the Alteia Software Interface Notification Center Alteia Glossary
    Platform Administration keyboard_arrow_right
    System Requirements and Supported Browsers Account and User Roles Management Company Information Edition User Profile Edition Alteia's Terms of Use - October 2021
    Release Notes keyboard_arrow_right
    Release Note R2022.35 - August 30th, 2022 Release Note R2022.43 - October 25th, 2022 Release Note R2022.47 - November 22th, 2022
    Get Support keyboard_arrow_right
    Contact Support Platform Status
  • The Alteia Platform keyboard_arrow_right
    Fuse
    Build
    Deploy
  • Applications by Industry keyboard_arrow_right
    Worksite Management keyboard_arrow_right
    Site Settings for Mines & Aggregates Material Management Safety and High Walls Analytics Building Information Modeling (BIM) Solar Plant Thermal Inspection Change Map Advanced Stockpile Analytics and Stockpile Module Haul Roads Analytics
    Field Trial Analysis keyboard_arrow_right
    Microplot Designer Plant Height from RGB and Multispectral Plant Count and Emergence for Trial Field Scouting Maps Generic and Custom Scouting Maps Custom Composition Map Supported Crops for Trial Fields & Production Fields Row Vectorization Microplot Boundaries Adjustment Task Fraction of Vegetation Cover (FCover) Flowering Characterization Stay Green Plant Height from LiDAR Statistics for Trial Fields and Production Fields Agriculture and Forestry Analytics Description
    Mine Productivity Analysis keyboard_arrow_right
    Haul Roads Analytics Site Settings for Mines & Aggregates Material Management Safety and High Walls Analytics Change Map Advanced Stockpile Analytics and Stockpile Module
    Plantation and Forestry Management keyboard_arrow_right
    Supported Plantations and Forests Advanced Tree Analysis Tree Detection Grid Designer Tree Density Indicators Agriculture and Forestry Analytics Description
    Precision Agriculture keyboard_arrow_right
    Scouting Maps Generic and Custom Scouting Maps Custom Composition Map Field Boundaries Creation Supported Crops for Trial Fields & Production Fields Fraction of Vegetation Cover (FCover) Stay Green Statistics for Trial Fields and Production Fields Grid Designer Weed Management Plant Count for Production Field Emergence Characterization for Production Field Agriculture and Forestry Analytics Description
  • For Developers keyboard_arrow_right
    SDK and APIs keyboard_arrow_right
    SDK Introduction SDK Use Case Examples Custom Analytics Creation with CLI API Calls Using Alteia and YOLO to Train and Run Detection Models
  • Home
  • keyboard_arrow_right For Developers
  • keyboard_arrow_right SDK and APIs

API Calls

1. Description

Once you have completed the steps in the introduction to the Alteia SDK for Developers‍ article,‍ you're ready to use the SDK. Below is a list of the possible command lines with their intended use. For additional information on each call, see the API reference documentation.

2. List of commands

Get all the projects available

>>> projects = sdk.projects.search(limit=100)

Get the missions of a project

>>> my_project = sdk.projects.search(filter={'name': {'$eq': 'My_project'}})[0]
>>> missions = sdk.missions.search(filter={'project': {'$eq': my_project.id}})

Search for datasets related to a mission

>>> my_mission = missions[0]
>>> datasets = sdk.datasets.search(filter={'mission': {'$eq': my_mission.id}})

Explore the dataset properties

To print some properties of a dataset:

>>> my_dataset = datasets[0]
>>> print("Name: {}".format(my_dataset.name))
>>> print("Type: {}".format(my_dataset.type))
>>> print("Creation date: {}".format(my_dataset.creation_date))

Some dataset properties depend on its type (image, raster, mesh, pcl, vector, file). You can list all the available properties for a dataset with:

>>> dir(my_dataset)

To look for the files related to a dataset, you can list the dataset components:

print(my_dataset.components)

Download a dataset component

To download a dataset component in the current directory:

>>> component = my_dataset.components[0]
>>> sdk.datasets.download_component(dataset=my_dataset.id,
...                                 component=component.get("name"))


Create a new dataset

To create a new file dataset related to a project:

>>> new_dataset = sdk.datasets.create_file_dataset(name='My file dataset',
...                                                project=my_project.id)

And upload a file:

>>> file_to_upload = "/replace/with/a/file_path.ext"
>>> sdk.datasets.upload_file(dataset=new_dataset.id,
...                          component='file',
...                          file_path=file_to_upload)

Add a tag

To add a tag on the dataset created:

>>> my_tag = sdk.tags.create(name='My tag',
...                          project=my_project.id,
...                          type='dataset',
...                          target=new_dataset.id)

To delete the tag:

>>> sdk.tags.delete(my_tag.id)

Add a comment

To add a comment on this dataset:

>>> my_comment = sdk.comments.create(text='This is my first dataset',
...                                  project=my_project.id,
...                                  type='dataset',
...                                  target=new_dataset.id)

To mark all the comments of this dataset as read:

>>> sdk.comments.mark_as_read(project=my_project.id,
...                           type='dataset',
...                           target=new_dataset.id)

Add an annotation

To add an annotation to a project. For example, one whose geometry is the bounding box of the project:

>>> a = sdk.annotations.create(project=my_project.id,
...                            geometry=my_project.real_bbox,
...                            name='Project bounding box',
...                            description='Bounding box around the project')

This annotation can be deleted with:

>>> sdk.annotations.delete(a.id)


Was this article helpful?

sentiment_satisfied

Yes

sentiment_dissatisfied

No

RELATED QUESTIONS

  • Custom Analytics Creation with CLI arrow_forward
  • SDK Use Case Examples arrow_forward
  • SDK Introduction arrow_forward
  • Using Alteia and YOLO to Train and Run Detection Models arrow_forward

Was this article helpful?

sentiment_satisfied

Yes

sentiment_dissatisfied

No

RELATED QUESTIONS

  • Custom Analytics Creation with CLI arrow_forward
  • SDK Use Case Examples arrow_forward
  • SDK Introduction arrow_forward
  • Using Alteia and YOLO to Train and Run Detection Models arrow_forward

Sorry, we didn't find any relevant articles for you.

Please fill out the contact form below and we will reply as soon as possible.




Take the next step.

Request a demo or schedule a meeting to discuss your digital transformation ambitions.

Contact Us

Connect with us.

The world of Ai changes fast. Keep up to date with the Alteia platform by signing up to our newsletter :

Thank you for your message.

© 2021 Alteia. All rights reserved

LEGAL NOTICE
PRIVACY POLICY

© 2021 Alteia. All rights reserved

facebook logo
twitter logo
linkedin logo