Document Models - Analyze Document
Analyseert document met documentmodel.
POST {endpoint}/formrecognizer/documentModels/{modelId}:analyze?api-version=2022-08-31
POST {endpoint}/formrecognizer/documentModels/{modelId}:analyze?pages={pages}&locale={locale}&stringIndexType={stringIndexType}&api-version=2022-08-31
URI-parameters
Name | In | Vereist | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Ondersteunde Cognitive Services-eindpunten (protocol en hostnaam, bijvoorbeeld: https://westus2.api.cognitive.microsoft.com). |
model
|
path | True |
string |
Unieke documentmodelnaam. Regex pattern: |
api-version
|
query | True |
Aangevraagde API-versie. |
|
locale
|
query |
string |
Landinstellingenhint voor tekstherkenning en documentanalyse. De waarde mag alleen de taalcode bevatten (bijvoorbeeld 'en', 'fr') of de taalcode BCP 47 (bijvoorbeeld 'en-US'). |
|
pages
|
query |
string |
Lijst met te analyseren paginanummers op basis van 1. Bijvoorbeeld "1-3,5,7-9" Regex pattern: |
|
string
|
query |
Methode die wordt gebruikt voor het berekenen van tekenreeks offset en lengte. |
Aanvraagkoptekst
Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif"
Name | Vereist | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Aanvraagbody
Media Types: "application/json", "application/octet-stream", "application/pdf", "image/jpeg", "image/png", "image/tiff", "image/bmp", "image/heif"
Name | Type | Description |
---|---|---|
base64Source |
string |
Base64-codering van het document dat moet worden geanalyseerd |
urlSource |
string |
Document-URL om te analyseren |
Antwoorden
Name | Type | Description |
---|---|---|
202 Accepted |
De aanvraag is in de wachtrij geplaatst. Headers Operation-Location: string |
|
Other Status Codes |
Er is een fout opgetreden. |
Beveiliging
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Voorbeelden
Analyze |
Analyze |
AnalyzeDocument_Base64
Sample Request
POST {endpoint}/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31
{
"base64Source": ""
}
Sample Response
Operation-Location: {endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version=2022-08-31
AnalyzeDocument_Url
Sample Request
POST {endpoint}/formrecognizer/documentModels/customModel:analyze?pages=1-2,4&locale=en-US&stringIndexType=textElements&api-version=2022-08-31
{
"urlSource": "http://host.com/doc.pdf"
}
Sample Response
Operation-Location: {endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version=2022-08-31
Definities
Name | Description |
---|---|
Analyze |
Parameters voor documentanalyse. |
Api |
API-versie. |
Error |
Foutinformatie. |
Error |
Foutreactieobject. |
Inner |
Gedetailleerde fout. |
String |
Methode die wordt gebruikt voor het berekenen van tekenreeks offset en lengte. |
AnalyzeDocumentRequest
Parameters voor documentanalyse.
Name | Type | Description |
---|---|---|
base64Source |
string |
Base64-codering van het document dat moet worden geanalyseerd |
urlSource |
string |
Document-URL om te analyseren |
ApiVersion
API-versie.
Name | Type | Description |
---|---|---|
2022-08-31 |
string |
Error
Foutinformatie.
Name | Type | Description |
---|---|---|
code |
string |
Foutcode. |
details |
Error[] |
Lijst met gedetailleerde fouten. |
innererror |
Gedetailleerde fout. |
|
message |
string |
Foutbericht. |
target |
string |
Doel van de fout. |
ErrorResponse
Foutreactieobject.
Name | Type | Description |
---|---|---|
error |
Foutinformatie. |
InnerError
Gedetailleerde fout.
Name | Type | Description |
---|---|---|
code |
string |
Foutcode. |
innererror |
Gedetailleerde fout. |
|
message |
string |
Foutbericht. |
StringIndexType
Methode die wordt gebruikt voor het berekenen van tekenreeks offset en lengte.
Name | Type | Description |
---|---|---|
textElements |
string |
|
unicodeCodePoint |
string |
|
utf16CodeUnit |
string |