Overview & data types
A GraphQL API is very similar to a REST API however it provides a few great advantages for API consumers…
- Everything is Typed: Both the request query and the response are strongly typed. That means you’ll know your sending a valid query because the schema allows it.
- Flexibility to pull needed data: Relationships between types are represented through the GraphQL graph allowing for complex data retrieval in a single request.
- Easy exploration and strong tooling: Since everything is typed and built for powerful queries tools like our GraphQL explorer (https://app.labelbox.com/explorer) can be built to discover api requests and understand the API schema.
The Labelbox GraphQL has two major types of requests:
Query: getting data
Mutation: changing data
Both of these can be simply processed through our API Explorer or by interfacing through our API endpoint.
Labelbox Core Data Types
A Project is a container that includes a labeling frontend, an ontology, datasets and labels.
A dataset is a collection of DataRows. For example, if you have a CSV with 100 rows, you will have 1 Dataset and 100 DataRows.
A DataRow represents a single piece of data. For example, if you have a CSV with 100 rows, you will have 1 Dataset and 100 DataRows, learn more.
Label represents an assessment on a DataRow. For example one label could contain 100 bounding boxes (annotations), learn more.
A prediction model represents a specific version of a model, learn more.
A prediction is a label made by a prediction model. Predictions can be used as a base labels to decrease labeling time, learn more.
AssetMetadata is a datatype to provide extra context about an asset while labeling, learn more.