Retrieve a Smart Register
This tutorial demonstrates how to retrieve submittal logs that have been imported to the AutoSpecs Smart Register. The steps include retrieving the hub ID for the hub in which you want to retrieve the submittal logs, retrieving the ID of the project in which you want to retrieve the submittal logs, retrieving the ID of the relevant version, and retrieving the Smart Register.
Before You Begin
- Register an app, and select the Data Management and Forma APIs.
- Acquire a 3-legged OAuth token with the
data:readscope. - Verify that you have access to the relevant hub and Forma project. Ensure that the logged in user has access to AutoSpecs.
- Upload a spec book to the project. See the Upload a Spec Book documentation for more details. Note the AutoSpecs API does not currently support uploading spec books.
Step 1: Find the Hub ID
In order to retrieve the ID of the project in which you want to retrieve the Smart Register, you first need to retrieve the ID of the relevant hub. Call GET hubs to find the hub ID for the Forma hub that contains the Smart Register you want to retrieve.
Note that the Forma hub ID corresponds to a Data Management hub ID. To convert a hub ID you need to add a “b.” prefix. For example, a hub ID of d952a4eb-ad57-4d64-b9ab-d540b3b4522e translates to a Data Management hub ID of **b.**\d952a4eb-ad57-4d64-b9ab-d540b3b4522e.
Request
Response
In this example, assume that the hub that contains the Smart Register you want to retrieve is called My First Hub.
Find the hub (data.name), and note the hub ID - b.86b832e9-b22b-2acf-344b-454b3431ac8c.
Step 2: Find the Project ID
Use the hub ID (b.86b832e9-b22b-2acf-344b-454b3431ac8c) to call GET hubs/:hub_id/projects to get a list of all the projects in the hub.
Note that the project ID in Forma corresponds to the project ID in the Data Management API. To convert a project ID in Forma to a project ID in the Data Management API, you need to add a “b.” prefix. For example, a project ID of 75c643d1-c80b-4bca-800f-111a1111aa1a translates to a project ID of **b.**\75c643d1-c80b-4bca-800f-111a1111aa1a.
Request
Response
In this example, assume that My First Project is the project that contains the Smart Register you want to retrieve.
Find the project (data.attributes.name), and note the project ID (data.id) - b.75c643d1-c80b-4bca-800f-111a1111aa1a.
Step 3: Find the Spec Version
Use the project ID (75c643d1-c80b-4bca-800f-111a1111aa1a) to call GET metadata to get a list of the spec versions for the project.
Note that you need to remove the “b.” prefix from the project ID.
Request
Response
In this example, assume that you want to use the current spec version (currentVersion: true).
Note the spec version ID (versions.id) - 101 of the current version.
Note that before you can access the submittal logs the import of the specification PDFs needs to be complete. To verify the status of the import, check that the status is Completed.
Step 4: Retrieve the Smart Register
Use the project ID (75c643d1-c80b-4bca-800f-111a1111aa1a) and the version ID (101) to call GET smartregister to retrieve the Smart Register.
Request
Response
Congratulations! You have retrieved a Smart Register.
Imported from the Autodesk Platform Services documentation: https://aps.autodesk.com/en/docs/acc/v1/tutorials/autospecs/retrieve-smart-register.