SAP#
The SAP backend allows loading data from SAP. Metadata and assembly structures are retrieved via SAP’s SOAP API; the document files themselves are downloaded over HTTP from the checkout URL returned by SOAP. Assembly structures are returned as X3D while individual documents are returned in their native file format. Loading is only supported via a technical user.
Documents are addressed by a composite key consisting of the document type, document number, version, and part.
Configuration options are as follows:
sap:
# Whether the SAP backend is enabled. When enabled, all options below
# except `urnPartPrefix` are required; the backend refuses to start if any
# of them is missing.
enabled: false
# The SAP SOAP endpoint URL.
soapEndpoint:
# Optional prefix used for links to parts in generated assembly structures.
# This must be registered as a data pool in the system.
urnPartPrefix: "urn:sap:document:"
# Application types to consider when selecting the file to load for a
# document. The first file whose application type is in this list is used.
validApplicationTypes: []
# User credentials for the technical user. Basic authentication is used.
user:
# Name of the technical user.
name:
# Password of the technical user. Must be given as a full environment
# variable value source, i.e. either `value: "..."` or a `valueFrom:`
# block such as:
password:
valueFrom:
secretKeyRef:
name: sap-secrets
key: password
Once configured, the following endpoints will be available to configure as URNs for data pool rules. Both are addressed by the document type, number, version, and part:
/sap/assembly/{type}/{number}/{version}/{part}: Returns the assembly structure for the given document as X3D. Links to child documents and parts use the configuredurnPartPrefix./sap/document/{type}/{number}/{version}/{part}: Returns the file for the given document. The file whose application type matches one of the configuredvalidApplicationTypesis returned. When called viaPOSTwith?smartLinkMapping=trueand a JSON list of links in the request body, it instead returns the URN mapping used to resolve SolidWorks assembly references.