From 186d8c757979f79cecc80b6d73934db97de4311d Mon Sep 17 00:00:00 2001 From: Rudolf the Rabbit Date: Tue, 29 Sep 2026 11:45:08 +0000 Subject: [PATCH 1/2] chore: update OpenAPI client to 2026.09.29.1117-e0b6f6d --- openapi/schemas/asset.openapi.json | 2 +- openapi/schemas/audience.openapi.json | 32 +- openapi/schemas/campaign.openapi.json | 274 +----- openapi/schemas/dataset.openapi.json | 2 +- openapi/schemas/flow.openapi.json | 2 +- openapi/schemas/identity.openapi.json | 2 +- openapi/schemas/leaderboard.openapi.json | 340 ++++++- openapi/schemas/order.openapi.json | 26 +- openapi/schemas/payment.openapi.json | 2 +- openapi/schemas/rapid.openapi.json | 47 +- .../schemas/rapidata.filtered.openapi.json | 737 +++++++++----- openapi/schemas/rapidata.openapi.json | 930 +++++++++++------- openapi/schemas/signal.openapi.json | 2 +- openapi/schemas/translation.openapi.json | 2 +- openapi/schemas/validation.openapi.json | 2 +- src/rapidata/api_client/api/audience_api.py | 255 +++++ src/rapidata/api_client/api/benchmark_api.py | 168 ++++ src/rapidata/api_client/api/campaign_api.py | 255 +++++ src/rapidata/api_client/api/experiment_api.py | 6 +- src/rapidata/api_client/api/job_api.py | 18 + src/rapidata/api_client/api/rapid_api.py | 255 +++++ src/rapidata/api_client/configuration.py | 2 +- .../create_experiment_endpoint_input.py | 19 +- src/rapidata/api_client/models/experiment.py | 16 +- .../get_benchmark_by_id_endpoint_output.py | 9 +- ...ampaign_filter_campaign_cooldown_filter.py | 13 +- .../i_referee_info_naive_referee_info.py | 16 +- .../query_benchmarks_endpoint_output.py | 9 +- ...uery_managed_benchmarks_endpoint_output.py | 9 +- ...ry_published_benchmarks_endpoint_output.py | 9 +- .../models/update_benchmark_endpoint_input.py | 12 +- .../update_experiment_endpoint_input.py | 8 +- src/rapidata/api_client_README.md | 13 +- 33 files changed, 2598 insertions(+), 896 deletions(-) diff --git a/openapi/schemas/asset.openapi.json b/openapi/schemas/asset.openapi.json index f20cf5d9c6..e5494c9bef 100644 --- a/openapi/schemas/asset.openapi.json +++ b/openapi/schemas/asset.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Asset API", "description": "The API for the Rapidata Asset service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/audience.openapi.json b/openapi/schemas/audience.openapi.json index d77e0556e1..6c3ef65c46 100644 --- a/openapi/schemas/audience.openapi.json +++ b/openapi/schemas/audience.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Audience API", "description": "The API for the Rapidata Audience service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -1742,6 +1742,36 @@ } } }, + "/audience/republish-user-states": { + "post": { + "tags": [ + "Audience" + ], + "summary": "Enqueues a background job that republishes every externally synced audience member's current state.", + "description": "Safe to repeat: each call restarts the run, and every event carries the member's absolute state.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/audience/{audienceId}/resume-distillation": { "post": { "tags": [ diff --git a/openapi/schemas/campaign.openapi.json b/openapi/schemas/campaign.openapi.json index bba9807247..e71946f4f5 100644 --- a/openapi/schemas/campaign.openapi.json +++ b/openapi/schemas/campaign.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Campaign API", "description": "The API for the Rapidata Campaign service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -965,6 +965,36 @@ } } }, + "/campaign/republish-user-campaign-sessions": { + "post": { + "tags": [ + "Campaign" + ], + "summary": "Starts a background run that republishes the session count of every user and campaign.", + "description": "Restarts a run already in progress from the beginning; republished counts never override a newer update.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/campaign/{campaignId}/resume": { "post": { "tags": [ @@ -1162,7 +1192,7 @@ "Experiment" ], "summary": "Creates an experiment in the draft state and returns the full document.", - "description": "The split salt is generated server-side. Returns 400 when an attached-scope experiment sets\n campaign predicates.", + "description": "The split salt is generated server-side.", "requestBody": { "description": "The experiment to create.", "content": { @@ -2022,14 +2052,6 @@ "type": "string", "description": "Human-readable description of the hypothesis." }, - "scope": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentScope" - } - ], - "description": "Defaults to global. Attached experiments must omit every campaign predicate (campaignTypes, excludedCampaignIds, organizationIds, excludedOrganizationIds)." - }, "flags": { "allOf": [ { @@ -2041,24 +2063,6 @@ ], "description": "Feature flags stamped on treatment sessions only." }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "Eligibility predicates. Omitted predicates match anything." - }, - "userEnrollment": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEnrollment" - } - ], - "description": "Defaults to perSession.", - "nullable": true - }, "split": { "allOf": [ { @@ -2201,10 +2205,7 @@ "name", "description", "state", - "scope", "flags", - "eligibility", - "userEnrollment", "split", "createdBy", "createdAt", @@ -2232,14 +2233,6 @@ ], "description": "The lifecycle state." }, - "scope": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentScope" - } - ], - "description": "Whether the experiment is evaluated for any matching campaign or only for campaigns attached to it." - }, "flags": { "allOf": [ { @@ -2251,22 +2244,6 @@ ], "description": "Feature flags stamped on treatment sessions only." }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "The predicates deciding which sessions are part of the population." - }, - "userEnrollment": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEnrollment" - } - ], - "description": "How users enter and leave the population." - }, "split": { "allOf": [ { @@ -2302,137 +2279,7 @@ "format": "date-time" } }, - "description": "A serve-time A/B experiment. Every eligible session records its experiment id, name and arm;\n treatment sessions additionally receive the experiment's feature flags." - }, - "ExperimentAssetKind": { - "enum": [ - "image", - "video", - "audio", - "text", - "multi" - ] - }, - "ExperimentCampaignType": { - "enum": [ - "Routed", - "Program" - ] - }, - "ExperimentContextRequirement": { - "enum": [ - "required", - "absent", - null - ] - }, - "ExperimentEligibility": { - "type": "object", - "properties": { - "rapidTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentRapidType" - }, - "nullable": true - }, - "assetKinds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentAssetKind" - }, - "nullable": true - }, - "mediaContext": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentContextRequirement" - } - ], - "nullable": true - }, - "textContext": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentContextRequirement" - } - ], - "nullable": true - }, - "campaignTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentCampaignType" - }, - "nullable": true - }, - "excludedCampaignIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "organizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "excludedOrganizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "countries": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "languages": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "user": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEligibility" - } - ], - "nullable": true - } - } - }, - "ExperimentRapidType": { - "enum": [ - "BoundingBox", - "Classify", - "Compare", - "FreeText", - "Line", - "Locate", - "NamedEntity", - "Polygon", - "Scrub", - "Transcription" - ] - }, - "ExperimentScope": { - "enum": [ - "global", - "attached" - ] + "description": "A serve-time A/B experiment. Every session it serves records its experiment id, name and arm;\n treatment sessions additionally receive the experiment's feature flags." }, "ExperimentSplit": { "required": [ @@ -2458,49 +2305,6 @@ "completed" ] }, - "ExperimentUserEligibility": { - "type": "object", - "properties": { - "minScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "maxScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "newUsers": { - "type": "boolean", - "nullable": true - }, - "deviceTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - }, - "nullable": true - }, - "dspNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "globalAudienceGraduate": { - "type": "boolean", - "nullable": true - } - } - }, - "ExperimentUserEnrollment": { - "enum": [ - "perSession", - "sticky" - ] - }, "FeatureFlag": { "required": [ "key", @@ -3412,6 +3216,10 @@ }, "cooldown": { "$ref": "#/components/schemas/ICooldownDuration" + }, + "key": { + "type": "string", + "nullable": true } } }, @@ -4821,14 +4629,6 @@ "description": "Human-readable description of the hypothesis.", "nullable": true }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "Replaces the whole eligibility object when provided." - }, "treatmentBps": { "type": "integer", "description": "Treatment share in basis points (0–10000).", diff --git a/openapi/schemas/dataset.openapi.json b/openapi/schemas/dataset.openapi.json index 77df070f75..66862c64e2 100644 --- a/openapi/schemas/dataset.openapi.json +++ b/openapi/schemas/dataset.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Dataset API", "description": "The API for the Rapidata Dataset service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/flow.openapi.json b/openapi/schemas/flow.openapi.json index 43925c2b10..6d77138025 100644 --- a/openapi/schemas/flow.openapi.json +++ b/openapi/schemas/flow.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Flow API", "description": "The API for the Rapidata Flow service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/identity.openapi.json b/openapi/schemas/identity.openapi.json index 366cad8105..b6356328c9 100644 --- a/openapi/schemas/identity.openapi.json +++ b/openapi/schemas/identity.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Identity API", "description": "The API for the Rapidata Identity service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/leaderboard.openapi.json b/openapi/schemas/leaderboard.openapi.json index ef4a15349c..bcf14e8d6e 100644 --- a/openapi/schemas/leaderboard.openapi.json +++ b/openapi/schemas/leaderboard.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Leaderboard API", "description": "The API for the Rapidata Leaderboard service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -5210,6 +5210,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -5316,6 +5320,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -6910,6 +7012,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -7016,6 +7122,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -9359,6 +9563,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -9465,6 +9673,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -17841,6 +18147,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -21501,6 +21813,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -22498,6 +22816,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -23313,6 +23637,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -24479,12 +24809,18 @@ }, "isPublic": { "type": "boolean", - "description": "Whether the benchmark should be public." + "description": "True makes public now; false makes private. Do not combine with publicationDate." }, "isPublished": { "type": "boolean", "description": "Whether the benchmark should be surfaced in the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null makes private, omission leaves it unchanged. Do not combine with isPublic.", + "format": "date-time", + "nullable": true + }, "initialBoostLevel": { "type": "integer", "description": "Initial boost level applied to the campaign of every run created from this benchmark. Pass null to clear the\n override and fall back to the benchmark default.", diff --git a/openapi/schemas/order.openapi.json b/openapi/schemas/order.openapi.json index 23287bcbc9..6c025cb6e7 100644 --- a/openapi/schemas/order.openapi.json +++ b/openapi/schemas/order.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Order API", "description": "The API for the Rapidata Order service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -1430,6 +1430,30 @@ "type": "integer" }, "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "id", + "-id", + "state", + "-state", + "decisiveness", + "-decisiveness", + "accepted_response_count", + "-accepted_response_count", + "has_responses", + "-has_responses" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" } ], "responses": { diff --git a/openapi/schemas/payment.openapi.json b/openapi/schemas/payment.openapi.json index 42560b9c00..62d975a785 100644 --- a/openapi/schemas/payment.openapi.json +++ b/openapi/schemas/payment.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Payment API", "description": "The API for the Rapidata Payment service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/rapid.openapi.json b/openapi/schemas/rapid.openapi.json index bb3048ff9f..243d0f8901 100644 --- a/openapi/schemas/rapid.openapi.json +++ b/openapi/schemas/rapid.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Rapid API", "description": "The API for the Rapidata Rapid service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -1203,6 +1203,36 @@ } } }, + "/rapid/republish-response-counts": { + "post": { + "tags": [ + "Rapid" + ], + "summary": "Starts a fresh background run that republishes every stored user response count.", + "description": "Calling it again restarts the run from the beginning.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + } + } + }, "/rapid/response": { "post": { "tags": [ @@ -4426,15 +4456,26 @@ ], "type": "string" }, - "responseAmountThreshold": { + "acceptanceLimit": { "type": "integer", "format": "int32" }, - "serveThreshold": { + "completionThreshold": { "type": "integer", "format": "int32", "nullable": true }, + "responseAmountThreshold": { + "type": "integer", + "format": "int32", + "deprecated": true + }, + "serveThreshold": { + "type": "integer", + "format": "int32", + "nullable": true, + "deprecated": true + }, "guessAmountThreshold": { "type": "integer", "format": "int32", diff --git a/openapi/schemas/rapidata.filtered.openapi.json b/openapi/schemas/rapidata.filtered.openapi.json index 28fffc34d6..5043831b26 100644 --- a/openapi/schemas/rapidata.filtered.openapi.json +++ b/openapi/schemas/rapidata.filtered.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Asset API", "description": "The API for the Rapidata Asset service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -2741,6 +2741,47 @@ ] } }, + "/audience/republish-user-states": { + "post": { + "tags": [ + "Audience" + ], + "summary": "Enqueues a background job that republishes every externally synced audience member's current state.", + "description": "Safe to repeat: each call restarts the run, and every event carries the member's absolute state.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, "/audience/{audienceId}/resume-distillation": { "post": { "tags": [ @@ -4503,6 +4544,47 @@ ] } }, + "/campaign/republish-user-campaign-sessions": { + "post": { + "tags": [ + "Campaign" + ], + "summary": "Starts a background run that republishes the session count of every user and campaign.", + "description": "Restarts a run already in progress from the beginning; republished counts never override a newer update.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, "/campaign/{campaignId}/resume": { "post": { "tags": [ @@ -4744,7 +4826,7 @@ "Experiment" ], "summary": "Creates an experiment in the draft state and returns the full document.", - "description": "The split salt is generated server-side. Returns 400 when an attached-scope experiment sets\n campaign predicates.", + "description": "The split salt is generated server-side.", "requestBody": { "description": "The experiment to create.", "content": { @@ -15868,6 +15950,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -15974,6 +16060,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -17612,6 +17796,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -17718,6 +17906,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -20105,6 +20391,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -20163,9 +20453,107 @@ "x-parameter-group": "filters" }, { - "name": "name", + "name": "name", + "in": "query", + "description": "Filter by name.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", "in": "query", - "description": "Filter by name.", + "description": "Filter by publication_date.", "style": "deepObject", "explode": true, "schema": { @@ -28395,6 +28783,30 @@ "type": "integer" }, "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "id", + "-id", + "state", + "-state", + "decisiveness", + "-decisiveness", + "accepted_response_count", + "-accepted_response_count", + "has_responses", + "-has_responses" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" } ], "responses": { @@ -36003,6 +36415,47 @@ ] } }, + "/rapid/republish-response-counts": { + "post": { + "tags": [ + "Rapid" + ], + "summary": "Starts a fresh background run that republishes every stored user response count.", + "description": "Calling it again restarts the run from the beginning.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, "/rapid/response": { "post": { "tags": [ @@ -43268,14 +43721,6 @@ "type": "string", "description": "Human-readable description of the hypothesis." }, - "scope": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentScope" - } - ], - "description": "Defaults to global. Attached experiments must omit every campaign predicate (campaignTypes, excludedCampaignIds, organizationIds, excludedOrganizationIds)." - }, "flags": { "allOf": [ { @@ -43287,24 +43732,6 @@ ], "description": "Feature flags stamped on treatment sessions only." }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "Eligibility predicates. Omitted predicates match anything." - }, - "userEnrollment": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEnrollment" - } - ], - "description": "Defaults to perSession.", - "nullable": true - }, "split": { "allOf": [ { @@ -43440,10 +43867,7 @@ "name", "description", "state", - "scope", "flags", - "eligibility", - "userEnrollment", "split", "createdBy", "createdAt", @@ -43471,14 +43895,6 @@ ], "description": "The lifecycle state." }, - "scope": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentScope" - } - ], - "description": "Whether the experiment is evaluated for any matching campaign or only for campaigns attached to it." - }, "flags": { "allOf": [ { @@ -43490,22 +43906,6 @@ ], "description": "Feature flags stamped on treatment sessions only." }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "The predicates deciding which sessions are part of the population." - }, - "userEnrollment": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEnrollment" - } - ], - "description": "How users enter and leave the population." - }, "split": { "allOf": [ { @@ -43541,137 +43941,7 @@ "format": "date-time" } }, - "description": "A serve-time A/B experiment. Every eligible session records its experiment id, name and arm;\n treatment sessions additionally receive the experiment's feature flags." - }, - "ExperimentAssetKind": { - "enum": [ - "image", - "video", - "audio", - "text", - "multi" - ] - }, - "ExperimentCampaignType": { - "enum": [ - "Routed", - "Program" - ] - }, - "ExperimentContextRequirement": { - "enum": [ - "required", - "absent", - null - ] - }, - "ExperimentEligibility": { - "type": "object", - "properties": { - "rapidTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentRapidType" - }, - "nullable": true - }, - "assetKinds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentAssetKind" - }, - "nullable": true - }, - "mediaContext": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentContextRequirement" - } - ], - "nullable": true - }, - "textContext": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentContextRequirement" - } - ], - "nullable": true - }, - "campaignTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentCampaignType" - }, - "nullable": true - }, - "excludedCampaignIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "organizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "excludedOrganizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "countries": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "languages": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "user": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEligibility" - } - ], - "nullable": true - } - } - }, - "ExperimentRapidType": { - "enum": [ - "BoundingBox", - "Classify", - "Compare", - "FreeText", - "Line", - "Locate", - "NamedEntity", - "Polygon", - "Scrub", - "Transcription" - ] - }, - "ExperimentScope": { - "enum": [ - "global", - "attached" - ] + "description": "A serve-time A/B experiment. Every session it serves records its experiment id, name and arm;\n treatment sessions additionally receive the experiment's feature flags." }, "ExperimentSplit": { "required": [ @@ -43697,49 +43967,6 @@ "completed" ] }, - "ExperimentUserEligibility": { - "type": "object", - "properties": { - "minScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "maxScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "newUsers": { - "type": "boolean", - "nullable": true - }, - "deviceTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - }, - "nullable": true - }, - "dspNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "globalAudienceGraduate": { - "type": "boolean", - "nullable": true - } - } - }, - "ExperimentUserEnrollment": { - "enum": [ - "perSession", - "sticky" - ] - }, "GetBoostInsightsEndpoint_AudienceOutput": { "required": [ "externalAudienceId", @@ -44600,6 +44827,10 @@ }, "cooldown": { "$ref": "#/components/schemas/ICooldownDuration" + }, + "key": { + "type": "string", + "nullable": true } } }, @@ -45992,14 +46223,6 @@ "description": "Human-readable description of the hypothesis.", "nullable": true }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "Replaces the whole eligibility object when provided." - }, "treatmentBps": { "type": "integer", "description": "Treatment share in basis points (0–10000).", @@ -50727,6 +50950,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -53775,6 +54004,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -54772,6 +55007,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -55587,6 +55828,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -56753,12 +57000,18 @@ }, "isPublic": { "type": "boolean", - "description": "Whether the benchmark should be public." + "description": "True makes public now; false makes private. Do not combine with publicationDate." }, "isPublished": { "type": "boolean", "description": "Whether the benchmark should be surfaced in the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null makes private, omission leaves it unchanged. Do not combine with isPublic.", + "format": "date-time", + "nullable": true + }, "initialBoostLevel": { "type": "integer", "description": "Initial boost level applied to the campaign of every run created from this benchmark. Pass null to clear the\n override and fall back to the benchmark default.", @@ -66392,11 +66645,11 @@ ], "type": "string" }, - "responseAmountThreshold": { + "acceptanceLimit": { "type": "integer", "format": "int32" }, - "serveThreshold": { + "completionThreshold": { "type": "integer", "format": "int32", "nullable": true diff --git a/openapi/schemas/rapidata.openapi.json b/openapi/schemas/rapidata.openapi.json index 54520f43d0..03008c38ac 100644 --- a/openapi/schemas/rapidata.openapi.json +++ b/openapi/schemas/rapidata.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Asset API", "description": "The API for the Rapidata Asset service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { @@ -2741,6 +2741,47 @@ ] } }, + "/audience/republish-user-states": { + "post": { + "tags": [ + "Audience" + ], + "summary": "Enqueues a background job that republishes every externally synced audience member's current state.", + "description": "Safe to repeat: each call restarts the run, and every event carries the member's absolute state.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, "/audience/{audienceId}/resume-distillation": { "post": { "tags": [ @@ -4554,6 +4595,47 @@ ] } }, + "/campaign/republish-user-campaign-sessions": { + "post": { + "tags": [ + "Campaign" + ], + "summary": "Starts a background run that republishes the session count of every user and campaign.", + "description": "Restarts a run already in progress from the beginning; republished counts never override a newer update.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, "/campaign/{campaignId}/resume": { "post": { "tags": [ @@ -4795,7 +4877,7 @@ "Experiment" ], "summary": "Creates an experiment in the draft state and returns the full document.", - "description": "The split salt is generated server-side. Returns 400 when an attached-scope experiment sets\n campaign predicates.", + "description": "The split salt is generated server-side.", "requestBody": { "description": "The experiment to create.", "content": { @@ -16896,6 +16978,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -17003,9 +17089,9 @@ "x-parameter-group": "filters" }, { - "name": "owner_mail", + "name": "is_public", "in": "query", - "description": "Filter by owner_mail.", + "description": "Filter by is_public.", "style": "deepObject", "explode": true, "schema": { @@ -17052,9 +17138,9 @@ "x-parameter-group": "filters" }, { - "name": "created_at", + "name": "publication_date", "in": "query", - "description": "Filter by created_at.", + "description": "Filter by publication_date.", "style": "deepObject", "explode": true, "schema": { @@ -17101,92 +17187,9 @@ "x-parameter-group": "filters" }, { - "name": "logic", - "in": "query", - "description": "How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.", - "schema": { - "enum": [ - "and", - "or" - ], - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthenticated" - }, - "403": { - "description": "Forbidden" - } - }, - "security": [ - { - "OpenIdConnect": [ - "openid", - "profile", - "email", - "offline_access", - "api" - ] - } - ] - } - }, - "/benchmark/combined-matrix/query": { - "get": { - "tags": [ - "Benchmark" - ], - "summary": "Queries the combined win matrix of multiple benchmarks.", - "description": "Filters apply to the underlying votes. Benchmarks without granular vote storage evaluate\n only the filters their aggregated data can answer (tags, participants, leaderboards, runs,\n prompt identifiers); demographic and vote-time filters require granular vote storage.", - "parameters": [ - { - "name": "benchmarkIds", - "in": "query", - "description": "The identifiers of the benchmarks to combine.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "useWeightedScoring", - "in": "query", - "description": "Whether to apply weighted scoring based on user scores.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "country", + "name": "owner_mail", "in": "query", - "description": "Filter by country.", + "description": "Filter by owner_mail.", "style": "deepObject", "explode": true, "schema": { @@ -17233,9 +17236,9 @@ "x-parameter-group": "filters" }, { - "name": "language", + "name": "created_at", "in": "query", - "description": "Filter by language.", + "description": "Filter by created_at.", "style": "deepObject", "explode": true, "schema": { @@ -17282,9 +17285,190 @@ "x-parameter-group": "filters" }, { - "name": "gender", + "name": "logic", "in": "query", - "description": "Filter by gender.", + "description": "How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.", + "schema": { + "enum": [ + "and", + "or" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryBenchmarksEndpoint_PagedResultOfOutput" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, + "/benchmark/combined-matrix/query": { + "get": { + "tags": [ + "Benchmark" + ], + "summary": "Queries the combined win matrix of multiple benchmarks.", + "description": "Filters apply to the underlying votes. Benchmarks without granular vote storage evaluate\n only the filters their aggregated data can answer (tags, participants, leaderboards, runs,\n prompt identifiers); demographic and vote-time filters require granular vote storage.", + "parameters": [ + { + "name": "benchmarkIds", + "in": "query", + "description": "The identifiers of the benchmarks to combine.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "useWeightedScoring", + "in": "query", + "description": "Whether to apply weighted scoring based on user scores.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "country", + "in": "query", + "description": "Filter by country.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "language", + "in": "query", + "description": "Filter by language.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "gender", + "in": "query", + "description": "Filter by gender.", "style": "deepObject", "explode": true, "schema": { @@ -18640,6 +18824,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -18746,6 +18934,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -21133,6 +21419,10 @@ "-id", "name", "-name", + "is_public", + "-is_public", + "publication_date", + "-publication_date", "created_at", "-created_at" ], @@ -21239,6 +21529,104 @@ }, "x-parameter-group": "filters" }, + { + "name": "is_public", + "in": "query", + "description": "Filter by is_public.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, + { + "name": "publication_date", + "in": "query", + "description": "Filter by publication_date.", + "style": "deepObject", + "explode": true, + "schema": { + "type": "object", + "properties": { + "eq": { + "type": "string" + }, + "neq": { + "type": "string" + }, + "gt": { + "type": "string" + }, + "gte": { + "type": "string" + }, + "lt": { + "type": "string" + }, + "lte": { + "type": "string" + }, + "contains": { + "type": "string" + }, + "starts_with": { + "type": "string" + }, + "ends_with": { + "type": "string" + }, + "in": { + "type": "array", + "items": { + "type": "string" + } + }, + "not_contains": { + "type": "string" + } + } + }, + "x-parameter-group": "filters" + }, { "name": "owner_mail", "in": "query", @@ -30942,6 +31330,30 @@ "type": "integer" }, "x-parameter-group": "page" + }, + { + "name": "sort", + "in": "query", + "description": "Sort fields. Prefix with - for descending order (e.g. -created_at).", + "schema": { + "type": "array", + "items": { + "enum": [ + "id", + "-id", + "state", + "-state", + "decisiveness", + "-decisiveness", + "accepted_response_count", + "-accepted_response_count", + "has_responses", + "-has_responses" + ], + "type": "string" + } + }, + "x-parameter-group": "sort" } ], "responses": { @@ -40379,6 +40791,47 @@ ] } }, + "/rapid/republish-response-counts": { + "post": { + "tags": [ + "Rapid" + ], + "summary": "Starts a fresh background run that republishes every stored user response count.", + "description": "Calling it again restarts the run from the beginning.", + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "OpenIdConnect": [ + "openid", + "profile", + "email", + "offline_access", + "api" + ] + } + ] + } + }, "/rapid/response": { "post": { "tags": [ @@ -47830,14 +48283,6 @@ "type": "string", "description": "Human-readable description of the hypothesis." }, - "scope": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentScope" - } - ], - "description": "Defaults to global. Attached experiments must omit every campaign predicate (campaignTypes, excludedCampaignIds, organizationIds, excludedOrganizationIds)." - }, "flags": { "allOf": [ { @@ -47849,24 +48294,6 @@ ], "description": "Feature flags stamped on treatment sessions only." }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "Eligibility predicates. Omitted predicates match anything." - }, - "userEnrollment": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEnrollment" - } - ], - "description": "Defaults to perSession.", - "nullable": true - }, "split": { "allOf": [ { @@ -48002,10 +48429,7 @@ "name", "description", "state", - "scope", "flags", - "eligibility", - "userEnrollment", "split", "createdBy", "createdAt", @@ -48033,14 +48457,6 @@ ], "description": "The lifecycle state." }, - "scope": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentScope" - } - ], - "description": "Whether the experiment is evaluated for any matching campaign or only for campaigns attached to it." - }, "flags": { "allOf": [ { @@ -48052,22 +48468,6 @@ ], "description": "Feature flags stamped on treatment sessions only." }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "The predicates deciding which sessions are part of the population." - }, - "userEnrollment": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEnrollment" - } - ], - "description": "How users enter and leave the population." - }, "split": { "allOf": [ { @@ -48103,137 +48503,7 @@ "format": "date-time" } }, - "description": "A serve-time A/B experiment. Every eligible session records its experiment id, name and arm;\n treatment sessions additionally receive the experiment's feature flags." - }, - "ExperimentAssetKind": { - "enum": [ - "image", - "video", - "audio", - "text", - "multi" - ] - }, - "ExperimentCampaignType": { - "enum": [ - "Routed", - "Program" - ] - }, - "ExperimentContextRequirement": { - "enum": [ - "required", - "absent", - null - ] - }, - "ExperimentEligibility": { - "type": "object", - "properties": { - "rapidTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentRapidType" - }, - "nullable": true - }, - "assetKinds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentAssetKind" - }, - "nullable": true - }, - "mediaContext": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentContextRequirement" - } - ], - "nullable": true - }, - "textContext": { - "type": "string", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentContextRequirement" - } - ], - "nullable": true - }, - "campaignTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentCampaignType" - }, - "nullable": true - }, - "excludedCampaignIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "organizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "excludedOrganizationIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "countries": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "languages": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "user": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ExperimentUserEligibility" - } - ], - "nullable": true - } - } - }, - "ExperimentRapidType": { - "enum": [ - "BoundingBox", - "Classify", - "Compare", - "FreeText", - "Line", - "Locate", - "NamedEntity", - "Polygon", - "Scrub", - "Transcription" - ] - }, - "ExperimentScope": { - "enum": [ - "global", - "attached" - ] + "description": "A serve-time A/B experiment. Every session it serves records its experiment id, name and arm;\n treatment sessions additionally receive the experiment's feature flags." }, "ExperimentSplit": { "required": [ @@ -48259,49 +48529,6 @@ "completed" ] }, - "ExperimentUserEligibility": { - "type": "object", - "properties": { - "minScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "maxScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "newUsers": { - "type": "boolean", - "nullable": true - }, - "deviceTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - }, - "nullable": true - }, - "dspNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "globalAudienceGraduate": { - "type": "boolean", - "nullable": true - } - } - }, - "ExperimentUserEnrollment": { - "enum": [ - "perSession", - "sticky" - ] - }, "GetBoostInsightsEndpoint_AudienceOutput": { "required": [ "externalAudienceId", @@ -49198,6 +49425,10 @@ }, "cooldown": { "$ref": "#/components/schemas/ICooldownDuration" + }, + "key": { + "type": "string", + "nullable": true } } }, @@ -50600,14 +50831,6 @@ "description": "Human-readable description of the hypothesis.", "nullable": true }, - "eligibility": { - "allOf": [ - { - "$ref": "#/components/schemas/ExperimentEligibility" - } - ], - "description": "Replaces the whole eligibility object when provided." - }, "treatmentBps": { "type": "integer", "description": "Treatment share in basis points (0–10000).", @@ -55410,6 +55633,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -58515,6 +58744,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -59512,6 +59747,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -60327,6 +60568,12 @@ "type": "boolean", "description": "Whether the benchmark is published to the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null means private.", + "format": "date-time", + "nullable": true + }, "createdAt": { "type": "string", "description": "The timestamp when the benchmark was created.", @@ -61493,12 +61740,18 @@ }, "isPublic": { "type": "boolean", - "description": "Whether the benchmark should be public." + "description": "True makes public now; false makes private. Do not combine with publicationDate." }, "isPublished": { "type": "boolean", "description": "Whether the benchmark should be surfaced in the public benchmark repository." }, + "publicationDate": { + "type": "string", + "description": "Public access starts at this instant; null makes private, omission leaves it unchanged. Do not combine with isPublic.", + "format": "date-time", + "nullable": true + }, "initialBoostLevel": { "type": "integer", "description": "Initial boost level applied to the campaign of every run created from this benchmark. Pass null to clear the\n override and fall back to the benchmark default.", @@ -71261,15 +71514,26 @@ ], "type": "string" }, - "responseAmountThreshold": { + "acceptanceLimit": { "type": "integer", "format": "int32" }, - "serveThreshold": { + "completionThreshold": { "type": "integer", "format": "int32", "nullable": true }, + "responseAmountThreshold": { + "type": "integer", + "format": "int32", + "deprecated": true + }, + "serveThreshold": { + "type": "integer", + "format": "int32", + "nullable": true, + "deprecated": true + }, "guessAmountThreshold": { "type": "integer", "format": "int32", diff --git a/openapi/schemas/signal.openapi.json b/openapi/schemas/signal.openapi.json index 1ebc6ee064..ce7198d1a8 100644 --- a/openapi/schemas/signal.openapi.json +++ b/openapi/schemas/signal.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Signal API", "description": "The API for the Rapidata Signal service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/translation.openapi.json b/openapi/schemas/translation.openapi.json index 48293bbdbb..1bb29aa439 100644 --- a/openapi/schemas/translation.openapi.json +++ b/openapi/schemas/translation.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Translation API", "description": "The API for the Rapidata Translation service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/openapi/schemas/validation.openapi.json b/openapi/schemas/validation.openapi.json index c2312a5397..3303fe5a21 100644 --- a/openapi/schemas/validation.openapi.json +++ b/openapi/schemas/validation.openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Rapidata Validation API", "description": "The API for the Rapidata Validation service", - "version": "2026.09.27.1857-67e65da" + "version": "2026.09.29.1117-e0b6f6d" }, "servers": [ { diff --git a/src/rapidata/api_client/api/audience_api.py b/src/rapidata/api_client/api/audience_api.py index 6cb0d16b49..bd630023ba 100644 --- a/src/rapidata/api_client/api/audience_api.py +++ b/src/rapidata/api_client/api/audience_api.py @@ -7467,6 +7467,261 @@ def _audience_reconcile_user_counts_post_serialize( + @validate_call + def audience_republish_user_states_post( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Enqueues a background job that republishes every externally synced audience member's current state. + + Safe to repeat: each call restarts the run, and every event carries the member's absolute state. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_republish_user_states_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def audience_republish_user_states_post_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Enqueues a background job that republishes every externally synced audience member's current state. + + Safe to repeat: each call restarts the run, and every event carries the member's absolute state. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_republish_user_states_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def audience_republish_user_states_post_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enqueues a background job that republishes every externally synced audience member's current state. + + Safe to repeat: each call restarts the run, and every event carries the member's absolute state. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._audience_republish_user_states_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _audience_republish_user_states_post_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/audience/republish-user-states', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def audience_state_recalculation_recalculation_id_get( self, diff --git a/src/rapidata/api_client/api/benchmark_api.py b/src/rapidata/api_client/api/benchmark_api.py index 594bbb9d05..0df841d4c9 100644 --- a/src/rapidata/api_client/api/benchmark_api.py +++ b/src/rapidata/api_client/api/benchmark_api.py @@ -13480,6 +13480,8 @@ def benchmarks_get( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -13509,6 +13511,10 @@ def benchmarks_get( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -13543,6 +13549,8 @@ def benchmarks_get( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -13577,6 +13585,8 @@ def benchmarks_get_with_http_info( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -13606,6 +13616,10 @@ def benchmarks_get_with_http_info( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -13640,6 +13654,8 @@ def benchmarks_get_with_http_info( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -13674,6 +13690,8 @@ def benchmarks_get_without_preload_content( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -13703,6 +13721,10 @@ def benchmarks_get_without_preload_content( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -13737,6 +13759,8 @@ def benchmarks_get_without_preload_content( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -13766,6 +13790,8 @@ def _benchmarks_get_serialize( sort, id, name, + is_public, + publication_date, owner_mail, created_at, logic, @@ -13834,6 +13860,36 @@ def _benchmarks_get_serialize( _query_params.append(('name[' + _k + ']', _item)) else: _query_params.append(('name[' + _k + ']', _v)) + if is_public is not None: + _param_val = is_public + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is None: + continue + if isinstance(_v, list): + # Explode list operator values (e.g. `in`) into repeated + # params: field[in]=a&field[in]=b. + for _item in _v: + _query_params.append(('is_public[' + _k + ']', _item)) + else: + _query_params.append(('is_public[' + _k + ']', _v)) + if publication_date is not None: + _param_val = publication_date + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is None: + continue + if isinstance(_v, list): + # Explode list operator values (e.g. `in`) into repeated + # params: field[in]=a&field[in]=b. + for _item in _v: + _query_params.append(('publication_date[' + _k + ']', _item)) + else: + _query_params.append(('publication_date[' + _k + ']', _v)) if owner_mail is not None: _param_val = owner_mail if hasattr(_param_val, 'to_dict'): @@ -13913,6 +13969,8 @@ def benchmarks_managed_get( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -13942,6 +14000,10 @@ def benchmarks_managed_get( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -13976,6 +14038,8 @@ def benchmarks_managed_get( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -14010,6 +14074,8 @@ def benchmarks_managed_get_with_http_info( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -14039,6 +14105,10 @@ def benchmarks_managed_get_with_http_info( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -14073,6 +14143,8 @@ def benchmarks_managed_get_with_http_info( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -14107,6 +14179,8 @@ def benchmarks_managed_get_without_preload_content( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -14136,6 +14210,10 @@ def benchmarks_managed_get_without_preload_content( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -14170,6 +14248,8 @@ def benchmarks_managed_get_without_preload_content( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -14199,6 +14279,8 @@ def _benchmarks_managed_get_serialize( sort, id, name, + is_public, + publication_date, owner_mail, created_at, logic, @@ -14267,6 +14349,36 @@ def _benchmarks_managed_get_serialize( _query_params.append(('name[' + _k + ']', _item)) else: _query_params.append(('name[' + _k + ']', _v)) + if is_public is not None: + _param_val = is_public + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is None: + continue + if isinstance(_v, list): + # Explode list operator values (e.g. `in`) into repeated + # params: field[in]=a&field[in]=b. + for _item in _v: + _query_params.append(('is_public[' + _k + ']', _item)) + else: + _query_params.append(('is_public[' + _k + ']', _v)) + if publication_date is not None: + _param_val = publication_date + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is None: + continue + if isinstance(_v, list): + # Explode list operator values (e.g. `in`) into repeated + # params: field[in]=a&field[in]=b. + for _item in _v: + _query_params.append(('publication_date[' + _k + ']', _item)) + else: + _query_params.append(('publication_date[' + _k + ']', _v)) if owner_mail is not None: _param_val = owner_mail if hasattr(_param_val, 'to_dict'): @@ -14346,6 +14458,8 @@ def benchmarks_published_get( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -14375,6 +14489,10 @@ def benchmarks_published_get( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -14409,6 +14527,8 @@ def benchmarks_published_get( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -14443,6 +14563,8 @@ def benchmarks_published_get_with_http_info( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -14472,6 +14594,10 @@ def benchmarks_published_get_with_http_info( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -14506,6 +14632,8 @@ def benchmarks_published_get_with_http_info( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -14540,6 +14668,8 @@ def benchmarks_published_get_without_preload_content( sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, id: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by id.")] = None, name: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by name.")] = None, + is_public: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by is_public.")] = None, + publication_date: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by publication_date.")] = None, owner_mail: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by owner_mail.")] = None, created_at: Annotated[Optional[AudienceAudienceIdJobsGetJobIdParameter], Field(description="Filter by created_at.")] = None, logic: Annotated[Optional[StrictStr], Field(description="How to combine the field filters: \"and\" (default) requires every filter to match, \"or\" requires any of them to match.")] = None, @@ -14569,6 +14699,10 @@ def benchmarks_published_get_without_preload_content( :type id: AudienceAudienceIdJobsGetJobIdParameter :param name: Filter by name. :type name: AudienceAudienceIdJobsGetJobIdParameter + :param is_public: Filter by is_public. + :type is_public: AudienceAudienceIdJobsGetJobIdParameter + :param publication_date: Filter by publication_date. + :type publication_date: AudienceAudienceIdJobsGetJobIdParameter :param owner_mail: Filter by owner_mail. :type owner_mail: AudienceAudienceIdJobsGetJobIdParameter :param created_at: Filter by created_at. @@ -14603,6 +14737,8 @@ def benchmarks_published_get_without_preload_content( sort=sort, id=id, name=name, + is_public=is_public, + publication_date=publication_date, owner_mail=owner_mail, created_at=created_at, logic=logic, @@ -14632,6 +14768,8 @@ def _benchmarks_published_get_serialize( sort, id, name, + is_public, + publication_date, owner_mail, created_at, logic, @@ -14700,6 +14838,36 @@ def _benchmarks_published_get_serialize( _query_params.append(('name[' + _k + ']', _item)) else: _query_params.append(('name[' + _k + ']', _v)) + if is_public is not None: + _param_val = is_public + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is None: + continue + if isinstance(_v, list): + # Explode list operator values (e.g. `in`) into repeated + # params: field[in]=a&field[in]=b. + for _item in _v: + _query_params.append(('is_public[' + _k + ']', _item)) + else: + _query_params.append(('is_public[' + _k + ']', _v)) + if publication_date is not None: + _param_val = publication_date + if hasattr(_param_val, 'to_dict'): + _param_val = _param_val.to_dict() + if isinstance(_param_val, dict): + for _k, _v in _param_val.items(): + if _v is None: + continue + if isinstance(_v, list): + # Explode list operator values (e.g. `in`) into repeated + # params: field[in]=a&field[in]=b. + for _item in _v: + _query_params.append(('publication_date[' + _k + ']', _item)) + else: + _query_params.append(('publication_date[' + _k + ']', _v)) if owner_mail is not None: _param_val = owner_mail if hasattr(_param_val, 'to_dict'): diff --git a/src/rapidata/api_client/api/campaign_api.py b/src/rapidata/api_client/api/campaign_api.py index e2ef388e34..c0a6792023 100644 --- a/src/rapidata/api_client/api/campaign_api.py +++ b/src/rapidata/api_client/api/campaign_api.py @@ -3849,6 +3849,261 @@ def _campaign_program_post_serialize( + @validate_call + def campaign_republish_user_campaign_sessions_post( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Starts a background run that republishes the session count of every user and campaign. + + Restarts a run already in progress from the beginning; republished counts never override a newer update. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._campaign_republish_user_campaign_sessions_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def campaign_republish_user_campaign_sessions_post_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Starts a background run that republishes the session count of every user and campaign. + + Restarts a run already in progress from the beginning; republished counts never override a newer update. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._campaign_republish_user_campaign_sessions_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def campaign_republish_user_campaign_sessions_post_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Starts a background run that republishes the session count of every user and campaign. + + Restarts a run already in progress from the beginning; republished counts never override a newer update. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._campaign_republish_user_campaign_sessions_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _campaign_republish_user_campaign_sessions_post_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/campaign/republish-user-campaign-sessions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def campaigns_get( self, diff --git a/src/rapidata/api_client/api/experiment_api.py b/src/rapidata/api_client/api/experiment_api.py index 746bc38385..a2bf74c0fd 100644 --- a/src/rapidata/api_client/api/experiment_api.py +++ b/src/rapidata/api_client/api/experiment_api.py @@ -1192,7 +1192,7 @@ def campaign_experiments_post( ) -> Experiment: """Creates an experiment in the draft state and returns the full document. - The split salt is generated server-side. Returns 400 when an attached-scope experiment sets campaign predicates. + The split salt is generated server-side. :param create_experiment_endpoint_input: The experiment to create. (required) :type create_experiment_endpoint_input: CreateExperimentEndpointInput @@ -1262,7 +1262,7 @@ def campaign_experiments_post_with_http_info( ) -> ApiResponse[Experiment]: """Creates an experiment in the draft state and returns the full document. - The split salt is generated server-side. Returns 400 when an attached-scope experiment sets campaign predicates. + The split salt is generated server-side. :param create_experiment_endpoint_input: The experiment to create. (required) :type create_experiment_endpoint_input: CreateExperimentEndpointInput @@ -1332,7 +1332,7 @@ def campaign_experiments_post_without_preload_content( ) -> RESTResponseType: """Creates an experiment in the draft state and returns the full document. - The split salt is generated server-side. Returns 400 when an attached-scope experiment sets campaign predicates. + The split salt is generated server-side. :param create_experiment_endpoint_input: The experiment to create. (required) :type create_experiment_endpoint_input: CreateExperimentEndpointInput diff --git a/src/rapidata/api_client/api/job_api.py b/src/rapidata/api_client/api/job_api.py index 6999e83864..d1fb75c964 100644 --- a/src/rapidata/api_client/api/job_api.py +++ b/src/rapidata/api_client/api/job_api.py @@ -7670,6 +7670,7 @@ def job_job_id_results_get( states: Annotated[Optional[List[RapidState]], Field(description="Optional rapid states to filter by (rapid-card results only).")] = None, page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7695,6 +7696,8 @@ def job_job_id_results_get( :type page: int :param page_size: The number of items per page. :type page_size: int + :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). + :type sort: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7722,6 +7725,7 @@ def job_job_id_results_get( states=states, page=page, page_size=page_size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7752,6 +7756,7 @@ def job_job_id_results_get_with_http_info( states: Annotated[Optional[List[RapidState]], Field(description="Optional rapid states to filter by (rapid-card results only).")] = None, page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7777,6 +7782,8 @@ def job_job_id_results_get_with_http_info( :type page: int :param page_size: The number of items per page. :type page_size: int + :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). + :type sort: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7804,6 +7811,7 @@ def job_job_id_results_get_with_http_info( states=states, page=page, page_size=page_size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7834,6 +7842,7 @@ def job_job_id_results_get_without_preload_content( states: Annotated[Optional[List[RapidState]], Field(description="Optional rapid states to filter by (rapid-card results only).")] = None, page: Annotated[Optional[StrictInt], Field(description="The 1-based page index.")] = None, page_size: Annotated[Optional[StrictInt], Field(description="The number of items per page.")] = None, + sort: Annotated[Optional[List[StrictStr]], Field(description="Sort fields. Prefix with - for descending order (e.g. -created_at).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7859,6 +7868,8 @@ def job_job_id_results_get_without_preload_content( :type page: int :param page_size: The number of items per page. :type page_size: int + :param sort: Sort fields. Prefix with - for descending order (e.g. -created_at). + :type sort: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7886,6 +7897,7 @@ def job_job_id_results_get_without_preload_content( states=states, page=page, page_size=page_size, + sort=sort, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7911,6 +7923,7 @@ def _job_job_id_results_get_serialize( states, page, page_size, + sort, _request_auth, _content_type, _headers, @@ -7921,6 +7934,7 @@ def _job_job_id_results_get_serialize( _collection_formats: Dict[str, str] = { 'states': 'multi', + 'sort': 'multi', } _path_params: Dict[str, str] = {} @@ -7948,6 +7962,10 @@ def _job_job_id_results_get_serialize( _query_params.append(('page_size', page_size)) + if sort is not None: + + _query_params.append(('sort', sort)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/src/rapidata/api_client/api/rapid_api.py b/src/rapidata/api_client/api/rapid_api.py index 09cf2bd2ed..8d2797b1bb 100644 --- a/src/rapidata/api_client/api/rapid_api.py +++ b/src/rapidata/api_client/api/rapid_api.py @@ -573,3 +573,258 @@ def _rapid_rapid_id_reject_post_serialize( ) + + + @validate_call + def rapid_republish_response_counts_post( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Starts a fresh background run that republishes every stored user response count. + + Calling it again restarts the run from the beginning. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rapid_republish_response_counts_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def rapid_republish_response_counts_post_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Starts a fresh background run that republishes every stored user response count. + + Calling it again restarts the run from the beginning. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rapid_republish_response_counts_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def rapid_republish_response_counts_post_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Starts a fresh background run that republishes every stored user response count. + + Calling it again restarts the run from the beginning. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._rapid_republish_response_counts_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationProblemDetails", + '401': None, + '403': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _rapid_republish_response_counts_post_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OpenIdConnect' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/rapid/republish-response-counts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/rapidata/api_client/configuration.py b/src/rapidata/api_client/configuration.py index de6c9d550d..cb2c1baee4 100644 --- a/src/rapidata/api_client/configuration.py +++ b/src/rapidata/api_client/configuration.py @@ -382,7 +382,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2026.09.27.1857-67e65da\n"\ + "Version of the API: 2026.09.29.1117-e0b6f6d\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/src/rapidata/api_client/models/create_experiment_endpoint_input.py b/src/rapidata/api_client/models/create_experiment_endpoint_input.py index 6560e0a135..b46dc1a2d4 100644 --- a/src/rapidata/api_client/models/create_experiment_endpoint_input.py +++ b/src/rapidata/api_client/models/create_experiment_endpoint_input.py @@ -19,9 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from rapidata.api_client.models.create_experiment_endpoint_split import CreateExperimentEndpointSplit -from rapidata.api_client.models.experiment_eligibility import ExperimentEligibility -from rapidata.api_client.models.experiment_scope import ExperimentScope -from rapidata.api_client.models.experiment_user_enrollment import ExperimentUserEnrollment from rapidata.api_client.models.feature_flag import FeatureFlag from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -34,14 +31,11 @@ class CreateExperimentEndpointInput(LazyValidatedModel): """ # noqa: E501 name: StrictStr = Field(description="Human-readable name.") description: StrictStr = Field(description="Human-readable description of the hypothesis.") - scope: Optional[ExperimentScope] = Field(default=None, description="Defaults to global. Attached experiments must omit every campaign predicate (campaignTypes, excludedCampaignIds, organizationIds, excludedOrganizationIds).") flags: List[FeatureFlag] - eligibility: Optional[ExperimentEligibility] = Field(default=None, description="Eligibility predicates. Omitted predicates match anything.") - user_enrollment: Optional[ExperimentUserEnrollment] = Field(default=None, description="Defaults to perSession.", alias="userEnrollment") split: CreateExperimentEndpointSplit = Field(description="The traffic split; the salt is generated server-side.") start_at: Optional[datetime] = Field(default=None, description="Start of the experiment window.", alias="startAt") end_at: Optional[datetime] = Field(default=None, description="End of the experiment window.", alias="endAt") - __properties: ClassVar[List[str]] = ["name", "description", "scope", "flags", "eligibility", "userEnrollment", "split", "startAt", "endAt"] + __properties: ClassVar[List[str]] = ["name", "description", "flags", "split", "startAt", "endAt"] # model_config is inherited from LazyValidatedModel @@ -85,17 +79,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_flags: _items.append(_item_flags.to_dict()) _dict['flags'] = _items - # override the default output from pydantic by calling `to_dict()` of eligibility - if self.eligibility: - _dict['eligibility'] = self.eligibility.to_dict() # override the default output from pydantic by calling `to_dict()` of split if self.split: _dict['split'] = self.split.to_dict() - # set to None if user_enrollment (nullable) is None - # and model_fields_set contains the field - if self.user_enrollment is None and "user_enrollment" in self.model_fields_set: - _dict['userEnrollment'] = None - # set to None if start_at (nullable) is None # and model_fields_set contains the field if self.start_at is None and "start_at" in self.model_fields_set: @@ -120,10 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "name": obj.get("name"), "description": obj.get("description"), - "scope": obj.get("scope"), "flags": [FeatureFlag.from_dict(_item) for _item in obj["flags"]] if obj.get("flags") is not None else None, - "eligibility": ExperimentEligibility.from_dict(obj["eligibility"]) if obj.get("eligibility") is not None else None, - "userEnrollment": obj.get("userEnrollment"), "split": CreateExperimentEndpointSplit.from_dict(obj["split"]) if obj.get("split") is not None else None, "startAt": obj.get("startAt"), "endAt": obj.get("endAt") diff --git a/src/rapidata/api_client/models/experiment.py b/src/rapidata/api_client/models/experiment.py index dac67aaf18..d70d804f04 100644 --- a/src/rapidata/api_client/models/experiment.py +++ b/src/rapidata/api_client/models/experiment.py @@ -18,11 +18,8 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.experiment_eligibility import ExperimentEligibility -from rapidata.api_client.models.experiment_scope import ExperimentScope from rapidata.api_client.models.experiment_split import ExperimentSplit from rapidata.api_client.models.experiment_state import ExperimentState -from rapidata.api_client.models.experiment_user_enrollment import ExperimentUserEnrollment from rapidata.api_client.models.feature_flag import FeatureFlag from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -31,23 +28,20 @@ class Experiment(LazyValidatedModel): """ - A serve-time A/B experiment. Every eligible session records its experiment id, name and arm; treatment sessions additionally receive the experiment's feature flags. + A serve-time A/B experiment. Every session it serves records its experiment id, name and arm; treatment sessions additionally receive the experiment's feature flags. """ # noqa: E501 id: StrictStr = Field(description="The unique id of the experiment document.") name: StrictStr = Field(description="Human-readable name.") description: StrictStr = Field(description="Human-readable description of the hypothesis.") state: ExperimentState = Field(description="The lifecycle state.") - scope: ExperimentScope = Field(description="Whether the experiment is evaluated for any matching campaign or only for campaigns attached to it.") flags: List[FeatureFlag] - eligibility: ExperimentEligibility = Field(description="The predicates deciding which sessions are part of the population.") - user_enrollment: ExperimentUserEnrollment = Field(description="How users enter and leave the population.", alias="userEnrollment") split: ExperimentSplit = Field(description="The traffic split and its server-generated salt.") start_at: Optional[datetime] = Field(default=None, description="Outside the [startAt, endAt) window the experiment is treated as inactive.", alias="startAt") end_at: Optional[datetime] = Field(default=None, description="End of the experiment window; the experiment auto-completes afterwards.", alias="endAt") created_by: StrictStr = Field(description="The email of the admin who created the experiment.", alias="createdBy") created_at: datetime = Field(description="When the experiment was created.", alias="createdAt") updated_at: datetime = Field(description="When the experiment was last changed.", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "description", "state", "scope", "flags", "eligibility", "userEnrollment", "split", "startAt", "endAt", "createdBy", "createdAt", "updatedAt"] + __properties: ClassVar[List[str]] = ["id", "name", "description", "state", "flags", "split", "startAt", "endAt", "createdBy", "createdAt", "updatedAt"] # model_config is inherited from LazyValidatedModel @@ -91,9 +85,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_flags: _items.append(_item_flags.to_dict()) _dict['flags'] = _items - # override the default output from pydantic by calling `to_dict()` of eligibility - if self.eligibility: - _dict['eligibility'] = self.eligibility.to_dict() # override the default output from pydantic by calling `to_dict()` of split if self.split: _dict['split'] = self.split.to_dict() @@ -123,10 +114,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "description": obj.get("description"), "state": obj.get("state"), - "scope": obj.get("scope"), "flags": [FeatureFlag.from_dict(_item) for _item in obj["flags"]] if obj.get("flags") is not None else None, - "eligibility": ExperimentEligibility.from_dict(obj["eligibility"]) if obj.get("eligibility") is not None else None, - "userEnrollment": obj.get("userEnrollment"), "split": ExperimentSplit.from_dict(obj["split"]) if obj.get("split") is not None else None, "startAt": obj.get("startAt"), "endAt": obj.get("endAt"), diff --git a/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py b/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py index dd5de2b126..64567eae95 100644 --- a/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py +++ b/src/rapidata/api_client/models/get_benchmark_by_id_endpoint_output.py @@ -35,6 +35,7 @@ class GetBenchmarkByIdEndpointOutput(LazyValidatedModel): description: Optional[StrictStr] = Field(description="Optional plain-text credit for the people or sources behind the benchmark; null when none was supplied.") is_public: StrictBool = Field(description="Whether the benchmark is public.", alias="isPublic") is_published: StrictBool = Field(description="Whether the benchmark is published to the public benchmark repository.", alias="isPublished") + publication_date: Optional[datetime] = Field(default=None, description="Public access starts at this instant; null means private.", alias="publicationDate") created_at: datetime = Field(description="The timestamp when the benchmark was created.", alias="createdAt") owner_id: Optional[UUID] = Field(default=None, description="The benchmark's owner; null unless the caller is platform staff or in the owning organization.", alias="ownerId") owner_mail: Optional[StrictStr] = Field(default=None, description="The owner's mail; null unless the caller is platform staff or in the owning organization.", alias="ownerMail") @@ -45,7 +46,7 @@ class GetBenchmarkByIdEndpointOutput(LazyValidatedModel): fork_status: BenchmarkForkStatus = Field(description="Whether the copy behind a forked benchmark has finished. Always Ready for a benchmark that was not forked; a fork is Forking until its job completes and Failed when the job gave up.", alias="forkStatus") last_updated_at: Optional[datetime] = Field(description="When the benchmark's rankings last changed — the latest vote recording across the leaderboards contributing to its overall; null when none ever received votes.", alias="lastUpdatedAt") prompt_structure: List[PromptSegmentDefinition] = Field(alias="promptStructure") - __properties: ClassVar[List[str]] = ["id", "name", "description", "isPublic", "isPublished", "createdAt", "ownerId", "ownerMail", "organizationId", "initialBoostLevel", "scoreShift", "scoreScale", "forkStatus", "lastUpdatedAt", "promptStructure"] + __properties: ClassVar[List[str]] = ["id", "name", "description", "isPublic", "isPublished", "publicationDate", "createdAt", "ownerId", "ownerMail", "organizationId", "initialBoostLevel", "scoreShift", "scoreScale", "forkStatus", "lastUpdatedAt", "promptStructure"] # model_config is inherited from LazyValidatedModel @@ -94,6 +95,11 @@ def to_dict(self) -> Dict[str, Any]: if self.description is None and "description" in self.model_fields_set: _dict['description'] = None + # set to None if publication_date (nullable) is None + # and model_fields_set contains the field + if self.publication_date is None and "publication_date" in self.model_fields_set: + _dict['publicationDate'] = None + # set to None if owner_id (nullable) is None # and model_fields_set contains the field if self.owner_id is None and "owner_id" in self.model_fields_set: @@ -136,6 +142,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "isPublic": obj.get("isPublic"), "isPublished": obj.get("isPublished"), + "publicationDate": obj.get("publicationDate"), "createdAt": obj.get("createdAt"), "ownerId": obj.get("ownerId"), "ownerMail": obj.get("ownerMail"), diff --git a/src/rapidata/api_client/models/i_campaign_filter_campaign_cooldown_filter.py b/src/rapidata/api_client/models/i_campaign_filter_campaign_cooldown_filter.py index 927513bd35..e7005d2031 100644 --- a/src/rapidata/api_client/models/i_campaign_filter_campaign_cooldown_filter.py +++ b/src/rapidata/api_client/models/i_campaign_filter_campaign_cooldown_filter.py @@ -16,7 +16,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from rapidata.api_client.models.i_cooldown_duration import ICooldownDuration from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -29,7 +29,8 @@ class ICampaignFilterCampaignCooldownFilter(LazyValidatedModel): """ # noqa: E501 t: StrictStr = Field(alias="_t") cooldown: ICooldownDuration - __properties: ClassVar[List[str]] = ["_t", "cooldown"] + key: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["_t", "cooldown", "key"] @field_validator('t') def t_validate_enum(cls, value): @@ -76,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of cooldown if self.cooldown: _dict['cooldown'] = self.cooldown.to_dict() + # set to None if key (nullable) is None + # and model_fields_set contains the field + if self.key is None and "key" in self.model_fields_set: + _dict['key'] = None + return _dict @classmethod @@ -89,7 +95,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "_t": obj.get("_t"), - "cooldown": ICooldownDuration.from_dict(obj["cooldown"]) if obj.get("cooldown") is not None else None + "cooldown": ICooldownDuration.from_dict(obj["cooldown"]) if obj.get("cooldown") is not None else None, + "key": obj.get("key") } try: _obj = cls.model_validate(_data) diff --git a/src/rapidata/api_client/models/i_referee_info_naive_referee_info.py b/src/rapidata/api_client/models/i_referee_info_naive_referee_info.py index 7d790c1c1d..9615578baf 100644 --- a/src/rapidata/api_client/models/i_referee_info_naive_referee_info.py +++ b/src/rapidata/api_client/models/i_referee_info_naive_referee_info.py @@ -27,9 +27,9 @@ class IRefereeInfoNaiveRefereeInfo(LazyValidatedModel): IRefereeInfoNaiveRefereeInfo """ # noqa: E501 t: StrictStr = Field(alias="_t") - response_amount_threshold: Optional[StrictInt] = Field(default=None, alias="responseAmountThreshold") - serve_threshold: Optional[StrictInt] = Field(default=None, alias="serveThreshold") - __properties: ClassVar[List[str]] = ["_t", "responseAmountThreshold", "serveThreshold"] + acceptance_limit: Optional[StrictInt] = Field(default=None, alias="acceptanceLimit") + completion_threshold: Optional[StrictInt] = Field(default=None, alias="completionThreshold") + __properties: ClassVar[List[str]] = ["_t", "acceptanceLimit", "completionThreshold"] @field_validator('t') def t_validate_enum(cls, value): @@ -73,10 +73,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if serve_threshold (nullable) is None + # set to None if completion_threshold (nullable) is None # and model_fields_set contains the field - if self.serve_threshold is None and "serve_threshold" in self.model_fields_set: - _dict['serveThreshold'] = None + if self.completion_threshold is None and "completion_threshold" in self.model_fields_set: + _dict['completionThreshold'] = None return _dict @@ -91,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "_t": obj.get("_t"), - "responseAmountThreshold": obj.get("responseAmountThreshold"), - "serveThreshold": obj.get("serveThreshold") + "acceptanceLimit": obj.get("acceptanceLimit"), + "completionThreshold": obj.get("completionThreshold") } try: _obj = cls.model_validate(_data) diff --git a/src/rapidata/api_client/models/query_benchmarks_endpoint_output.py b/src/rapidata/api_client/models/query_benchmarks_endpoint_output.py index dad9bbcb3b..5368b62e08 100644 --- a/src/rapidata/api_client/models/query_benchmarks_endpoint_output.py +++ b/src/rapidata/api_client/models/query_benchmarks_endpoint_output.py @@ -32,11 +32,12 @@ class QueryBenchmarksEndpointOutput(LazyValidatedModel): is_managed: StrictBool = Field(description="Whether the benchmark is managed.", alias="isManaged") is_public: StrictBool = Field(description="Whether the benchmark is public.", alias="isPublic") is_published: StrictBool = Field(description="Whether the benchmark is published to the public benchmark repository.", alias="isPublished") + publication_date: Optional[datetime] = Field(default=None, description="Public access starts at this instant; null means private.", alias="publicationDate") created_at: datetime = Field(description="The timestamp when the benchmark was created.", alias="createdAt") owner_mail: StrictStr = Field(description="The mail of the customer owning the benchmark.", alias="ownerMail") organization_id: StrictStr = Field(description="The id of the organization that owns the entity.", alias="organizationId") last_updated_at: Optional[datetime] = Field(description="When the benchmark's rankings last changed — the latest vote recording across the leaderboards contributing to its overall; null when none ever received votes.", alias="lastUpdatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "isPublished", "createdAt", "ownerMail", "organizationId", "lastUpdatedAt"] + __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "isPublished", "publicationDate", "createdAt", "ownerMail", "organizationId", "lastUpdatedAt"] # model_config is inherited from LazyValidatedModel @@ -73,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if publication_date (nullable) is None + # and model_fields_set contains the field + if self.publication_date is None and "publication_date" in self.model_fields_set: + _dict['publicationDate'] = None + # set to None if last_updated_at (nullable) is None # and model_fields_set contains the field if self.last_updated_at is None and "last_updated_at" in self.model_fields_set: @@ -95,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isManaged": obj.get("isManaged"), "isPublic": obj.get("isPublic"), "isPublished": obj.get("isPublished"), + "publicationDate": obj.get("publicationDate"), "createdAt": obj.get("createdAt"), "ownerMail": obj.get("ownerMail"), "organizationId": obj.get("organizationId"), diff --git a/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py b/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py index 626fb1c242..b6995ec443 100644 --- a/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py +++ b/src/rapidata/api_client/models/query_managed_benchmarks_endpoint_output.py @@ -32,11 +32,12 @@ class QueryManagedBenchmarksEndpointOutput(LazyValidatedModel): is_managed: StrictBool = Field(description="Whether the benchmark is managed.", alias="isManaged") is_public: StrictBool = Field(description="Whether the benchmark is public.", alias="isPublic") is_published: StrictBool = Field(description="Whether the benchmark is published to the public benchmark repository.", alias="isPublished") + publication_date: Optional[datetime] = Field(default=None, description="Public access starts at this instant; null means private.", alias="publicationDate") created_at: datetime = Field(description="The timestamp when the benchmark was created.", alias="createdAt") owner_mail: StrictStr = Field(description="The mail of the customer owning the benchmark.", alias="ownerMail") organization_id: StrictStr = Field(description="The id of the organization that owns the entity.", alias="organizationId") last_updated_at: Optional[datetime] = Field(description="When the benchmark's rankings last changed — the latest vote recording across the leaderboards contributing to its overall; null when none ever received votes.", alias="lastUpdatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "isPublished", "createdAt", "ownerMail", "organizationId", "lastUpdatedAt"] + __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "isPublished", "publicationDate", "createdAt", "ownerMail", "organizationId", "lastUpdatedAt"] # model_config is inherited from LazyValidatedModel @@ -73,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if publication_date (nullable) is None + # and model_fields_set contains the field + if self.publication_date is None and "publication_date" in self.model_fields_set: + _dict['publicationDate'] = None + # set to None if last_updated_at (nullable) is None # and model_fields_set contains the field if self.last_updated_at is None and "last_updated_at" in self.model_fields_set: @@ -95,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isManaged": obj.get("isManaged"), "isPublic": obj.get("isPublic"), "isPublished": obj.get("isPublished"), + "publicationDate": obj.get("publicationDate"), "createdAt": obj.get("createdAt"), "ownerMail": obj.get("ownerMail"), "organizationId": obj.get("organizationId"), diff --git a/src/rapidata/api_client/models/query_published_benchmarks_endpoint_output.py b/src/rapidata/api_client/models/query_published_benchmarks_endpoint_output.py index 173a933b02..ea81033d17 100644 --- a/src/rapidata/api_client/models/query_published_benchmarks_endpoint_output.py +++ b/src/rapidata/api_client/models/query_published_benchmarks_endpoint_output.py @@ -32,11 +32,12 @@ class QueryPublishedBenchmarksEndpointOutput(LazyValidatedModel): is_managed: StrictBool = Field(description="Whether the benchmark is managed.", alias="isManaged") is_public: StrictBool = Field(description="Whether the benchmark is public.", alias="isPublic") is_published: StrictBool = Field(description="Whether the benchmark is published to the public benchmark repository.", alias="isPublished") + publication_date: Optional[datetime] = Field(default=None, description="Public access starts at this instant; null means private.", alias="publicationDate") created_at: datetime = Field(description="The timestamp when the benchmark was created.", alias="createdAt") owner_mail: Optional[StrictStr] = Field(default=None, description="The owner's mail; null unless the caller is platform staff or in the owning organization.", alias="ownerMail") organization_id: Optional[StrictStr] = Field(default=None, description="The owner's organization; null unless the caller is platform staff or in the owning organization.", alias="organizationId") last_updated_at: Optional[datetime] = Field(description="When the benchmark's rankings last changed — the latest vote recording across the leaderboards contributing to its overall; null when none ever received votes.", alias="lastUpdatedAt") - __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "isPublished", "createdAt", "ownerMail", "organizationId", "lastUpdatedAt"] + __properties: ClassVar[List[str]] = ["id", "name", "isManaged", "isPublic", "isPublished", "publicationDate", "createdAt", "ownerMail", "organizationId", "lastUpdatedAt"] # model_config is inherited from LazyValidatedModel @@ -73,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if publication_date (nullable) is None + # and model_fields_set contains the field + if self.publication_date is None and "publication_date" in self.model_fields_set: + _dict['publicationDate'] = None + # set to None if owner_mail (nullable) is None # and model_fields_set contains the field if self.owner_mail is None and "owner_mail" in self.model_fields_set: @@ -105,6 +111,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isManaged": obj.get("isManaged"), "isPublic": obj.get("isPublic"), "isPublished": obj.get("isPublished"), + "publicationDate": obj.get("publicationDate"), "createdAt": obj.get("createdAt"), "ownerMail": obj.get("ownerMail"), "organizationId": obj.get("organizationId"), diff --git a/src/rapidata/api_client/models/update_benchmark_endpoint_input.py b/src/rapidata/api_client/models/update_benchmark_endpoint_input.py index 65d028a352..7119163dd7 100644 --- a/src/rapidata/api_client/models/update_benchmark_endpoint_input.py +++ b/src/rapidata/api_client/models/update_benchmark_endpoint_input.py @@ -15,6 +15,7 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from pydantic import ValidationError @@ -28,13 +29,14 @@ class UpdateBenchmarkEndpointInput(LazyValidatedModel): """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The new name of the benchmark.") description: Optional[StrictStr] = Field(default=None, description="Optional plain-text credit for the people or sources behind the benchmark. Limited to 2000 characters; send null to clear it, omit to leave it unchanged.") - is_public: Optional[StrictBool] = Field(default=None, description="Whether the benchmark should be public.", alias="isPublic") + is_public: Optional[StrictBool] = Field(default=None, description="True makes public now; false makes private. Do not combine with publicationDate.", alias="isPublic") is_published: Optional[StrictBool] = Field(default=None, description="Whether the benchmark should be surfaced in the public benchmark repository.", alias="isPublished") + publication_date: Optional[datetime] = Field(default=None, description="Public access starts at this instant; null makes private, omission leaves it unchanged. Do not combine with isPublic.", alias="publicationDate") initial_boost_level: Optional[StrictInt] = Field(default=None, description="Initial boost level applied to the campaign of every run created from this benchmark. Pass null to clear the override and fall back to the benchmark default.", alias="initialBoostLevel") min_assets_per_prompt: Optional[StrictInt] = Field(default=None, description="Optional submission quality gate. Set to at least 2 to warn on submit for prompts with 1..N-1 samples; pass null to clear the gate; omit to leave it unchanged.", alias="minAssetsPerPrompt") score_shift: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Additive offset applied to displayed scores on the benchmark's overall scoreboard.", alias="scoreShift") score_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Multiplicative factor applied to displayed scores (relative to the Bradley-Terry center) on the overall scoreboard of this benchmark. Must be strictly positive.", alias="scoreScale") - __properties: ClassVar[List[str]] = ["name", "description", "isPublic", "isPublished", "initialBoostLevel", "minAssetsPerPrompt", "scoreShift", "scoreScale"] + __properties: ClassVar[List[str]] = ["name", "description", "isPublic", "isPublished", "publicationDate", "initialBoostLevel", "minAssetsPerPrompt", "scoreShift", "scoreScale"] # model_config is inherited from LazyValidatedModel @@ -71,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if publication_date (nullable) is None + # and model_fields_set contains the field + if self.publication_date is None and "publication_date" in self.model_fields_set: + _dict['publicationDate'] = None + # set to None if initial_boost_level (nullable) is None # and model_fields_set contains the field if self.initial_boost_level is None and "initial_boost_level" in self.model_fields_set: @@ -97,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "isPublic": obj.get("isPublic"), "isPublished": obj.get("isPublished"), + "publicationDate": obj.get("publicationDate"), "initialBoostLevel": obj.get("initialBoostLevel"), "minAssetsPerPrompt": obj.get("minAssetsPerPrompt"), "scoreShift": obj.get("scoreShift"), diff --git a/src/rapidata/api_client/models/update_experiment_endpoint_input.py b/src/rapidata/api_client/models/update_experiment_endpoint_input.py index ab70abe5f5..2544d43320 100644 --- a/src/rapidata/api_client/models/update_experiment_endpoint_input.py +++ b/src/rapidata/api_client/models/update_experiment_endpoint_input.py @@ -18,7 +18,6 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from rapidata.api_client.models.experiment_eligibility import ExperimentEligibility from rapidata.api_client.models.feature_flag import FeatureFlag from pydantic import ValidationError from rapidata.api_client.lazy_model import LazyValidatedModel @@ -30,11 +29,10 @@ class UpdateExperimentEndpointInput(LazyValidatedModel): UpdateExperimentEndpointInput """ # noqa: E501 description: Optional[StrictStr] = Field(default=None, description="Human-readable description of the hypothesis.") - eligibility: Optional[ExperimentEligibility] = Field(default=None, description="Replaces the whole eligibility object when provided.") treatment_bps: Optional[StrictInt] = Field(default=None, description="Treatment share in basis points (0–10000).", alias="treatmentBps") end_at: Optional[datetime] = Field(default=None, description="End of the experiment window.", alias="endAt") flags: Optional[List[FeatureFlag]] = None - __properties: ClassVar[List[str]] = ["description", "eligibility", "treatmentBps", "endAt", "flags"] + __properties: ClassVar[List[str]] = ["description", "treatmentBps", "endAt", "flags"] # model_config is inherited from LazyValidatedModel @@ -71,9 +69,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of eligibility - if self.eligibility: - _dict['eligibility'] = self.eligibility.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in flags (list) _items = [] if self.flags: @@ -114,7 +109,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _data = { "description": obj.get("description"), - "eligibility": ExperimentEligibility.from_dict(obj["eligibility"]) if obj.get("eligibility") is not None else None, "treatmentBps": obj.get("treatmentBps"), "endAt": obj.get("endAt"), "flags": [FeatureFlag.from_dict(_item) for _item in obj["flags"]] if obj.get("flags") is not None else None diff --git a/src/rapidata/api_client_README.md b/src/rapidata/api_client_README.md index 2f6a86179d..c986085e8c 100644 --- a/src/rapidata/api_client_README.md +++ b/src/rapidata/api_client_README.md @@ -3,7 +3,7 @@ The API for the Rapidata Asset service The `rapidata.api_client` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 2026.09.27.1857-67e65da +- API version: 2026.09.29.1117-e0b6f6d - Package version: 1.0.0 - Generator version: 7.23.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -98,6 +98,7 @@ Class | Method | HTTP request | Description *AudienceApi* | [**audience_inactivity_sync_sync_id_get**](rapidata/api_client/docs/AudienceApi.md#audience_inactivity_sync_sync_id_get) | **GET** /audience/inactivity-sync/{syncId} | Returns the audience inactivity sync with the given id. *AudienceApi* | [**audience_post**](rapidata/api_client/docs/AudienceApi.md#audience_post) | **POST** /audience | Creates a new empty audience. *AudienceApi* | [**audience_reconcile_user_counts_post**](rapidata/api_client/docs/AudienceApi.md#audience_reconcile_user_counts_post) | **POST** /audience/reconcile-user-counts | Enqueues a background job that reconciles audience-row state derived from audience_state_counts. +*AudienceApi* | [**audience_republish_user_states_post**](rapidata/api_client/docs/AudienceApi.md#audience_republish_user_states_post) | **POST** /audience/republish-user-states | Enqueues a background job that republishes every externally synced audience member's current state. *AudienceApi* | [**audience_state_recalculation_recalculation_id_get**](rapidata/api_client/docs/AudienceApi.md#audience_state_recalculation_recalculation_id_get) | **GET** /audience/state-recalculation/{recalculationId} | Returns the audience state recalculation with the given id. *AudienceApi* | [**audiences_get**](rapidata/api_client/docs/AudienceApi.md#audiences_get) | **GET** /audiences | Queries the audiences visible to the caller: owned, shared with them, or both. *BatchUploadApi* | [**asset_batch_upload_batch_upload_id_abort_post**](rapidata/api_client/docs/BatchUploadApi.md#asset_batch_upload_batch_upload_id_abort_post) | **POST** /asset/batch-upload/{batchUploadId}/abort | Aborts the specified batch upload. @@ -196,6 +197,7 @@ Class | Method | HTTP request | Description *CampaignApi* | [**campaign_campaign_id_resume_post**](rapidata/api_client/docs/CampaignApi.md#campaign_campaign_id_resume_post) | **POST** /campaign/{campaignId}/resume | Resumes the specified campaign. *CampaignApi* | [**campaign_monitor_get**](rapidata/api_client/docs/CampaignApi.md#campaign_monitor_get) | **GET** /campaign/monitor | Exercises the rapid-bag pipeline with a synthetic user profile so the health of the campaign monitoring path can be probed externally. *CampaignApi* | [**campaign_program_post**](rapidata/api_client/docs/CampaignApi.md#campaign_program_post) | **POST** /campaign/program | Creates a program campaign from the given stream program. +*CampaignApi* | [**campaign_republish_user_campaign_sessions_post**](rapidata/api_client/docs/CampaignApi.md#campaign_republish_user_campaign_sessions_post) | **POST** /campaign/republish-user-campaign-sessions | Starts a background run that republishes the session count of every user and campaign. *CampaignApi* | [**campaigns_get**](rapidata/api_client/docs/CampaignApi.md#campaigns_get) | **GET** /campaigns | Queries campaigns with optional filtering, sorting, and pagination. *CapabilitiesApi* | [**capabilities_capability_grantees_get**](rapidata/api_client/docs/CapabilitiesApi.md#capabilities_capability_grantees_get) | **GET** /capabilities/{capability}/grantees | Lists the organizations granted a capability, one cursor page at a time. *CapabilitiesApi* | [**customers_customer_id_capabilities_get**](rapidata/api_client/docs/CapabilitiesApi.md#customers_customer_id_capabilities_get) | **GET** /customers/{customerId}/capabilities | Lists the capabilities a customer holds. @@ -383,6 +385,7 @@ Class | Method | HTTP request | Description *RankingFlowItemApi* | [**flow_ranking_item_flow_item_id_vote_matrix_get**](rapidata/api_client/docs/RankingFlowItemApi.md#flow_ranking_item_flow_item_id_vote_matrix_get) | **GET** /flow/ranking/item/{flowItemId}/vote-matrix | Retrieves the pairwise vote matrix for a completed flow item. *RapidApi* | [**rapid_compare_ab_summary_correlation_id_recalculate_post**](rapidata/api_client/docs/RapidApi.md#rapid_compare_ab_summary_correlation_id_recalculate_post) | **POST** /rapid/compare-ab-summary/{correlationId}/recalculate | Recalculates the compare AB summary counters of a correlation from scratch. *RapidApi* | [**rapid_rapid_id_reject_post**](rapidata/api_client/docs/RapidApi.md#rapid_rapid_id_reject_post) | **POST** /rapid/{rapidId}/reject | Rejects a completed rapid, marking its results as invalid. +*RapidApi* | [**rapid_republish_response_counts_post**](rapidata/api_client/docs/RapidApi.md#rapid_republish_response_counts_post) | **POST** /rapid/republish-response-counts | Starts a fresh background run that republishes every stored user response count. *RapidataIdentityAPIApi* | [**root_get**](rapidata/api_client/docs/RapidataIdentityAPIApi.md#root_get) | **GET** / | *ReconciliationApi* | [**billing_reconcile_post**](rapidata/api_client/docs/ReconciliationApi.md#billing_reconcile_post) | **POST** /billing/reconcile | Starts reconciliation for a single billing item, all items for a customer, or all items in a billing group. *ReconciliationApi* | [**billing_reconciliation_bulk_bulk_reconciliation_id_get**](rapidata/api_client/docs/ReconciliationApi.md#billing_reconciliation_bulk_bulk_reconciliation_id_get) | **GET** /billing/reconciliation/bulk/{bulkReconciliationId} | Returns the aggregated status and results of all reconciliation jobs in a bulk operation. @@ -621,16 +624,8 @@ Class | Method | HTTP request | Description - [ExampleVisibility](rapidata/api_client/docs/ExampleVisibility.md) - [ExistingAssetInput](rapidata/api_client/docs/ExistingAssetInput.md) - [Experiment](rapidata/api_client/docs/Experiment.md) - - [ExperimentAssetKind](rapidata/api_client/docs/ExperimentAssetKind.md) - - [ExperimentCampaignType](rapidata/api_client/docs/ExperimentCampaignType.md) - - [ExperimentContextRequirement](rapidata/api_client/docs/ExperimentContextRequirement.md) - - [ExperimentEligibility](rapidata/api_client/docs/ExperimentEligibility.md) - - [ExperimentRapidType](rapidata/api_client/docs/ExperimentRapidType.md) - - [ExperimentScope](rapidata/api_client/docs/ExperimentScope.md) - [ExperimentSplit](rapidata/api_client/docs/ExperimentSplit.md) - [ExperimentState](rapidata/api_client/docs/ExperimentState.md) - - [ExperimentUserEligibility](rapidata/api_client/docs/ExperimentUserEligibility.md) - - [ExperimentUserEnrollment](rapidata/api_client/docs/ExperimentUserEnrollment.md) - [ExternalAppId](rapidata/api_client/docs/ExternalAppId.md) - [ExternalServiceKind](rapidata/api_client/docs/ExternalServiceKind.md) - [FaucetInputBindingInput](rapidata/api_client/docs/FaucetInputBindingInput.md) From 3a1b906219bfdc8c66ceacde4e8ea5760a60f84f Mon Sep 17 00:00:00 2001 From: RapidPoseidon Date: Tue, 29 Sep 2026 11:48:48 +0000 Subject: [PATCH 2/2] fix(experiment): drop removed scope and enrollment fields Co-Authored-By: Claude Opus 5.5 Co-Authored-By: manuel@rapidata.ai <49093103+manueltollis@users.noreply.github.com> --- .../rapidata_client/experiment/experiment_manager.py | 11 ++--------- .../experiment/test_experiment_manager.py | 5 ++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/rapidata/rapidata_client/experiment/experiment_manager.py b/src/rapidata/rapidata_client/experiment/experiment_manager.py index 5b0121a700..1dab7c0434 100644 --- a/src/rapidata/rapidata_client/experiment/experiment_manager.py +++ b/src/rapidata/rapidata_client/experiment/experiment_manager.py @@ -4,9 +4,6 @@ from typing import TYPE_CHECKING from rapidata.rapidata_client.config import logger, tracer -from rapidata.api_client.models.experiment_user_enrollment import ( - ExperimentUserEnrollment, -) if TYPE_CHECKING: from rapidata.service.openapi_service import OpenAPIService @@ -27,7 +24,7 @@ class Experiment: class ExperimentManager: - """Internal: creates attached-scope experiments and launches jobs under them. + """Internal: creates experiments and launches jobs under them. Not part of the public SDK surface — Rapidata-internal, undocumented. """ @@ -42,10 +39,9 @@ def create( name: str, treatment_bps: int = 5000, flags: list[FeatureFlag] | None = None, - user_enrollment: ExperimentUserEnrollment = ExperimentUserEnrollment.STICKY, description: str = "", ) -> Experiment: - """Creates and activates an attached-scope experiment. + """Creates and activates an experiment. The experiment is created in the draft state and immediately activated, so it is already serving by the time this returns — meant to be paired with @@ -65,16 +61,13 @@ def create( from rapidata.api_client.models.change_experiment_state_endpoint_state_action import ( ChangeExperimentStateEndpointStateAction, ) - from rapidata.api_client.models.experiment_scope import ExperimentScope api = self._openapi_service.campaign.experiment_api created = api.campaign_experiments_post( create_experiment_endpoint_input=CreateExperimentEndpointInput( name=name, description=description, - scope=ExperimentScope.ATTACHED, flags=flags or [], - userEnrollment=user_enrollment, split=CreateExperimentEndpointSplit(treatmentBps=treatment_bps), ) ) diff --git a/tests/rapidata_client/experiment/test_experiment_manager.py b/tests/rapidata_client/experiment/test_experiment_manager.py index b88dea5824..0d00429569 100644 --- a/tests/rapidata_client/experiment/test_experiment_manager.py +++ b/tests/rapidata_client/experiment/test_experiment_manager.py @@ -1,6 +1,6 @@ """Tests for the internal ExperimentManager: create() and run_experiment(). -create() must post scope=attached and then activate the returned id. +create() must post the split and then activate the returned id. run_experiment() must reject an empty experiment_id and otherwise delegate to the audience's job creation, passing the experiment id through. """ @@ -25,7 +25,7 @@ def _make_manager() -> tuple[ExperimentManager, MagicMock]: return manager, openapi_service -def test_create_posts_attached_scope_then_activates_by_id(): +def test_create_posts_split_then_activates_by_id(): manager, openapi_service = _make_manager() api = openapi_service.campaign.experiment_api @@ -40,7 +40,6 @@ def test_create_posts_attached_scope_then_activates_by_id(): post_kwargs = api.campaign_experiments_post.call_args.kwargs posted_input = post_kwargs["create_experiment_endpoint_input"] - assert posted_input.scope == "attached" assert posted_input.split.treatment_bps == 3000 state_args = api.campaign_experiments_experiment_id_state_post.call_args.args