Class: module:api/DerivativesApi

module:api/DerivativesApi(apiClient)

new module:api/DerivativesApi(apiClient)

Constructs a new DerivativesApi.

Parameters:
Name Type Description
apiClient module:ApiClient

Optional API client implementation to use, default to module:ApiClient#instance if unspecified.

Source:

Members

(static, readonly) RegionEnum :String

Allowed values for the region property.

Type:
  • String
Properties:
Name Type Description
US String

value: "US"

EMEA String

value: "EMEA"

EU String

value: "EU"

Source:

Methods

deleteManifest(urn, oauth2client, credentials)

Deletes the manifest and all its translated output files (derivatives). However, it does not delete the design source file.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN data is of type: {module:model/Result}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getDerivativeManifest(urn, derivativeUrn, opts, oauth2client, credentials)

Downloads a selected derivative. To download the file, you need to specify the file’s URN, which you retrieve by calling the GET {urn}/manifest endpoint. Note that the Model Derivative API uses 2 types of URNs. The design URN is generated when you upload the source design file to Forge, and is used when calling most of the Model Derivative endpoints. A derivative URN is generated for each translated output file format, and is used for downloading the output design files. You can set the range of bytes that are returned when downloading the derivative, using the range header.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

derivativeUrn String

The URL-encoded URN of the derivatives. The URN is retrieved from the GET :urn/manifest endpoint.

opts Object

Optional parameters

Properties
Name Type Description
range Integer

This is the standard RFC 2616 range request header. It only supports one range specifier per request: 1. Range:bytes=0-63 (returns the first 64 bytes) 2. Range:bytes=64-127 (returns the second set of 64 bytes) 3. Range:bytes=1022- (returns all the bytes from offset 1022 to the end) 4. If the range header is not specified, the whole content is returned.

acceptEncoding String

If specified with gzip or *, content will be compressed and returned in a GZIP format.

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getDerivativeManifestInfo(urn, derivativeUrn, opts, oauth2client, credentials)

Returns information about the specified derivative.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

derivativeUrn String

The URL-encoded URN of the derivatives. The URN is retrieved from the GET :urn/manifest endpoint.

opts Object

Optional parameters

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getFormats(opts, oauth2client, credentials)

Returns an up-to-date list of Forge-supported translations, that you can use to identify which types of derivatives are supported for each source file type. You can set this endpoint to only return the list of supported translations if they have been updated since a specified date. See the Supported Translation Formats table for more details about supported translations. Note that we are constantly adding new file formats to the list of Forge translations.

Parameters:
Name Type Description
opts Object

Optional parameters

Properties
Name Type Description
ifModifiedSince Date

The supported formats are only returned if they were modified since the specified date. An invalid date returns the latest supported format list. If the supported formats have not been modified since the specified date, the endpoint returns a NOT MODIFIED (304) response.

acceptEncoding String

If specified with gzip or *, content will be compressed and returned in a GZIP format. data is of type: {module:model/Formats}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getManifest(urn, opts, oauth2client, credentials)

Returns information about derivatives that correspond to a specific source file, including derviative URNs and statuses. The URNs of the derivatives are used to download the generated derivatives when calling the GET {urn}/manifest/{derivativeurn} endpoint. The statuses are used to verify whether the translation of requested output files is complete. Note that different output files might complete their translation processes at different times, and therefore may have different status values. When translating a source file a second time, the previously created manifest is not deleted; it appends the information (only new translations) to the manifest.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

opts Object

Optional parameters

Properties
Name Type Description
acceptEncoding String

If specified with gzip or *, content will be compressed and returned in a GZIP format. data is of type: {module:model/Manifest}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getMetadata(urn, opts, oauth2client, credentials)

Returns a list of model view (metadata) IDs for a design model. The metadata ID enables end users to select an object tree and properties for a specific model view. Although most design apps (e.g., Fusion and Inventor) only allow a single model view (object tree and set of properties), some apps (e.g., Revit) allow users to design models with multiple model views (e.g., HVAC, architecture, perspective). Note that you can only retrieve metadata from an input file that has been translated into an SVF file.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

opts Object

Optional parameters

Properties
Name Type Description
acceptEncoding String

If specified with gzip or *, content will be compressed and returned in a GZIP format. data is of type: {module:model/Metadata}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getModelviewMetadata(urn, guid, opts, oauth2client, credentials)

Returns an object tree, i.e., a hierarchical list of objects for a model view. To call this endpoint you first need to call the GET {urn}/metadata endpoint, to determine which model view (object tree and set of properties) to use. Although most design apps (e.g., Fusion and Inventor) only allow a single model view, some apps (e.g., Revit) allow users to design models with multiple model views (e.g., HVAC, architecture, perspective). Note that you can only retrieve metadata from an input file that has been translated into an SVF file.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

guid String

Unique model view ID. Call GET {urn}/metadata to get the ID

opts Object

Optional parameters

Properties
Name Type Description
acceptEncoding String

If specified with gzip or *, content will be compressed and returned in a GZIP format.

xAdsForce Boolean

Force retrieve the object tree even though it failed to be extracted (got 404 with error message) previously. (default is false) retrieve the object tree, and previously failures are not replaced.

xAdsFormat String

fallback: fallback to SVF format; latest: returns SVF2 if available. Possible values: latest / fallback; Default to latest.

forceget Boolean

To force get the large resource even if it exceeded the expected maximum length (20 MB). Possible values: true, false. The the implicit value is false. data is of type: {module:model/Metadata}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getModelviewProperties(urn, guid, opts, oauth2client, credentials)

Returns a list of properties for each object in an object tree. Properties are returned according to object ID and do not follow a hierarchical structure. The following image displays a typical list of properties for a Revit object: To call this endpoint you need to first call the GET {urn}/metadata endpoint, which returns a list of model view (metadata) IDs for a design input model. Select a model view (metadata) ID to use when calling the Get Properties endpoint. Note that you can only get properties from a design input file that was previously translated into an SVF file.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

guid String

Unique model view ID. Call GET {urn}/metadata to get the ID

opts Object

Optional parameters

Properties
Name Type Description
acceptEncoding String

If specified with gzip or *, content will be compressed and returned in a GZIP format.

xAdsForce Boolean

Force retrieve the object tree even though it failed to be extracted (got 404 with error message) previously. (default is false) retrieve the object tree, and previously failures are not replaced.

xAdsFormat String

fallback: fallback to SVF format; latest: returns SVF2 if available. Possible values: latest / fallback; Default to latest.

forceget Boolean

To force get the large resource even if it exceeded the expected maximum length (20 MB). Possible values: true, false. The the implicit value is false.

objectid Integer

Object id which you want to query properties for. data is of type: {module:model/Metadata}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

getThumbnail(urn, opts, oauth2client, credentials)

Returns the thumbnail for the source file.

Parameters:
Name Type Description
urn String

The Base64 (URL Safe) encoded design URN

opts Object

Optional parameters

Properties
Name Type Description
guid String

Unique model view ID. Call GET {urn}/metadata to get the ID

width Integer

The desired width of the thumbnail. Possible values are 100, 200 and 400.

height Integer

The desired height of the thumbnail. Possible values are 100, 200 and 400. data is of type: {Object}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

setReferences(urn, body, opts, oauth2client, credentials)

To create references for a composite design in Model Derivative. The description of references is stored in Model Derivative. To use it with the POST job endpoint, you need to set checkReferences to true.

Parameters:
Name Type Description
urn String

The root design urn. Mandatory if the base64 encoded urn in the request URL is a logical urn.

body Object
opts Object

Optional parameters data is of type: {Object}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source:

translate(job, opts, oauth2client, credentials)

Translate a source file from one format to another. Derivatives are stored in a manifest that is updated each time this endpoint is used on a source file. Note that this endpoint is asynchronous and initiates a process that runs in the background, rather than keeping an open HTTP connection until completion. Use the GET {urn}/manifest endpoint to poll for the job’s completion.

Parameters:
Name Type Description
job module:model/JobPayload
opts Object

Optional parameters

Properties
Name Type Description
xAdsForce Boolean

true: the endpoint replaces previously translated output file types with the newly generated derivatives false (default): previously created derivatives are not replaced (default to false) data is of type: {module:model/Job}

oauth2client Object

oauth2client for the call

credentials Object

credentials for the call

Source: