Initializes new client with specific authentication method.
Authentication object,
containing either client_id
and client_secret
properties (for 2-legged authentication),
or a single token
property (for 2-legged or 3-legged authentication with pre-generated access token).
Optional
host: stringForge API host.
Optional
region: RegionForge availability region ("US" or "EMEA").
Protected
Optional
authProtected
axiosProtected
hostProtected
regionProtected
rootProtected
Optional
tokenPrivate
_collectPrivate
_pagerFinalizes the upload of a file to OSS.
Bucket key.
Object key.
Upload key returned by {@see getUploadUrls}.
Optional
contentType: stringOptinal content type that should be recorded for the uploaded file.
Details of the uploaded object in OSS.
Makes a copy of object under another name within the same bucket (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-copyto-:newObjectName-PUT|docs).
Bucket key.
Original object key.
New object key.
Details of the new object copy.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Creates a new bucket (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-POST|docs).
Bucket key.
Data retention policy for objects uploaded to this bucket.
Bucket details, with properties "bucketKey", "bucketOwner", "createdDate", "permissions", and "policyKey".
Error when the request fails, for example, due to insufficient rights, incorrect scopes, or when a bucket with this name already exists.
Creates signed URL for specific object (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST|docs).
Bucket key.
Object key.
Optional
access: string = 'readwrite'Signed URL access authorization.
Optional
useCdn: boolean = trueIf true, this will generate a CloudFront URL for the S3 object.
Description of the new signed URL resource.
Error when the request fails, for example, due to insufficient rights.
Protected
deleteDeletes object (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-DELETE|docs).
Bucket key.
Name of object to delete.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Downloads a specific OSS object.
Bucket key.
Object key.
Optional
options: IDownloadOptionsAdditional download options.
Object content.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Downloads content stream of a specific bucket object.
Bucket key.
Object name.
Optional
options: IDownloadOptionsAdditional download options.
Object content stream.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Protected
fetchProtected
getGets details of a specific bucket (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-details-GET|docs).
Bucket key.
Bucket details, with properties "bucketKey", "bucketOwner", "createdDate", "permissions", and "policyKey".
Error when the request fails, for example, due to insufficient rights, or when a bucket with this name does not exist.
Protected
getGenerates a signed URL that can be used to download a file from OSS.
Bucket key.
Object key.
Download URLs and potentially other helpful information.
Gets details of a specific bucket object (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-details-GET|docs).
Bucket key.
Object name.
Object description containing 'bucketKey', 'objectKey', 'objectId', 'sha1', 'size', 'location', and 'contentType'.
Error when the request fails, for example, due to insufficient rights, or when an object with this name does not exist.
Bucket key.
Name of uploaded object.
Resumable session ID.
List of range objects, with each object specifying 'start' and 'end' byte offsets of data that has already been uploaded.
This method of resumable upload is now deprecated and will be removed in future versions. Use {@see getUploadUrls} and {@see completeUpload} instead.
Gets status of a resumable upload session (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-status-:sessionId-GET|docs).
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Protected
getGenerates one or more signed URLs that can be used to upload a file (or its parts) to OSS, and an upload key that is used to generate additional URLs or in {@see completeUpload} after all the parts have been uploaded successfully.
The URLs are valid for 60min.
Note that if you are uploading in multiple parts, each part except for the final one must be of size at least 5MB, otherwise the call to {@see completeUpload} will fail.
Bucket key.
Object key.
Optional
parts: number = 1How many URLs to generate in case of multi-part upload.
Optional
firstPart: number = 1Index of the part the first returned URL should point to.
For example, to upload parts 10 through 15 of a file, use firstPart
= 10 and parts
= 6.
Optional
uploadKey: stringOptional upload key if this is a continuation of a previously initiated upload.
Signed URLs for uploading chunks of the file to AWS S3 (valid for 60min), and a unique upload key used to generate additional URLs or to complete the upload.
Iterates over all buckets in pages of predefined size (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-GET|docs).
Optional
limit: number = 16Max number of buckets to receive in one batch (allowed values: 1-100).
List of bucket object containing 'bucketKey', 'createdDate', and 'policyKey'.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Iterates over all objects in a bucket in pages of predefined size (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-GET|docs).
Bucket key.
Optional
limit: number = 16Max number of objects to receive in one batch (allowed values: 1-100).
Optional
beginsWith: stringOptional filter to only return objects whose keys are prefixed with this value.
List of object containing 'bucketKey', 'objectKey', 'objectId', 'sha1', 'size', and 'location'.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Lists all buckets (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-GET|docs).
List of bucket objects.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Lists all objects in a bucket (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-GET|docs).
Bucket key.
Optional
beginsWith: stringOptional filter to only return objects whose keys are prefixed with this value.
List of object containing 'bucketKey', 'objectKey', 'objectId', 'sha1', 'size', and 'location'.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Protected
patchProtected
postProtected
putResets client to specific authentication method, Forge host, and availability region.
Optional
auth: IAuthOptionsAuthentication object,
containing either client_id
and client_secret
properties (for 2-legged authentication),
or a single token
property (for 2-legged or 3-legged authentication with pre-generated access token).
Optional
host: stringForge API host.
Optional
region: RegionForge availability region ("US" or "EMEA").
Protected
setUploads content to a specific bucket object.
Bucket key.
Name of uploaded object.
Object content.
Optional
options: IUploadOptionsAdditional upload options.
Object description containing 'bucketKey', 'objectKey', 'objectId', 'sha1', 'size', 'location', and 'contentType'.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Bucket key.
Name of uploaded object.
Object content.
Byte offset of the uploaded blob in the target object.
Total byte size of the target object.
Resumable session ID.
Optional
contentType: string = 'application/stream'Type of content to be used in HTTP headers, for example, "application/json".
This method of resumable upload is now deprecated and will be removed in future versions. Use {@see getUploadUrls} and {@see completeUpload} instead.
Uploads content to a specific bucket object using the resumable capabilities (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-resumable-PUT|docs).
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Uploads content stream to a specific bucket object.
Bucket key.
Name of uploaded object.
Optional
options: IUploadOptionsAdditional upload options.
Object description containing 'bucketKey', 'objectKey', 'objectId', 'sha1', 'size', 'location', and 'contentType'.
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Bucket key.
Name of uploaded object.
Object content stream.
Byte size of the stream to be uploaded.
Byte offset of the uploaded blob in the target object.
Total byte size of the target object.
Resumable session ID.
Optional
contentType: string = 'application/stream'Type of content to be used in HTTP headers, for example, "application/json".
This method of resumable upload is now deprecated and will be removed in future versions. Use {@see getUploadUrls} and {@see completeUpload} instead.
Uploads content stream to a specific bucket object using the resumable capabilities (https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-resumable-PUT|docs).
Error when the request fails, for example, due to insufficient rights, or incorrect scopes.
Generated using TypeDoc
Client providing access to Autodesk Forge management APIs.
Tutorial
data-management