Document Models - Get Model
Hämtar detaljerad dokumentmodellinformation.
GET {endpoint}/documentintelligence/documentModels/{modelId}?api-version=2024-02-29-preview
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Slutpunkten för dokumentinformationstjänsten. |
model
|
path | True |
string |
Unikt namn på dokumentmodell. Regex pattern: |
api-version
|
query | True |
string |
Den API-version som ska användas för den här åtgärden. |
Begärandehuvud
Name | Obligatorisk | Typ | Description |
---|---|---|---|
x-ms-client-request-id |
string uuid |
En täckande, globalt unik, klientgenererad strängidentifierare för begäran. |
Svar
Name | Typ | Description |
---|---|---|
200 OK |
Begäran har slutförts. Headers x-ms-client-request-id: string |
|
Other Status Codes |
Ett oväntat felsvar. |
Säkerhet
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
OAuth2Auth
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Token URL:
https://login.microsoftonline.com/common/oauth2/token
Scopes
Name | Description |
---|---|
https://cognitiveservices.azure.com/.default |
Exempel
Get Custom Document Model |
Get Prebuilt Document Model |
Get Custom Document Model
Sample Request
GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/myCustomModel?api-version=2024-02-29-preview
Sample Response
{
"modelId": "myCustomModel",
"description": "Custom model description",
"createdDateTime": "2021-09-24T12:54:35Z",
"expirationDateTime": "2023-01-01T00:00:00Z",
"apiVersion": "2024-02-29-preview",
"docTypes": {
"myForm": {
"fieldSchema": {
"Name": {
"type": "string"
},
"Date": {
"type": "date"
},
"Amount": {
"type": "number"
}
},
"buildMode": "template",
"fieldConfidence": {
"Name": 0.9,
"Date": 0.95,
"Amount": 0.93
}
}
},
"tags": {
"createdBy": "myUserId"
}
}
Get Prebuilt Document Model
Sample Request
GET https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels/prebuilt-invoice?api-version=2024-02-29-preview
Sample Response
{
"modelId": "prebuilt-invoice",
"description": "Prebuilt model to extract key information from English invoices, including customer, vendor, invoice ID, due date, total, and more.",
"createdDateTime": "2021-07-30T00:00:00Z",
"apiVersion": "2024-02-29-preview",
"docTypes": {
"prebuilt:invoice": {
"fieldSchema": {
"CustomerName": {
"type": "string"
},
"CustomerId": {
"type": "string"
},
"PurchaseOrder": {
"type": "string"
},
"InvoiceId": {
"type": "string"
},
"InvoiceDate": {
"type": "date"
},
"DueDate": {
"type": "date"
},
"VendorName": {
"type": "string"
},
"VendorAddress": {
"type": "string"
},
"VendorAddressRecipient": {
"type": "string"
},
"CustomerAddress": {
"type": "string"
},
"CustomerAddressRecipient": {
"type": "string"
},
"BillingAddress": {
"type": "string"
},
"BillingAddressRecipient": {
"type": "string"
},
"ShippingAddress": {
"type": "string"
},
"ShippingAddressRecipient": {
"type": "string"
},
"SubTotal": {
"type": "number"
},
"TotalTax": {
"type": "number"
},
"InvoiceTotal": {
"type": "number"
},
"AmountDue": {
"type": "number"
},
"PreviousUnpaidBalance": {
"type": "number"
},
"RemittanceAddress": {
"type": "string"
},
"RemittanceAddressRecipient": {
"type": "string"
},
"ServiceAddress": {
"type": "string"
},
"ServiceAddressRecipient": {
"type": "string"
},
"ServiceStartDate": {
"type": "date"
},
"ServiceEndDate": {
"type": "date"
},
"Items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Amount": {
"type": "number"
},
"Date": {
"type": "date"
},
"Description": {
"type": "string"
},
"Quantity": {
"type": "number"
},
"ProductCode": {
"type": "string"
},
"Tax": {
"type": "number"
},
"Unit": {
"type": "string"
},
"UnitPrice": {
"type": "number"
}
}
}
}
}
}
},
"tags": {}
}
Definitioner
Name | Description |
---|---|
Azure |
Azure Blob Storage innehåll. |
Azure |
Fillista i Azure Blob Storage. |
Document |
Byggläge för anpassad dokumentmodell. |
Document |
Beskrivning av fältets semantiska schema med hjälp av en syntax för JSON-schemaformat. |
Document |
Semantisk datatyp för fältvärdet. |
Document |
Dokumentmodellinformation. |
Document |
Information om dokumenttyp. |
Error |
Felobjektet. |
Error |
Felsvarsobjekt. |
Inner |
Ett objekt som innehåller mer specifik information om felet. |
Warning |
Felobjektet. |
AzureBlobContentSource
Azure Blob Storage innehåll.
Name | Typ | Description |
---|---|---|
containerUrl |
string |
Azure Blob Storage container-URL. |
prefix |
string |
Prefix för blobnamn. |
AzureBlobFileListContentSource
Fillista i Azure Blob Storage.
Name | Typ | Description |
---|---|---|
containerUrl |
string |
Azure Blob Storage container-URL. |
fileList |
string |
Sökväg till en JSONL-fil i containern som anger en delmängd av dokument. |
DocumentBuildMode
Byggläge för anpassad dokumentmodell.
Name | Typ | Description |
---|---|---|
neural |
string |
Stöd för dokument med olika visuella mallar. |
template |
string |
Måldokument med liknande visuella mallar. |
DocumentFieldSchema
Beskrivning av fältets semantiska schema med hjälp av en syntax för JSON-schemaformat.
Name | Typ | Description |
---|---|---|
description |
string |
Fältbeskrivning. |
example |
string |
Exempelfältinnehåll. |
items |
Schema för fälttyp för varje matriselement. |
|
properties |
<string,
Document |
Namngivna underfält i objektfältet. |
type |
Semantisk datatyp för fältvärdet. |
DocumentFieldType
Semantisk datatyp för fältvärdet.
Name | Typ | Description |
---|---|---|
address |
string |
Parsad adress. |
array |
string |
Lista över underfält av samma typ. |
boolean |
string |
Booleskt värde, normaliserat till sant eller falskt. |
countryRegion |
string |
Land/region, normaliserat till ISO 3166-1 alfa-3-format (till exempel USA). |
currency |
string |
Valutabelopp med valfri valutasymbol och enhet. |
date |
string |
Datum, normaliserat till ISO 8601-format (ÅÅÅÅ-MM-DD). |
integer |
string |
Heltalsnummer, normaliserat till 64-bitars heltal. |
number |
string |
Flyttalsnummer, normaliserat till flyttal med dubbel precision. |
object |
string |
Namngiven lista över underfält av potentiellt olika typer. |
phoneNumber |
string |
Telefonnummer, normaliserat till E.164-format (+{CountryCode}{SubscriberNumber}). |
selectionGroup |
string |
Matris med valda strängvärden. |
selectionMark |
string |
Är fältet markerat? |
signature |
string |
Finns signaturen? |
string |
string |
Oformaterad text. |
time |
string |
Tid, normaliserad till ISO 8601-format (hh:mm:ss). |
DocumentModelDetails
Dokumentmodellinformation.
Name | Typ | Description |
---|---|---|
apiVersion |
string |
API-version som används för att skapa den här dokumentmodellen. |
azureBlobFileListSource |
Azure Blob Storage fillista som anger träningsdata. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
|
azureBlobSource |
Azure Blob Storage plats som innehåller träningsdata. Antingen azureBlobSource eller azureBlobFileListSource måste anges. |
|
buildMode |
Byggläge för anpassad dokumentmodell. |
|
createdDateTime |
string |
Datum och tid (UTC) när dokumentmodellen skapades. |
description |
string |
Beskrivning av dokumentmodell. |
docTypes |
<string,
Document |
Dokumenttyper som stöds. |
expirationDateTime |
string |
Datum och tid (UTC) när dokumentmodellen upphör att gälla. |
modelId |
string |
Unikt namn på dokumentmodell. |
tags |
object |
Lista över nyckel/värde-taggattribut som är associerade med dokumentmodellen. |
warnings |
Warning[] |
Lista över varningar som påträffades när modellen byggdes. |
DocumentTypeDetails
Information om dokumenttyp.
Name | Typ | Description |
---|---|---|
buildMode |
Byggläge för anpassad dokumentmodell. |
|
description |
string |
Beskrivning av dokumentmodell. |
fieldConfidence |
object |
Uppskattad konfidens för varje fält. |
fieldSchema |
<string,
Document |
Beskrivning av dokumentets semantiska schema med en syntax för JSON-schemaformat. |
Error
Felobjektet.
Name | Typ | Description |
---|---|---|
code |
string |
En av en serverdefinierad uppsättning felkoder. |
details |
Error[] |
En matris med information om specifika fel som ledde till det rapporterade felet. |
innererror |
Ett objekt som innehåller mer specifik information än det aktuella objektet om felet. |
|
message |
string |
En mänsklig läsbar representation av felet. |
target |
string |
Målet för felet. |
ErrorResponse
Felsvarsobjekt.
Name | Typ | Description |
---|---|---|
error |
Felinformation. |
InnerError
Ett objekt som innehåller mer specifik information om felet.
Name | Typ | Description |
---|---|---|
code |
string |
En av en serverdefinierad uppsättning felkoder. |
innererror |
Inre fel. |
|
message |
string |
En mänsklig läsbar representation av felet. |
Warning
Felobjektet.
Name | Typ | Description |
---|---|---|
code |
string |
En av en serverdefinierad uppsättning varningskoder. |
message |
string |
En läsbar representation av varningen. |
target |
string |
Målet för felet. |