Work with the BI Pixie API
The BI Pixie API follows the conventions of the Microsoft Fabric REST API, so a client written for Fabric needs no new habits.
Follow a long-running operation
A call that starts work answers 202 Accepted with three headers, Location, x-ms-operation-id and Retry-After, and a body that repeats the operation's id and address for a client that shows no headers. Ask for the operation's state until its status is Succeeded, Failed or Canceled, then ask for its result. Operations are kept for 7 days.
- List operations
- Get the state of an operation
- Get the result of an operation
- Cancel a benchmark run or an A/B run
Read a list page by page
A list answers value, and continuationToken with continuationUri when there is another page. Both are absent on the last page.
Errors
Every refusal is an ErrorResponse. errorCode is the stable contract. message is written for people and can change. requestId is also sent as the x-ms-request-id header.
| Field | Type | Always present | Description |
|---|---|---|---|
errorCode | string | Yes | Which refusal this is: one of the error codes below. |
message | string | Yes | |
isRetriable | boolean | No | |
moreDetails | array of ErrorDetail | No | Further details of the refusal, in order. Empty unless a refusal says what the request can choose between. |
errorCode | string | Yes | AiProviderChoice: one saved AI provider the request can name as providerId, when more than one could answer and the request named none. The items come in the order of AI setup. message is the saved AI provider's name and the model it answers with, and relatedResource.resourceId is the value to send as providerId. One of AiProviderChoice. |
message | string | Yes | |
relatedResource | object | No | |
resourceId | string | No | |
resourceType | string | No | One of AiProvider. |
relatedResource | object or null | No | |
resourceId | string | No | |
resourceType | string | No | |
parameters | array of object | No | |
name | string | Yes | |
value | string | Yes | |
requestId | string (uuid) | Yes |
Error codes
Each code keeps its meaning once published. New codes can be added over time, and a code is never reused.
| HTTP | Code | Means |
|---|---|---|
| 400 | InvalidRequest | The request is not well formed: a body, a field or a parameter is missing or is not what the route takes. The message names it. |
| 400 | InvalidPreview | The preview named is not available: it is past its 24 hours, was made for another item or another kind of change, or was already applied and that apply still stands. |
| 400 | PayloadTooLarge | The body is larger than the route accepts. |
| 400 | BenchmarkQuestionsMissing | A benchmark run was asked for with no saved questions to ask. |
| 400 | InvalidAnswers | The answers sent for a benchmark run that waits for its answers are not well formed: an answer is longer than 32 KB, a DAX query longer than 4,000 characters, model longer than 100 characters, or no answer matches a question the run handed out. The message names it, and nothing was taken. |
| 400 | OperationNotSupportedForItem | The item is not one this call applies to, such as a schedule BI Pixie maintains itself. |
| 401 | Unauthorized | No token was sent, or the token could not be read or verified. |
| 401 | TokenExpired | The token has expired. Get a new one and send the call again. |
| 401 | InsufficientScopes | The token does not carry BIPixie.ReadWrite.All, the permission every call needs. |
| 401 | AppOnlyTokenNotSupported | The token belongs to an application, not to a person. The API acts as a signed-in person only. |
| 403 | UserNotRegistered | The signed-in person is not a user of any BI Pixie account. Signing in to the portal once registers them. |
| 403 | JoinRequested | The signed-in person asked, from BI Pixie in an AI app, to join their organization's BI Pixie account, and the request waits for an account admin. BI Pixie emails them when an admin answers. |
| 403 | AccountNotActive | The account is suspended, deactivated or not yet active, so it can start no work. |
| 403 | AdminRoleRequired | The call is for an account admin, and the signed-in person is a member. |
| 403 | BusinessUserNotAllowed | The signed-in person is a Business user, who can ask BI Pixie, rate answers and send or answer validation requests, and nothing else. |
| 403 | FeatureNotInPlan | The plan does not include what was asked for. The message names it. |
| 403 | FeatureTurnedOff | An administrator of the account turned off the feature this call reaches. Two features answer this: with Add Pixies off, every call that adds Pixies answers it, while removing Pixies still works; with AI features off, every AI Readiness, benchmark, A/B test and data agent route answers it. Canceling an operation that is already running still works. Either stays this way until an administrator turns the feature on in Account settings. |
| 403 | ApiAccessTurnedOff | An administrator of the account turned off Scripts and AI agents in Account settings, so BI Pixie refuses every call through the API for everyone in the account, administrators included. It stays this way until an administrator turns it on again, and the next call after that is served. |
| 403 | HostedQueriesTurnedOff | The account owner turned off queries through BI Pixie's hosted connector. Semantic model context and the benchmark still work, and the local connector still runs queries. |
| 403 | ContextMapOffForAiApps | An administrator of the account turned off the Context Map for AI apps in Account settings. The Context Map pages in the BI Pixie portal and in Microsoft Fabric still work. |
| 403 | LicenseNotYours | The license named is not one the signed-in person may act under. |
| 403 | TrackedItemLimitReached | The call would claim more tracked items than the account has left: either none is left, or the call needs more than are left, such as a benchmark run answered by a new data agent, which claims the data agent and the item it reads. |
| 403 | LicenseTrackedItemLimitReached | The license has used every tracked item it may hold, and this call would claim one. |
| 403 | FabricConsentRequired | The signed-in person has not granted BI Pixie the Fabric permission the call needs. The consentUrl parameter is the portal page where they grant it. |
| 403 | FabricAccessDenied | The signed-in person's Power BI account does not have access to the workspace or the item, or Fabric refused to list their workspaces when BI Pixie set up the account's processing region. The reason parameter says which when it is not the item. |
| 403 | AccessDenied | The answer or the validation request belongs to another person, so the signed-in person cannot open it or change it. |
| 403 | RatingsTurnedOff | An administrator of the account turned off ratings and validation in AI apps, so no answer reference is given, no rating can be saved or read, and no validation request can be sent. |
| 404 | WorkspaceNotFound | No workspace with this id is visible to the signed-in person. |
| 404 | ItemNotFound | No item with this id is visible to the signed-in person in this workspace, or it is not of the type the route takes. |
| 404 | AssessmentNotFound | The account holds no assessment by this id for this item, or none at all when the call needs the latest one. |
| 404 | RunNotFound | The account holds no benchmark run by this id. |
| 404 | AbTestNotFound | The account holds no A/B test by this id. It may have been deleted. |
| 404 | OperationNotFound | No operation by this id was started by this account in the last 7 days, or the id is not an apply of this item when a revert names one. |
| 404 | RunCodeNotFound | No benchmark run you prepared has this code: it is unknown, belongs to someone else, passed its day, or its run was stopped. All four read alike. |
| 404 | ScheduleNotFound | The license holds no schedule by this id. |
| 404 | AiProviderNotFound | The account has no saved AI by this id. It may have been removed, or replaced when another AI was made the one BI Pixie writes with. |
| 404 | AiCredentialNotFound | The account has no saved credential by this id. It is removed once no saved AI uses it. |
| 404 | AiAnswerNotFound | BI Pixie does not know this answer. Its reference is wrong, or the 24 hours in which an answer can be rated or sent for validation have passed. Reading a rating also answers this when the signed-in person has not rated the answer. |
| 404 | ValidationRequestNotFound | The account has no validation request by this id that the signed-in person can see. |
| 409 | RunInClaudeApp | Side B of this A/B test is answered in your own Claude app, so the API does not start its run. Run it from the A/B test's page in BI Pixie, which gives you the sentence to copy into Claude. |
| 409 | OperationInProgress | Work on this item is already running, or the operation asked about has not finished. The message names the operation, and Retry-After says when to ask again. |
| 409 | OperationHasNoResult | The operation failed or was canceled, so it has no result. Its state carries the reason. |
| 409 | ResultNotReady | The A/B run has not finished, so its comparison is not available yet. Reading the run says where it is, and the call can be sent again after Retry-After. |
| 409 | QuestionsNotReady | A benchmark run that waits for its answers is still preparing its questions. The call can be sent again after Retry-After. |
| 409 | RunNotAwaitingAnswers | The benchmark run is not waiting for answers: its answers were already taken, or it has ended. Reading the operation says where it is. When the run has ended, the status parameter is ended and the endReason parameter says why. An endReason of could_not_start means the questions could not be prepared. When the Fabric capacity of the semantic model was the cause, an endDetail parameter says which: capacity_paused when the capacity is paused, or capacity_busy when it is too busy. endDetail is absent whenever there is no such cause. |
| 409 | QuestionNotCurrent | The answer names a question that is not the one waiting for an answer, and nothing was taken. parameters names the question that is. |
| 409 | AnswerKeyClosed | A benchmark run you started is waiting for you to send its answers, so BI Pixie does not show you expected answers until those answers arrive, the run ends, or its hour passes. This covers the saved benchmark questions, a scored run, an A/B test run's comparison, and an operation's result. Reading the operation of the waiting run says when its answers are due. |
| 409 | ValidationRequestOpenLimitReached | The signed-in person already has as many open validation requests as the account allows. The count parameter is that number. One of them has to be answered or withdrawn first. |
| 409 | ValidationRequestDailyLimitReached | The signed-in person has sent as many validation requests today as the account allows in a day. The count parameter is that number. |
| 409 | ValidationRequestNotOpen | The validation request was already answered, withdrawn or expired, so it can no longer be changed. |
| 409 | ValidationRequestAlreadyOpen | The signed-in person already asked for a validation of this answer. The openRequestId parameter is that validation request. |
| 409 | NoValidatorAvailable | No one in the account can take a validation request: it has no validator and no active administrator other than the sender. |
| 403 | ValidationNotAllowed | The signed-in person is not one of the people an administrator of the account chose to ask for validation. Administrators can always ask. An administrator can name the person, or let everyone in the account ask, on the Team page. |
| 409 | ValidationRequestHasNoQuery | The validation request was sent without a query, so BI Pixie has no query to run and no live rows to show. Sending the call again changes nothing. |
| 409 | StoreNotSupported | The license keeps its data in your organization's own storage account, where ratings and validation requests from AI apps cannot be saved. |
| 409 | BenchmarkChangedSinceRead | The semantic model's benchmark questions were saved after the version the request names, by a person in BI Pixie, by a validator adding a checked question, or by another call, so nothing was saved. Read the saved benchmark questions again, make the change to what that read answers, and save it with the version it answers. Sending the same request again changes nothing. |
| 409 | ScheduleConflict | The item is already on another schedule of the license, or the schedule belongs to another license. The message names the schedule. |
| 409 | AiProviderConflict | The change does not fit the account's saved AIs as they stand, and nothing was saved. The reason parameter says why: AlreadySaved, ListFull, NotTheWriter, IsTheWriter, or ChangedMeanwhile, when another change landed at the same moment and the call can be sent again. |
| 409 | ItemChanged | The item changed since the preview was made, or a later apply stands on it, so nothing was written. The message names what changed. |
| 409 | CapacityPaused | The Fabric capacity behind the item is paused, so it could not be read. Retry-After says when to try again, once a capacity administrator resumes it. |
| 410 | OperationExpired | The operation is older than 7 days and its state is no longer kept. The record it created, if any, is still addressable. |
| 412 | RegionNotReady | The account's processing region is still being set up after the call waited for it. BI Pixie sets a region up on the first call that starts work, and that call usually carries on without this answer. Retry-After says when to try again. |
| 412 | CapacityRequired | The call needs a Fabric capacity behind the workspace, and there is none. |
| 412 | CapacityUnpaid | The workspace's capacity is a trial or an unpaid one, which Fabric does not allow for this call. |
| 412 | StoreNotConnected | The account keeps its results in its own storage, and that storage has to be reconnected by an account admin in the portal. |
| 412 | AnthropicKeyRequired | The run's answers are paid for by an Anthropic key saved in AI setup, and none is saved there, or the AI provider named as providerId is not an Anthropic one. |
| 412 | DashboardRequired | The run reads report usage from the BI Pixie dashboard, and the account has none installed in a Fabric workspace. An account admin can install it. |
| 429 | RequestBlocked | The signed-in person, or the account, has sent more requests in this window than the limit allows. Retry-After says when the window opens. |
| 429 | AssessmentDailyLimitReached | The account has used every assessment its plan includes today. Retry-After says when the next day begins, at midnight UTC. |
| 429 | BenchmarkRunsExhausted | The account has used every benchmark run its plan includes. |
| 429 | OptimizationApplyDailyLimitReached | The account has used every optimization apply its plan includes today. A revert counts as one. Retry-After says when the next day begins, at midnight UTC. |
| 429 | OptimizationsExhausted | The account has used every optimization its plan includes. |
| 429 | FirstLookLimitReached | The account has used every first look its plan includes, so an item not yet tracked cannot be assessed. |
| 429 | BenchmarkBuildLimitReached | The account has generated benchmark questions as many times today as the daily limit allows. Retry-After says when the next day begins, at midnight UTC. |
| 429 | HostedDailyLimitReached | The Free plan's daily queries through BI Pixie's hosted connector are used up, and nothing was counted. The message says when the count starts again. Paid plans and the local connector have no limit. |
| 502 | FabricUnavailable | Microsoft did not answer as expected. The call can be sent again. |
| 502 | StoreUnavailable | The storage the account keeps its results in, BI Pixie's own record of a preview or an apply, or BI Pixie's count of the account's tracked items could not be read or written. The call can be sent again in a moment. |
| 502 | ValidationQueryFailed | Power BI did not run the query of the validation request, so there are no live rows to show. The call can be sent again. |
| 503 | ThrottleStoreUnavailable | BI Pixie could not check the request allowance, so the call was not started. The call can be sent again after Retry-After. |
| 500 | UnknownError | Something BI Pixie did not expect. The requestId identifies it to support. |
Why an accepted operation failed
Why an operation that was accepted then failed. Each code keeps its meaning once published. New codes can be added over time, and a code is never reused.
| Code | Means |
|---|---|
AssessmentTimedOut | The assessment has not finished in the time BI Pixie waits for one. The code is worked out each time the operation is read and is never stored, so when the assessment finishes later, its outcome replaces this code on the next read. You can ask about the operation again later, or start the assessment again. |
CapacityPaused | The Fabric capacity behind the item was paused when BI Pixie came to read it, so the work was not done. Once a capacity administrator resumes the capacity, you can start the work again. |
FabricAccessDenied | The signed-in person's Power BI account did not have access to the item when BI Pixie came to read it, so the work was not done. Once that access is granted in Fabric, you can start the work again. |
ItemNotFound | The item could not be found in Fabric when BI Pixie came to read it. It may have been deleted since the work was started, or the signed-in person may no longer be able to see it. |
FabricUnavailable | Fabric did not answer as expected while BI Pixie worked on the item. You can start the work again. |
CapacityBusy | The Fabric capacity behind the item was over its limit when BI Pixie came to read it, so the work was not done. Fabric clears this on its own once the capacity's load falls, so you can start the work again a few minutes later. Starting it again at once usually meets the same limit. A preview that failed this way changed nothing. |
ItemNotReadable | BI Pixie could not read the item's definition. For an assessment, none of the semantic model's tables could be read, or the data agent's definition could not be read, so there was nothing to assess. For an optimization, the semantic model's existing AI instructions could not be read, so nothing was changed. A semantic model can be assessed only when its definition is in TMDL format with readable table files. |
ItemWrongKind | Fabric refused the item because it is not the kind of item BI Pixie asked Fabric for, such as a lakehouse read as a semantic model, so the work was not done. Starting the work again will give the same result. |
ItemChanged | The item changed in Fabric after the preview was made, or a later apply stands on it, so nothing was written. You can make a new preview and apply it. |
TrackedItemLimitReached | In a run over many semantic models, this semantic model was not assessed, because assessing it would make it a tracked item and the account has no tracked items left. The other semantic models in the run are not affected. |
FirstLookLimitReached | In a run over many semantic models, this semantic model was not assessed, because it is not yet tracked and the account has used every first look its plan includes. The other semantic models in the run are not affected. |
AssessmentNotStarted | In a run over many semantic models, BI Pixie could not queue this semantic model for assessment. It was not assessed, and it does not count against the account's assessments for the day. You can start the assessment again. |
AssessmentFailed | The assessment failed for a reason that no more specific code describes. You can start the assessment again. If it fails again, you can quote the operation id to support. |
OptimizationFailed | A preview, an apply or a revert failed for a reason that no more specific code describes. You can make a new preview and apply it again. If it fails again, you can quote the operation id to support. |
QuestionsNotGenerated | BI Pixie could not write benchmark questions for the semantic model. You can ask for the questions again. If it fails again, you can quote the operation id to support. |
BenchmarkRunFailed | A benchmark run, or one side of an A/B test run, failed for a reason that no more specific code describes. You can run the benchmark again. If it fails again, you can quote the operation id to support. |
PowerBIWouldNotAnswer | Power BI would not answer the questions of a benchmark run, or of one side of an A/B test run, about the semantic model, so nothing was measured. Running the benchmark again usually gets the same answer. You can test a different AI. |
CopilotNeedsCapacity | Copilot did not answer any question of a benchmark run about the semantic model, so nothing was measured. Copilot answers only when the semantic model's workspace is on a Fabric capacity, and the workspace was not on one when the run started. You can move the workspace to a Fabric capacity, or test a different AI. |
BenchmarkQuestionsInvalid | BI Pixie did not run the benchmark, because the saved benchmark questions cannot be run as they are, and no question was asked. The most common cause is a question with several figures, a chart or an explanation while the strategy's check_method is not whole_answer, since those questions can be checked only by reading the whole answer. You can change the questions or the strategy and run the benchmark again. |
AddPixiesFailed | Pixies could not be added to a report. The code is on that report's outcome in the result, and it is the operation's own error when no report succeeded. You can add Pixies to that report again. If it fails again, you can quote the operation id to support. |
RemovePixiesFailed | The Pixies could not be removed from a report. The code is on that report's outcome in the result, and it is the operation's own error when no report succeeded. You can remove the Pixies from that report again. If it fails again, you can quote the operation id to support. |
AnswersNotReceived | A benchmark run that waits for its answers received no answers within an hour of handing out its questions, so BI Pixie ended it. You can run the benchmark again, and send the answers within the hour. |
SideBNotStarted | Side A of an A/B test run finished, but side B never started. In a run started through the API, side B starts when the person who started the run asks about the operation, and nobody asked in the week after the run started, so BI Pixie failed the run. You can run the test again, and ask about the operation until it finishes. |
Throttling
Requests are counted for each signed-in person over a fixed window of 60 seconds that refills all at once. Over the limit, the answer is 429 with errorCode RequestBlocked and a Retry-After header.
For the numbers, see Limits and allowances.