Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 38 additions & 25 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,36 @@
```mermaid
classDiagram
class RapidataClient {
+RapidataOrderManager order
+RapidataValidationManager validation
+RapidataJobManager job
+RapidataAudienceManager audience
+ValidationSetManager validation
+RapidataFlowManager flow
+RapidataBillingManager billing
}
class RapidataOrderManager {

class RapidataJobManager {
+RapidataFilters filter
+RapidataSettings settings
+RapidataSelections selections
+create_****_order()
+get_order_by_id()
+find_orders()
+create_****_job_definition()
+get_job_definition_by_id()
+get_job_by_id()
+find_jobs()
}

class RapidataAudienceManager {
+create_audience()
+get_audience_by_id()
+assign_job()
}
class RapidataValidationManager {

class ValidationSetManager {
+RapidsManager rapid
+create_****_set()
+get_validation_set_by_id()
+find_validation_sets()
}

class RapidataFilters {
+Country
+Language
Expand Down Expand Up @@ -50,21 +60,22 @@ classDiagram
+Capped
+Shuffling
}

class RapidsManager {
+****_rapid()
}

RapidataClient --* RapidataOrderManager
RapidataClient --* RapidataValidationManager
RapidataOrderManager --* RapidataFilters
RapidataOrderManager --* RapidataSettings
RapidataOrderManager --* RapidataSelections
RapidataValidationManager --* RapidsManager
RapidataClient --* RapidataJobManager
RapidataClient --* RapidataAudienceManager
RapidataClient --* ValidationSetManager
RapidataJobManager --* RapidataFilters
RapidataJobManager --* RapidataSettings
RapidataJobManager --* RapidataSelections
ValidationSetManager --* RapidsManager

link RapidataClient "../reference/rapidata/rapidata_client/rapidata_client/" ""
link RapidataOrderManager "../reference/rapidata/rapidata_client/order/rapidata_order_manager/" ""
link RapidataValidationManager "../reference/rapidata/rapidata_client/validation/validation_set_manager/" ""
link RapidataJobManager "../reference/rapidata/rapidata_client/job/rapidata_job_manager/" ""
link ValidationSetManager "../reference/rapidata/rapidata_client/validation/validation_set_manager/" ""
link RapidataFilters "../reference/rapidata/rapidata_client/filter/rapidata_filters/" ""
link RapidataSettings "../reference/rapidata/rapidata_client/settings/rapidata_settings/" ""
link RapidataSelections "../reference/rapidata/rapidata_client/selection/rapidata_selections/" ""
Expand All @@ -74,17 +85,19 @@ classDiagram

# Rapidata API

The Rapidata API builds on the [RapidataClient](reference/rapidata/rapidata_client/rapidata_client.md) class. This class is the entry point for all operations. The RapidataClient class has two main properties, order and validation, which are used to manage orders and validation sets respectively.
The Rapidata API builds on the [RapidataClient](reference/rapidata/rapidata_client/rapidata_client.md) class. This class is the entry point for all operations. You collect labels by creating a **job definition** with `job`, then assigning it to an **audience** — the job runs against that audience's annotators and produces results.

### Job related classes

### Order related classes
[RapidataJobManager](reference/rapidata/rapidata_client/job/rapidata_job_manager.md) - accessible through the RapidataClient(rapi) under rapi.job. Creates job definitions and looks up jobs.

[RapidataOrderManger](reference/rapidata/rapidata_client/order/rapidata_order_manager.md) - accessible through the RapidataClient(rapi) under rapi.order
[RapidataAudienceManager](reference/rapidata/rapidata_client/audience/rapidata_audience_manager.md) - accessible through the RapidataClient(rapi) under rapi.audience. Manages annotator audiences and assigns job definitions to them.

[RapidataFilters](reference/rapidata/rapidata_client/filter/rapidata_filters.md) - accessible through the RapidataClient(rapi) under rapi.order
[RapidataFilters](reference/rapidata/rapidata_client/filter/rapidata_filters.md) - accessible through the RapidataClient(rapi) under rapi.job

[RapidataSettings](reference/rapidata/rapidata_client/settings/rapidata_settings.md) - accessible through the RapidataClient(rapi) under rapi.order
[RapidataSettings](reference/rapidata/rapidata_client/settings/rapidata_settings.md) - accessible through the RapidataClient(rapi) under rapi.job

[RapidataSelections](reference/rapidata/rapidata_client/selection/rapidata_selections.md) - accessible through the RapidataClient(rapi) under rapi.order
[RapidataSelections](reference/rapidata/rapidata_client/selection/rapidata_selections.md) - accessible through the RapidataClient(rapi) under rapi.job


### Validation related classes
Expand Down
15 changes: 1 addition & 14 deletions openapi/generate-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ asset
audience
order
dataset
pipeline
identity
rapid
campaign
validation
workflow
leaderboard
flow
translation
Expand Down Expand Up @@ -104,19 +102,8 @@ npx -y @redocly/cli join ./${SCHEMA_DIR}/*.openapi.json -o ./${SCHEMA_DIR}/rapid
# latter from any `required` list). This mirrors the endpoint filtering for
# partly-deprecated surfaces like a single deprecated field on a model.
# Note: the `walk` builtin requires jq >= 1.6.
#
# The $keep list below is the one exception to the rule: these endpoints are
# deprecated backend-side but the still-live order / QR-preview flow calls them
# directly, so dropping them would leave that flow uncompilable. Keep generating
# them until that flow migrates off them too.
jq '
["/pipeline/{pipelineId}", "/workflow/{workflowId}/progress"] as $keep
| .paths |= with_entries(
.key as $path
| .value |= with_entries(
select((.value.deprecated != true) or ($keep | index($path)))
)
)
del(.paths[][] | select(.deprecated == true))
| walk(
if type == "object" then
( if (.parameters | type) == "array"
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/asset.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Asset API",
"description": "The API for the Rapidata Asset service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/audience.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Audience API",
"description": "The API for the Rapidata Audience service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/campaign.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Campaign API",
"description": "The API for the Rapidata Campaign service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/dataset.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Dataset API",
"description": "The API for the Rapidata Dataset service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/flow.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Flow API",
"description": "The API for the Rapidata Flow service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/identity.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Identity API",
"description": "The API for the Rapidata Identity service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/leaderboard.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Leaderboard API",
"description": "The API for the Rapidata Leaderboard service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/order.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Order API",
"description": "The API for the Rapidata Order service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/schemas/payment.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Rapidata Payment API",
"description": "The API for the Rapidata Payment service",
"version": "2026.08.20.1843-f4aff59"
"version": "2026.08.21.0757-4bc4250"
},
"servers": [
{
Expand Down
Loading
Loading