Skip to content
Main site Contact

File metadata

This page covers:

  • GET /api/FileAttributes
  • PUT /api/FileAttributes
  • DELETE /api/FileAttributes
  • GET /api/AttributeValues
  • GET /api/PMIData
  • PUT /api/ExtractedAttributeFeedback
  • GET /api/CustomProductCategory

Return the attributes currently used by the authenticated user’s company.

ItemValue
MethodGET
Path/api/FileAttributes
AuthUser bearer token
ResponseArray of FileAttribute objects
[
{
"ID": 12,
"Name": "document_type",
"Unit": "",
"Value": null,
"IsCustom": true,
"Timestamp": null
},
{
"ID": 13,
"Name": "material",
"Unit": "",
"Value": null,
"IsCustom": true,
"Timestamp": null
}
]
Terminal window
curl "https://your-server.example.com/api/FileAttributes" \
-H "Authorization: Bearer USER_BEARER_TOKEN"

Add or replace attributes on a file.

ItemValue
MethodPUT
Path/api/FileAttributes
AuthUser bearer token
Content-Typeapplication/json
ResponseBoolean
ParameterRequiredNotes
fileUIDOne of fileUID or fileNameFile UID to update
fileNameOne of fileUID or fileNameFull stored file path. The API resolves this to a UID first.
deleteExistingNoDefaults to true. When true, this acts as a full replace.

The body is a JSON string whose contents are a JSON array of name=value strings.

That means the wire body looks like this:

"[\"document_type=Assembly\",\"region=North America|Europe\",\"weight(kg)=12.3\"]"

Do not send a raw JSON array. The controller receives a string first and then deserializes that string into string[].

  • Single value: document_number=AX-1000
  • Multiple values in one field: region=North America|Europe
  • Unit-bearing field: weight(kg)=12.3
import json
import requests
server = "https://your-server.example.com"
token = "USER_BEARER_TOKEN"
file_uid = "b5d3674c-488c-41cb-a9f7-58a42cac85dd"
attrs = [
"document_type=Assembly",
"region=North America|Europe",
"weight(kg)=12.3",
]
body = json.dumps(json.dumps(attrs))
resp = requests.put(
f"{server}/api/FileAttributes?fileUID={file_uid}",
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
},
data=body,
)
resp.raise_for_status()
print(resp.json())

Remove all attributes from a file.

ItemValue
MethodDELETE
Path/api/FileAttributes
AuthUser bearer token
ResponseBoolean
Terminal window
curl -X DELETE "https://your-server.example.com/api/FileAttributes?fileUID=b5d3674c-488c-41cb-a9f7-58a42cac85dd" \
-H "Authorization: Bearer USER_BEARER_TOKEN"

Return the unique values and counts for one attribute in the current company.

ItemValue
MethodGET
Path/api/AttributeValues
AuthUser bearer token
ResponseArray of { "Name": string, "Count": int }
ParameterRequiredNotes
attributeYesAttribute name to aggregate
[
{
"Name": "North America",
"Count": 1842
},
{
"Name": "Europe",
"Count": 731
}
]
Terminal window
curl -G "https://your-server.example.com/api/AttributeValues" \
-H "Authorization: Bearer USER_BEARER_TOKEN" \
--data-urlencode "attribute=region"

Return the extracted PMI payload for a file.

ItemValue
MethodGET
Path/api/PMIData
AuthUser bearer token
ResponsePMIData JSON
ParameterRequiredNotes
fileUIDYesFile UID to read PMI from
FieldMeaning
PMIJSON text string containing the PMI array
UnstructuredTextExtracted free text
ExtractedAttributesExtracted attributes as name=value strings
{
"PMI": "[{\"page\":0,\"ImageSize\":[2550,3300],\"PMI\":[{\"box\":[1274,356,29,125],\"type_id\":0,\"text\":\"11\"}]}]",
"UnstructuredText": "Example drawing title",
"ExtractedAttributes": [
"document_number=AX-1000",
"document_type=Drawing"
]
}
Terminal window
curl -G "https://your-server.example.com/api/PMIData" \
-H "Authorization: Bearer USER_BEARER_TOKEN" \
--data-urlencode "fileUID=b5d3674c-488c-41cb-a9f7-58a42cac85dd"

Send feedback about attributes VizSeek extracted from a file.

ItemValue
MethodPUT
Path/api/ExtractedAttributeFeedback
AuthUser bearer token
Content-Typeapplication/json
ResponsePlain feedback ID string
ParameterRequiredNotes
fileUIDYesFile UID the feedback applies to
feedbackYesURL-encoded explanation of what should have been extracted differently
userNoURL-encoded external user identifier
feedbackIdNoOptional GUID you want to control

The body is a JSON string containing a comma-separated list of extracted attributes, for example:

"Document Type=Drawing,Region=North America"
import json
import requests
import urllib.parse
server = "https://your-server.example.com"
token = "USER_BEARER_TOKEN"
file_uid = "b5d3674c-488c-41cb-a9f7-58a42cac85dd"
body = json.dumps("Document Type=Drawing,Region=North America")
feedback = urllib.parse.quote("Region should have been Europe", safe="")
resp = requests.put(
f"{server}/api/ExtractedAttributeFeedback?fileUID={file_uid}&feedback={feedback}",
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
},
data=body,
)
resp.raise_for_status()
print(resp.text)

Create a custom product category for the authenticated user’s company.

ItemValue
MethodGET
Path/api/CustomProductCategory
AuthUser bearer token
ResponseProductCategory JSON
ParameterRequiredNotes
nameYesURL-encoded category name
{
"Name": "My New Category",
"NameZH": null,
"ID": 1234,
"RasterSearchMethod": 0,
"VectorSearchMethod": 0,
"ImageAsDrawing": 0,
"Parent": null,
"UsageCount": 0,
"FullName": "My New Category",
"FullNameZH": null
}
Terminal window
curl -G "https://your-server.example.com/api/CustomProductCategory" \
-H "Authorization: Bearer USER_BEARER_TOKEN" \
--data-urlencode "name=Prototype Parts"