9 Jan 2018

Updated: A little more detail behind the Autodesk Forge APIs

Let's say you've been an Autodesk customer for a long time. You've got decades of your intellectual property captured in AutoCAD drawings. If you'd like to leverage that data to showcase your work to your customers, then Autodesk Forge is for you.

Forge is our application program interface (API) platform and supporting materials (sample code, manuals) as well as a community of developers who uses those APIs. Although Forge is intended for our customers and 3rd party developers to be able to use our web services, we use Forge for our development of the cloud-based services that we offer. You can leverage Forge in the same ways that we do.

Forge is defined by 7 groups of APIs:

ForgeDetailedAPIsV12
Enlarge

  • Authentication

    Authentication for Forge is based on the industry standard OAuth, specifically OAuth2, that provides for token-based authentication and authorization. The basic flow for using OAuth is:

    1. Your app makes an HTTP call to an OAuth REST (REpresentational State Transfer) endpoint and provides its credentials.
    2. A token is returned to your app.
    3. In making subsequent HTTP calls to various APIs on the platform, your app includes the token in a request header.

    You can use OAuth with a two-legged or a three-legged authentication process.

    • To accomplish two-legged authentication on the Forge Platform requires that you use the "Client Credentials" grant type. This means that your app directly communicates with the Forge Platform for authentication and accessing resources. If it's a web app, the end user is not directly aware of any of these server-to-server communications, as none of it is passed through the web browser.
    • To accomplish three-legged authentication and authorization on the Forge Platform, the authorization code grant type can be adopted. To use a web app as an example, this means that your app redirects the end user to an Autodesk login and authorization flow, and an authorization code is returned to your app (via a query parameter in the callback). Your app then exchanges that authorization code for a token by communicating with the Forge authentication server directly. While other grant types are possible (that enable other flows), they are less secure and thus highly discouraged.
    • To accomplish three-legged authentication and authorization on the Forge Platform, the implicit grant type can be adopted. To use a web app as an example, this means that your app redirects the end user to an Autodesk login and authorization flow, and an access token is returned to your app (via a query parameter in the callback).
  • Design Automation API

    The Design Automation API gives you the ability to run scripts on your design files, taking advantage of the scale of the Forge Platform to automate repetitive tasks. The API currently works with DWG files, but private beta testing is underway for Inventor and Revit files. This is a handy way to publish thousands of drawings to DWF or PDF. "Ordinarily, you would have to download all the files, run a script on them in the AutoCAD desktop software, and then potentially upload them all back to the cloud. Your efficiency would be bottlenecked by the processing power of your computer and your network bandwidth, and you would have to instrument logging and retry logic in your code to ensure that the entire job completed. With the Design Automation API, you can offload all that processing to the Forge Platform, which can process those scripts at a much greater scale and efficiency." [Forge]

    The pieces of this part of the Forge API include:

    • activity - action (e.g., plotting DWG to PDF file or updating a CAD standard) that can be executed by the AutoCAD Core Engine
    • AppPackage - module (e.g., custom AutoLISP routine that extracts Xdata) referenced by an Activity to perform specific functions
    • module file - AppPackage entity
    • WorkItem - a job that you submit to be executed by the AutoCAD Core Engine
  • Reality Capture API

    "The Reality Capture API gives you the ability to use our latest desktop and cloud solution built for Unmanned Aerial Vehicle (UAV) and drone processes, ReCap Photo. You can add geo-based metadata by setting Ground Control Points (GCPs), selecting specific geographic coordinate systems, and tagging images with GPS information. The integration of this geo data results in accurate textured meshes, point clouds, and orthophotos." [Forge]

    The API for the Photogrammetry engine can process up to 1000 geo-tagged images captured by a UAV or drone with a (rectilinear lens) camera. Ground Control Points (GCPs) can be specified to mark precise coordinates of known points in the scene to generate highly accurate 3D models. The geo-located input as well as output data can be specified in any geo-referenced coordinate system.

    The output data from the Photogrammetry Converter includes:

    • RCM: High resolution streaming Autodesk ReCap textured mesh
    • RCP/RCS: High-density Autodesk ReCap point cloud
    • OBJ: Textured mesh
    • GeoTIFF: Orthophoto

    The API can also be used to request that the Reporter generate a Quality report that details the level of accuracy.

    For a Reconstruction created from non-aerial images, the API can process up to 300 images of objects, statues, building facades, and interiors. It generates high resolution, photorealistic textured mesh models that can be viewed and edited in Autodesk ReCap Photo to create various digital assets.

    The output data includes:

    • RCM: High resolution streaming Autodesk ReCap textured mesh
    • OBJ: Textured mesh
  • Data Management API

    The Data Management API gives you a unified and consistent way to access your data across BIM 360 Team, Fusion Team, BIM 360 Docs, A360 Personal, and its own Object Storage Service. The Object Storage Service allows your application to download and upload raw files (such as PDF, XLS, DWG, or RVT). Coupling this API with the Model Derivative API, you can accomplish a number of workflows, including accessing a Fusion model in Fusion Team and getting an ordered structure of items, IDs, and properties for generating a bill of materials in a 3rd-party process. Or, you might want to superimpose a Fusion model and a building model to use in the Viewer. [Forge]

    The pieces of this part of the Forge API include:

    • Project Service - your application can navigate to a project from BIM 360 Team hub, a Fusion Team hub, an A360 Personal hub, or a BIM 360 Docs account
    • Data Service - your application can navigate and manage the BIM 360 Team, Fusion Team, BIM 360 Docs, or A360 Personal metadata in terms of folders, items, and versions, as well as the relationships between these entities
    • Schema Service - lets your application understand the structure and semantics of extended data types, like Fusion designs
    • Object Storage Service - your application can download and upload raw files that are managed by the Data Service

    As mentioned, these pieces allow you to interact with several Autodesk hubs:

    • BIM 360 Docs — keeps teams on-track with the latest construction drawings, documents, and models. Teams can share construction drawings across the entire team and perform constructability reviews, manage issues, and RFIs. BIM 360 Docs reduces rework risks through versioning and permissions. Users can manage contracts and maintain document control. When construction project teams have the right information at the right time, work happens faster. BIM 360 Docs lets teams publish, manage, review and approve all construction drawings, documents, and models — anytime, anywhere.

    • Fusion Team — lets teams share files securely across departments and supply chains. Users can view models instantly and review designs in real time. Teams communicate better and host real-time design review sessions to make decisions together. Fusion Team centralizes file version history, comments, and mark-ups from distributed teams. Teams can include their supply chains in the design process. Models are safeguarded from download and user access is managed by project administrators. Users can view, share, review, and markup more than 50 2D and 3D design file formats in the browser including STEP, SKP, Inventor (IAM, IPT), Filmbox (FBX), IGS and more. Teams can access critical project details from anywhere on a web browser or mobile device.

    • BIM 360 Team — provides a cloud-based project management workspace for team members, helping them communicate and stay organized at all times. It allows teams to hold real-time design review sessions with all project stakeholders, no matter where they are. Clients, team members, and stakeholders markup and comment directly on designs. Online project collaboration allows user roles and permissions to be managed and controlled by project administrators. Users can view, share, review, and markup more than 50 2D and 3D design file formats in the browser including AutoCAD (DWG, CAD), DXF, Revit (RVT), IFC, and Navisworks (NWD, NWF). Cloud-based project collaboration makes files accessible on mobile or desktop via the BIM 360 Team mobile app.

    • A360 Personal — allows individuals to view and share files — including 2D and 3D designs — on the go, on any device. A360 store data where users can find it and find it when they need it. Right in the browser — without any software, users interact directly with 3D models: Zoom in, walk through, create a section analysis, and orbit, all in real time. Files are accessed by a secure link that an individual sends via email or chat, or embeds into a site. Users navigate through models, capture feedback, and make decisions together. A360 automatically saves edits and comments. Users can search text in documents, metadata on items or components within designs and models, and comments or posts by team members. The data is stored securely in the cloud. It's backed up and recoverable. Users control who can view their files and for how long.

  • Model Derivative API

    The Model Derivative API lets you represent and share your designs in different formats, as well as to extract valuable metadata into various object hierarchies. 60 different file input formats are supported. With this API, you can translate your design into different formats, such as STL and OBJ, but the key one is that you can have it translate your designs into SVF for extracting data and for rendering files in the Viewer.

    The pieces of this part of the Forge API include:

    • Metadata Extraction - your application can extract identifiable elements and properties from a source file
    • Geometry Extraction - your application can identify various geometric representations
    • File Translation - your application can translate source files into output files (derivatives) of different formats

    With this API, you can translate your design into different formats, such as STL and OBJ, but the key one is that you can have it translate your designs into SVF for extracting data and for rendering files in the Viewer.

  • Viewer

    The Viewer is a WebGL-based, JavaScript library for your use in 3D and 2D model rendering. The Viewer communicates natively with the Model Derivative API to fetch model data, complying with its authorization and security requirements. The Viewer requires a WebGL-canvas compatible browser:

    • Chrome 50+
    • Firefox 45+
    • Opera 37+
    • Safari 9+
    • Microsoft Edge 20+
    • Internet Explorer 11

    The Model Derivative API provides a URN to the SVF file. A URN (Uniform Resource Name) is an internet resource with a name that, unlike a Uniform Resource Locator (URL), has persistent significance — that is, the owner of the URN can expect that another program will always be able to find the resource. A frequent problem in using the cloud is that web content is moved to a new site or a new page on the same site. Since hyperlinks reply on URLs, they no longer work when content is moved. URNs do not have this problem. The Viewer converts the SVF (Simple Vector Format) into WebGL that the browser can display natively without an additional plug-in.

    Allowing Forge to render your files in the Viewer is a hassle-free way to share your company's data to your customers without having to deal with all of the peculiarities of these various browsers.

  • Webhooks API

    The Webhooks API is currently undergoing beta testing internally and by Autodesk partners. A webhook sends data to endpoints (URLs) when a certain event occurs. It is triggered by events occurring in web applications. It then sends real-time data to applications listening to it. Since the data is sent immediately, using a webhook is more efficient that frequently polling for updates. The Forge Webhooks API allows your application to listen to Forge Data Management events and receive notifications when they occur. When an event is triggered, the Forge Webhooks API sends a notification to a callback URL you have defined. You can customize the types of events and resources to receive notifications for. For example, you can set up a webhook to send notifications when files are modified or deleted in a specified hub or project. The basic workflow is:

    1. Identify the data you want to receive notifications for.
    2. Use the Webhooks API to create one or more hooks.
    3. The Webhooks API will notify the webhook when there is a change in the data.

    The pieces of this part of the Forge API include:

    • hookId - Unique identifier of the webhook.
    • eventType - Type of event that webhook was created for.
    • sysType - Type of system where webhook was created. Currently, only supported system is Data Management.
    • callbackUrl - URL called when the event type for this system happens.
    • createdBy - Identifier of the creator. Service or user id.
    • creatorType - Type of the creator of the webhook. It can be: Forge Application: Application, User: O2User
    • scope - Extent to where the event will be triggered. The only allowed value in the current release is folder.
    • urn - Unique identifier of the webhook in URN format.
    • status - Status of the webhook. Possible values are: active and inactive.
    • __self__ - Reference to itself.

Autodesk has always been an automation company, and today more than ever that means helping people make more things, better things, with less; more and better in terms of increasing efficiency, performance, quality, and innovation; less in terms of time, resources, and negative impacts (e.g., social, environmental). Autodesk Forge is an integral part of our automation plans.

So regardless of the number of gigabytes of data you have in your design files, you can use these APIs to extract data, surface it, and allow your customers to view and interact with it on your own website. To forge is to make or shape a metal object by heating it in a fire or furnace or beating and hammering it. In terms of customer showcasing, your data is the metal, and our APIs are the heat. What are you waiting for? Go ahead. Light the match.

Tags:

Related Article