diff --git a/DA43dsMax/collections/3dsmax_collections.zip b/DA43dsMax/collections/3dsmax_collections.zip new file mode 100644 index 00000000..54e4eb1a Binary files /dev/null and b/DA43dsMax/collections/3dsmax_collections.zip differ diff --git a/DA43dsMax/collections/DA43dsMax Tutorial.postman_collection.json b/DA43dsMax/collections/DA43dsMax Tutorial.postman_collection.json index c349bdfd..3fe3e74e 100644 --- a/DA43dsMax/collections/DA43dsMax Tutorial.postman_collection.json +++ b/DA43dsMax/collections/DA43dsMax Tutorial.postman_collection.json @@ -1,8 +1,9 @@ { "info": { - "_postman_id": "daf1020e-d6d5-4eb9-aaff-2ec8706ac14e", - "name": "DAS Tutorial", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "_postman_id": "dad5d249-f329-4a2e-9438-88a9b2bb2f6d", + "name": "Automating 3ds Max", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "3021021" }, "item": [ { @@ -11,13 +12,24 @@ { "name": "Get an Access Token", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "const clientId = pm.environment.get(\"client_id\");", + "const clientSecret = pm.environment.get(\"client_secret\");", + "var clientAuthKeys = btoa(clientId +\":\"+clientSecret);", + "pm.collectionVariables.set(\"client_auth_keys\", clientAuthKeys);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "3df16796-5a03-47e5-a63f-00989847157c", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasApiToken\", body[\"access_token\"]);" + "pm.collectionVariables.set(\"dasApiToken\", body.access_token);" ], "type": "text/javascript" } @@ -28,22 +40,23 @@ "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "application/x-www-form-urlencoded", + "type": "text" + }, + { + "key": "Accept", + "value": "application/json", + "type": "text" + }, + { + "key": "Authorization", + "value": "Basic {{client_auth_keys}}", + "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ - { - "key": "client_id", - "value": "{{client_id}}", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{client_secret}}", - "type": "text" - }, { "key": "grant_type", "value": "client_credentials", @@ -51,13 +64,13 @@ }, { "key": "scope", - "value": "code:all data:write data:read bucket:create bucket:delete ", + "value": "code:all data:write data:read bucket:create bucket:delete bucket:read", "type": "text" } ] }, "url": { - "raw": "https://developer.api.autodesk.com/authentication/v1/authenticate", + "raw": "https://developer.api.autodesk.com/authentication/v2/token", "protocol": "https", "host": [ "developer", @@ -67,16 +80,14 @@ ], "path": [ "authentication", - "v1", - "authenticate" + "v2", + "token" ] - }, - "description": "[See Documentation](https://aps.autodesk.com/en/docs/oauth/v2/reference/http/authenticate-POST/)" + } }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 2 - Create a Nickname", @@ -125,8 +136,7 @@ }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 3 - Publish an Activity", @@ -137,7 +147,6 @@ { "listen": "test", "script": { - "id": "b2642d8f-273b-4601-a1c0-150950b79ae4", "exec": [ "" ], @@ -159,7 +168,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"id\": \"executeScript\",\n \"commandLine\": \"\\\"$(engine.path)/3dsmaxbatch.exe\\\" -sceneFile \\\"$(args[InputMaxScene].path)\\\" \\\"$(args[MaxscriptToExecute].path)\\\" -v 5\",\n \"description\": \"Execute a maxscript on a max file provided in a zip\",\n \"appbundles\": [\n \t],\n \"engine\" : \"Autodesk.3dsMax+2021\",\n \"parameters\": {\n \t\"InputMaxScene\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"get\",\n \"description\": \"Input for providing the 3ds Max scene to be loaded before executing the script\",\n \"required\": true,\n \"localName\": \"workingFolder\"\n },\n \"MaxscriptToExecute\": {\n \"zip\": false,\n \"verb\": \"get\",\n \"description\": \"The maxscript to run using 3dsmaxbatch.exe\",\n \"ondemand\": false,\n \"required\": true,\n \"localName\": \"maxscriptToExecute.ms\"\n },\n \"OutputZip\": {\n \"zip\": true,\n \"ondemand\": false,\n \"verb\": \"put\",\n \"description\": \"Gather everything in the working folder inside a zip for output\",\n \"required\": true,\n \"localName\": \"workingFolder\"\n }\n }\n}" + "raw": "{\n\t\"id\": \"executeScript\",\n \"commandLine\": \"\\\"$(engine.path)/3dsmaxbatch.exe\\\" -sceneFile \\\"$(args[InputMaxScene].path)\\\" \\\"$(args[MaxscriptToExecute].path)\\\" -v 5\",\n \"description\": \"Execute a maxscript on a max file provided in a zip\",\n \"appbundles\": [\n \t],\n \"engine\" : \"Autodesk.3dsMax+2023\",\n \"parameters\": {\n \t\"InputMaxScene\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"get\",\n \"description\": \"Input for providing the 3ds Max scene to be loaded before executing the script\",\n \"required\": true,\n \"localName\": \"workingFolder\"\n },\n \"MaxscriptToExecute\": {\n \"zip\": false,\n \"verb\": \"get\",\n \"description\": \"The maxscript to run using 3dsmaxbatch.exe\",\n \"ondemand\": false,\n \"required\": true,\n \"localName\": \"maxscriptToExecute.ms\"\n },\n \"OutputZip\": {\n \"zip\": true,\n \"ondemand\": false,\n \"verb\": \"put\",\n \"description\": \"Gather everything in the working folder inside a zip for output\",\n \"required\": true,\n \"localName\": \"workingFolder\"\n }\n }\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/activities", @@ -221,28 +230,28 @@ }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 4 - Prepare Cloud Storage", "item": [ { - "name": "Create Bucket", + "name": "Create a Bucket", "event": [ { "listen": "test", "script": { - "id": "b8f08e2f-9a04-4e7f-a273-34119fb024cf", "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossBucketKey\", body[\"bucketKey\"]);" + "" ], "type": "text/javascript" } } ], "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { @@ -278,33 +287,37 @@ "response": [] }, { - "name": "Upload Input Zip File to OSS", + "name": "Obtain Signed URL to Upload the Input Zip File", "event": [ { "listen": "test", "script": { - "id": "4bff56ac-f537-44ea-8154-d0012b635d52", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossZipFileObjectKey\", body[\"objectKey\"]);" + "pm.collectionVariables.set(\"UploadKey\", body.uploadKey);", + "pm.collectionVariables.set(\"ContentUploadSignedURL\", body.urls[0]);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { - "method": "PUT", + "auth": { + "type": "noauth" + }, + "method": "GET", "header": [ { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text" } ], - "body": { - "mode": "file" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{$guid}}", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossZipFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -318,95 +331,101 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{$guid}}" + "{{ossZipFileObjectKey}}", + "signeds3upload" + ], + "query": [ + { + "key": "minutesExpiration", + "value": "5", + "disabled": true + } ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-PUT/)" + } }, "response": [] }, { - "name": "Upload Input MAXScript file to OSS", + "name": "Upload the Input Zip File to OSS", "event": [ { "listen": "test", "script": { - "id": "7d594927-c8cd-4a81-a867-f1dce464d1da", "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossScriptFileObjectKey\", body[\"objectKey\"]);" + "console.log(pm.request.body.file.src)" ], "type": "text/javascript" } } ], "request": { + "auth": { + "type": "noauth" + }, "method": "PUT", "header": [ { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text", + "disabled": true } ], "body": { - "mode": "file" + "mode": "file", + "file": { + "src": "" + } }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{$guid}}", - "protocol": "https", + "raw": "{{ContentUploadSignedURL}}", "host": [ - "developer", - "api", - "autodesk", - "com" - ], - "path": [ - "oss", - "v2", - "buckets", - "{{ossBucketKey}}", - "objects", - "{{$guid}}" + "{{ContentUploadSignedURL}}" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-PUT/)" + } }, "response": [] }, { - "name": "Get Temporary Download URL for the Input Zip", + "name": "Complete Uploading the Input Zip File", "event": [ { "listen": "test", "script": { - "id": "58eb33f6-d95a-4092-ba00-823348dec87a", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossZipFileSignedUrl\", body[\"signedUrl\"]);", - "" + "pm.collectionVariables.set(\"ossInputZipFileObjectId\", body.objectId);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" }, { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "key": "Content-Type", + "value": "application/json", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{}\n" + "raw": "{\n \"uploadKey\":\"{{UploadKey}}\"\n}" }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossZipFileObjectKey}}/signed", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossZipFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -421,46 +440,44 @@ "{{ossBucketKey}}", "objects", "{{ossZipFileObjectKey}}", - "signed" + "signeds3upload" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] }, { - "name": "Get Temporary Download URL for the Input Script", + "name": "Obtain Signed URL to Upload the Input MaxScript File", "event": [ { "listen": "test", "script": { - "id": "334bc99a-0dec-4266-a1ea-1f162fcd1097", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossScriptFileSignedUrl\", body[\"signedUrl\"]);" + "pm.collectionVariables.set(\"UploadKey\", body.uploadKey);", + "pm.collectionVariables.set(\"ContentUploadSignedURL\", body.urls[0]);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { - "method": "POST", + "auth": { + "type": "noauth" + }, + "method": "GET", "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text" } ], - "body": { - "mode": "raw", - "raw": "{}\n" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossScriptFileObjectKey}}/signed", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossScriptFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -475,57 +492,100 @@ "{{ossBucketKey}}", "objects", "{{ossScriptFileObjectKey}}", - "signed" + "signeds3upload" + ], + "query": [ + { + "key": "minutesExpiration", + "value": "5", + "disabled": true + } ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] }, { - "name": "Get Temporary Upload URL for the Output Zip", + "name": "Upload the Input MaxScript File", "event": [ { - "listen": "prerequest", + "listen": "test", "script": { - "id": "fbfce144-349e-4ea7-b647-79f6cb972ed1", "exec": [ - "" + "console.log(pm.request.body.file.src)" ], "type": "text/javascript" } + } + ], + "request": { + "auth": { + "type": "noauth" }, + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "file", + "file": { + "src": "" + } + }, + "url": { + "raw": "{{ContentUploadSignedURL}}", + "host": [ + "{{ContentUploadSignedURL}}" + ] + } + }, + "response": [] + }, + { + "name": "Complete Uploading the MaxScript File", + "event": [ { "listen": "test", "script": { - "id": "7c7a5754-f73b-438a-b2f9-6951fe05a451", "exec": [ "var body = JSON.parse(responseBody);", - "", - "pm.environment.set(\"ossOutputFileSignedUrl\", body[\"signedUrl\"]);" + "pm.collectionVariables.set(\"ossInputScriptFileObjectId\", body.objectId);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" }, { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "key": "Content-Type", + "value": "application/json", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{}" + "raw": "{\n \"uploadKey\":\"{{UploadKey}}\"\n}" }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}/signed?access=readwrite", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossScriptFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -539,22 +599,34 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputFileObjectKey}}", - "signed" - ], - "query": [ - { - "key": "access", - "value": "readwrite" - } + "{{ossScriptFileObjectKey}}", + "signeds3upload" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] } ], - "protocolProfileBehavior": {} + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] }, { "name": "Task 5 - Submit a WorkItem", @@ -565,10 +637,9 @@ { "listen": "test", "script": { - "id": "7cf9c997-7d7a-4f98-aadb-6880aa58e299", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasWorkItemId\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasWorkItemId\", body[\"id\"]);" ], "type": "text/javascript" } @@ -588,7 +659,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"activityId\": \"{{dasNickName}}.executeScript+tutorial\",\n\t\"arguments\": {\n\t\t\"InputMaxScene\": {\n \"url\": \"{{ossZipFileSignedUrl}}\",\n \"verb\": \"get\",\n \"pathInZip\": \"sceneName.max\"\n },\n \"MaxscriptToExecute\": {\n \t\"url\": \"{{ossScriptFileSignedUrl}}\",\n \"verb\": \"get\"\n },\n \"OutputZip\": {\n \t\"url\": \"{{ossOutputFileSignedUrl}}\",\n \"verb\": \"put\"\n }\n\t}\n}" + "raw": "{\n\t\"activityId\": \"{{dasNickName}}.executeScript+tutorial\",\n\t\"arguments\": {\n\t\t\"InputMaxScene\": {\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossZipFileObjectKey}}\",\n \"verb\": \"get\",\n \"pathInZip\": \"sceneName.max\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n },\n \"MaxscriptToExecute\": {\n \t\"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossScriptFileObjectKey}}\",\n \"verb\": \"get\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n },\n \"OutputZip\": {\n \t\"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossOutputFileObjectKey}}\",\n \"verb\": \"put\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n }\n\t}\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/workitems", @@ -609,9 +680,43 @@ "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/workitems-POST/)" }, "response": [] + }, + { + "name": "Check Status of a WorkItem Copy", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/workitems/{{dasWorkItemId}}", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "workitems", + "{{dasWorkItemId}}" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/workitems-id-GET/)" + }, + "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 6 - Download the Results ", @@ -652,10 +757,20 @@ "response": [] }, { - "name": "Download Output from OSS", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, + "name": "Get S3 Download URL for Output", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossOutputFileDownloadUrl\", body[\"url\"]);", + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [ @@ -668,12 +783,8 @@ "value": "Bearer {{dasApiToken}}" } ], - "body": { - "mode": "raw", - "raw": "{}" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}/signeds3download", "protocol": "https", "host": [ "developer", @@ -687,19 +798,72 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputFileObjectKey}}" + "{{ossOutputFileObjectKey}}", + "signeds3download" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + }, + "response": [] + }, + { + "name": "Download Output from OSS", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "{{ossOutputFileDownloadUrl}}", + "host": [ + "{{ossOutputFileDownloadUrl}}" ] }, "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-GET/)" }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { - "name": "Clean up HTTP Requests", + "name": "Extras", "item": [ + { + "name": "My App Nickname", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/forgeapps/me", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "forgeapps", + "me" + ] + } + }, + "response": [] + }, { "name": "Delete App Data in Design Automation", "request": { @@ -745,7 +909,6 @@ { "listen": "test", "script": { - "id": "87cf6349-8950-428a-ae7a-59a5ff157444", "exec": [ "" ], @@ -785,13 +948,263 @@ "{{ossBucketKey}}" ] }, - "description": "This request to the Data Management API will delete the bucket that you created in Task 4, and every file that it contains." + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-DELETE/)" + }, + "response": [] + }, + { + "name": "List engines", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/engines", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "engines" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/engines-GET/)" + }, + "response": [] + }, + { + "name": "List Activities", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/activities", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "activities" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/activities-GET/)" + }, + "response": [] + }, + { + "name": "List objects in a Bucket", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "objects" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-GET/)" + }, + "response": [] + }, + { + "name": "List Buckets", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-GET/)" + }, + "response": [] + }, + { + "name": "Get Bucket Details", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/details", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "details" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-details-GET/)" }, "response": [] } ], - "protocolProfileBehavior": {} + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } } ], - "protocolProfileBehavior": {} -} + "variable": [ + { + "key": "client_auth_keys", + "value": "" + }, + { + "key": "dasApiToken", + "value": "" + }, + { + "key": "UploadKey", + "value": "" + }, + { + "key": "ContentUploadSignedURL", + "value": "" + }, + { + "key": "ossBucketKey", + "value": "" + }, + { + "key": "ossInputZipFileObjectId", + "value": "" + }, + { + "key": "ossInputScriptFileObjectId", + "value": "" + }, + { + "key": "dasWorkItemId", + "value": "" + }, + { + "key": "ossOutputFileDownloadUrl", + "value": "" + } + ] +} \ No newline at end of file diff --git a/DA43dsMax/collections/DA43dsMax Tutorial.postman_environment.json b/DA43dsMax/collections/DA43dsMax Tutorial.postman_environment.json index 134a1b1c..b5bb8382 100644 --- a/DA43dsMax/collections/DA43dsMax Tutorial.postman_environment.json +++ b/DA43dsMax/collections/DA43dsMax Tutorial.postman_environment.json @@ -1,5 +1,5 @@ { - "id": "36febf39-3c6a-4340-8982-2c6be4ed2d5b", + "id": "d335021d-4bca-4bb4-9a04-a8e9f3c12fbc", "name": "DA43dsMax Tutorial", "values": [ { @@ -12,11 +12,6 @@ "value": "", "enabled": true }, - { - "key": "dasApiToken", - "value": "", - "enabled": true - }, { "key": "dasNickName", "value": "", @@ -32,43 +27,18 @@ "value": "", "enabled": true }, - { - "key": "ossScriptFileObjectKey", - "value": "", - "enabled": true - }, - { - "key": "ossZipFileSignedUrl", - "value": "", - "enabled": true - }, - { - "key": "ossScriptFileSignedUrl", - "value": "", - "enabled": true - }, { "key": "ossOutputFileObjectKey", "value": "", "enabled": true }, - { - "key": "ossOutputFileSignedUrl", - "value": "", - "enabled": true - }, { "key": "ossScriptFileObjectKey", "value": "", "enabled": true - }, - { - "key": "dasWorkItemId", - "value": "", - "enabled": true } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2019-09-27T08:33:44.149Z", - "_postman_exported_using": "Postman/7.6.0" + "_postman_exported_at": "2023-10-06T07:37:49.956Z", + "_postman_exported_using": "Postman/10.18.2" } \ No newline at end of file diff --git a/DA43dsMax/images/aps_portal_menu_2_postman_menu_01.png b/DA43dsMax/images/aps_portal_menu_2_postman_menu_01.png index c5607987..82602185 100644 Binary files a/DA43dsMax/images/aps_portal_menu_2_postman_menu_01.png and b/DA43dsMax/images/aps_portal_menu_2_postman_menu_01.png differ diff --git a/DA43dsMax/images/aps_portal_menu_2_postman_menu_02.png b/DA43dsMax/images/aps_portal_menu_2_postman_menu_02.png index 580be1e4..2f6cdd20 100644 Binary files a/DA43dsMax/images/aps_portal_menu_2_postman_menu_02.png and b/DA43dsMax/images/aps_portal_menu_2_postman_menu_02.png differ diff --git a/DA43dsMax/images/images:task4-select_files_button.png b/DA43dsMax/images/images:task4-select_files_button.png new file mode 100644 index 00000000..f8e3faff Binary files /dev/null and b/DA43dsMax/images/images:task4-select_files_button.png differ diff --git a/DA43dsMax/images/postman_environment_dropdown.png b/DA43dsMax/images/postman_environment_dropdown.png index 7dd14a5e..f72ea58d 100644 Binary files a/DA43dsMax/images/postman_environment_dropdown.png and b/DA43dsMax/images/postman_environment_dropdown.png differ diff --git a/DA43dsMax/images/task1-authenticate_successfull.png b/DA43dsMax/images/task1-authenticate_successfull.png index 2e6a3f4f..ef9f2479 100644 Binary files a/DA43dsMax/images/task1-authenticate_successfull.png and b/DA43dsMax/images/task1-authenticate_successfull.png differ diff --git a/DA43dsMax/images/task1-environment_quick_look_icon.png b/DA43dsMax/images/task1-environment_quick_look_icon.png index 7308a37a..5749a7f9 100644 Binary files a/DA43dsMax/images/task1-environment_quick_look_icon.png and b/DA43dsMax/images/task1-environment_quick_look_icon.png differ diff --git a/DA43dsMax/images/task1-envoronment_edit_variable.png b/DA43dsMax/images/task1-envoronment_edit_variable.png index 33ed1803..dd3a9be2 100644 Binary files a/DA43dsMax/images/task1-envoronment_edit_variable.png and b/DA43dsMax/images/task1-envoronment_edit_variable.png differ diff --git a/DA43dsMax/images/task1-preview_environment_variables.png b/DA43dsMax/images/task1-preview_environment_variables.png index f8529501..7a9b11ea 100644 Binary files a/DA43dsMax/images/task1-preview_environment_variables.png and b/DA43dsMax/images/task1-preview_environment_variables.png differ diff --git a/DA43dsMax/images/task2-delete_forge_app.png b/DA43dsMax/images/task2-delete_forge_app.png index 2f4bb277..4c12e3de 100644 Binary files a/DA43dsMax/images/task2-delete_forge_app.png and b/DA43dsMax/images/task2-delete_forge_app.png differ diff --git a/DA43dsMax/images/task2-environment_variables_grid.png b/DA43dsMax/images/task2-environment_variables_grid.png index 2ee7b748..46ab2308 100644 Binary files a/DA43dsMax/images/task2-environment_variables_grid.png and b/DA43dsMax/images/task2-environment_variables_grid.png differ diff --git a/DA43dsMax/images/task2-successfull.png b/DA43dsMax/images/task2-successfull.png index 77d2e8cf..c1032648 100644 Binary files a/DA43dsMax/images/task2-successfull.png and b/DA43dsMax/images/task2-successfull.png differ diff --git a/DA43dsMax/images/task3-activity_alias_create_success.png b/DA43dsMax/images/task3-activity_alias_create_success.png index 3ca3b7fd..32f42d64 100644 Binary files a/DA43dsMax/images/task3-activity_alias_create_success.png and b/DA43dsMax/images/task3-activity_alias_create_success.png differ diff --git a/DA43dsMax/images/task3-activity_create_success.png b/DA43dsMax/images/task3-activity_create_success.png index f6479a21..2dca2fe8 100644 Binary files a/DA43dsMax/images/task3-activity_create_success.png and b/DA43dsMax/images/task3-activity_create_success.png differ diff --git a/DA43dsMax/images/task3-create_activity.png b/DA43dsMax/images/task3-create_activity.png index 6ee2830d..f06dadb2 100644 Binary files a/DA43dsMax/images/task3-create_activity.png and b/DA43dsMax/images/task3-create_activity.png differ diff --git a/DA43dsMax/images/task4-completed_upload.png b/DA43dsMax/images/task4-completed_upload.png new file mode 100644 index 00000000..361907c9 Binary files /dev/null and b/DA43dsMax/images/task4-completed_upload.png differ diff --git a/DA43dsMax/images/task4-guid.png b/DA43dsMax/images/task4-guid.png deleted file mode 100644 index af727503..00000000 Binary files a/DA43dsMax/images/task4-guid.png and /dev/null differ diff --git a/DA43dsMax/images/task4-select_files_button.png b/DA43dsMax/images/task4-select_files_button.png index cf4aa726..2b464aa5 100644 Binary files a/DA43dsMax/images/task4-select_files_button.png and b/DA43dsMax/images/task4-select_files_button.png differ diff --git a/DA43dsMax/images/task4-signed_downloadurl.png b/DA43dsMax/images/task4-signed_downloadurl.png deleted file mode 100644 index 36cd08c6..00000000 Binary files a/DA43dsMax/images/task4-signed_downloadurl.png and /dev/null differ diff --git a/DA43dsMax/images/task4-signed_uploadurl.png b/DA43dsMax/images/task4-signed_uploadurl.png deleted file mode 100644 index dcdbb556..00000000 Binary files a/DA43dsMax/images/task4-signed_uploadurl.png and /dev/null differ diff --git a/DA43dsMax/images/task4-successful_upload.png b/DA43dsMax/images/task4-successful_upload.png index cbc29c7f..f8e3faff 100644 Binary files a/DA43dsMax/images/task4-successful_upload.png and b/DA43dsMax/images/task4-successful_upload.png differ diff --git a/DA43dsMax/images/task4-sucessfull_bucket_creation.png b/DA43dsMax/images/task4-sucessfull_bucket_creation.png index e3b26574..0d38bbdf 100644 Binary files a/DA43dsMax/images/task4-sucessfull_bucket_creation.png and b/DA43dsMax/images/task4-sucessfull_bucket_creation.png differ diff --git a/DA43dsMax/images/task5-result_url.png b/DA43dsMax/images/task5-result_url.png index 07d06ad8..bbe15266 100644 Binary files a/DA43dsMax/images/task5-result_url.png and b/DA43dsMax/images/task5-result_url.png differ diff --git a/DA43dsMax/images/task5-workitem_json_payload.png b/DA43dsMax/images/task5-workitem_json_payload.png index 06f0e88d..f982e66e 100644 Binary files a/DA43dsMax/images/task5-workitem_json_payload.png and b/DA43dsMax/images/task5-workitem_json_payload.png differ diff --git a/DA43dsMax/images/task6-check_status.png b/DA43dsMax/images/task6-check_status.png index 5ac04ff3..aed3d0ed 100644 Binary files a/DA43dsMax/images/task6-check_status.png and b/DA43dsMax/images/task6-check_status.png differ diff --git a/DA43dsMax/images/task6-download_step_1.png b/DA43dsMax/images/task6-download_step_1.png index d952ea91..ff2f6599 100644 Binary files a/DA43dsMax/images/task6-download_step_1.png and b/DA43dsMax/images/task6-download_step_1.png differ diff --git a/DA43dsMax/images/task6-download_step_2.png b/DA43dsMax/images/task6-download_step_2.png index 11e1a0ef..da160b9d 100644 Binary files a/DA43dsMax/images/task6-download_step_2.png and b/DA43dsMax/images/task6-download_step_2.png differ diff --git a/DA43dsMax/images/task6-final_status.png b/DA43dsMax/images/task6-final_status.png index 5aa86a78..e1ed3c9e 100644 Binary files a/DA43dsMax/images/task6-final_status.png and b/DA43dsMax/images/task6-final_status.png differ diff --git a/DA43dsMax/images/task7-download_url.png b/DA43dsMax/images/task7-download_url.png new file mode 100644 index 00000000..a5b88f6d Binary files /dev/null and b/DA43dsMax/images/task7-download_url.png differ diff --git a/DA43dsMax/instructions/before_you_begin.md b/DA43dsMax/instructions/before_you_begin.md index 11c1700d..e61bab02 100644 --- a/DA43dsMax/instructions/before_you_begin.md +++ b/DA43dsMax/instructions/before_you_begin.md @@ -1,36 +1,23 @@ # Before you begin... -## 1. Import the Postman Environment for the tutorial +## Import the Postman Collection and Postman environment. -Postman *environments* are named configurations that implement environment variables to store values you typically use across many HTTP requests. For example, you can save the Access Token to use for all HTTP requests, in a variable named `dasApiToken`. +Postman Collections are groups of prepopulated HTTP requests. They can also contain scripts that are executed when you send an HTTP request, and/or recieve a response. -To import the environment you need for this tutorial: +Postman environments are named configurations that implement environment variables to store values you typically use across many HTTP requests. For example, this Postman Collection stores the Access Token, which is used across most HTTP requests, in a variable named `dasApiToken`. -1. Download the file *DA43dsMax Tutorial.postman_environment.json* from the [*collections* folder of this repository](../collections). +To import the Postman Collection and environment you need for this tutorial: -2. Import *DA43dsMax Tutorial.postman_environment.json*: +1. Download the following zip file from the [*collections* folder](../collections) and expand it on your local machine. - 1. In the Postman header bar, click **Import**. A dialog displays. + - _3dsmax_collections.zip_ - 2. Drag the file you downloaded in Step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and find the file you downloaded in Step 1. +2. In the Postman header bar, click **Import**. A dialog displays. -3. Click the environment drop-down on the upper-right, and select **DA43dsMax Tutorial**. The DA43dsMax Tutorial environment loads. +3. Drag the file you expanded in step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and pick the files you downloaded in step 1. - ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") - -## 2. Import the Postman Collection for the tutorial. - -Postman *Collections* are groups of prepopulated HTTP requests. - -To import the requests you need for this tutorial: - -1. Download the file *DA43dsMax Tutorial.postman_collection.json* from the [*collections* folder of this repository](../collections). - -2. Import *DA43dsMax Tutorial.postman_collection.json*: - - 1. In the Postman header bar, click **Import**. A dialog displays. - - 2. Drag the file you downloaded in Step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and find the file you downloaded in Step 1. +4. Click the environment drop-down on the upper-right, and select **DA43dsMax Tutorial**. The environment containing the variables for the tutorial loads. + ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") [:rewind:](../readme.md "readme.md") [:arrow_forward:](task-1.md "Next task") diff --git a/DA43dsMax/instructions/task-1.md b/DA43dsMax/instructions/task-1.md index b8b22a2e..eac2a219 100644 --- a/DA43dsMax/instructions/task-1.md +++ b/DA43dsMax/instructions/task-1.md @@ -2,10 +2,10 @@ ## Create an App -1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v1/tutorials/create-app/). +1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v2/tutorials/create-app/). When specifying details of the app, select "Design Automation API" and "Data Management API". -2. Jot down the *Client ID* and *Client Secret* of the app you created. You will need this in the next step. +2. Note down the *Client ID* and *Client Secret* of the app you created. You will need this in the next step. ## Save Client ID and Client Secret to Postman Environment Variables @@ -29,19 +29,19 @@ To set the environment variables: ## Get an Access Token -To get an Access Token, you must send an `authenticate` request to APS. The Postman Collection has a prepopulated authenticate request that you can send. +To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a pre-populated authenticate request that you can send. To send the request to APS: -To send the authenticate request to APS: +1. On the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads. -1. In the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads. +2. Click the **Pre-request Script** tab. Notice how a script (written in JavaScript) takes the Client ID and Client Secret, concatenates them, converts to a Base64 encoded string, and saves it back to a Postman Collection Variable named `client_auth_keys`. -2. Click the **Body** tab. + ![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret") -3. Move your mouse pointer over the values for **client_id** and **client_secret** in the **VALUES** column, and verify that the values you specified as environment variables are displayed. +3. Click the **Headers** tab. Take note of how `client_auth_keys` is used in the request header. - ![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret") +4. Click the **Body** tab. Take note of how the required scopes are specified. -4. Click **Send**. This sends the HTTP request to APS. If your request authenticates successfully, you should see a return Status of **200 OK**, and the response will be similar to the following: +5. Click **Send**. The request is sent to APS. If your request authenticates successfully, you should see a response similar to the following: ![Successful authentication](../images/task1-authenticate_successfull.png "Successful authentication") diff --git a/DA43dsMax/instructions/task-2.md b/DA43dsMax/instructions/task-2.md index 37d3d8a9..c20cc2de 100644 --- a/DA43dsMax/instructions/task-2.md +++ b/DA43dsMax/instructions/task-2.md @@ -6,13 +6,11 @@ A *Nickname* lets you map a Client ID to an easy-to-use name that you can use in **Notes:** -- As long as your app doesn't have any data, you can map the app to a different Nickname. Once you add data to an App, you cannot set a Nickname for it, or change an existing Nickname. - -- The only way you can assign a Nickname to an app with data is by first calling `[DELETE] /forgeapps/me`. This deletes all data associated with that app, including the Nickname. At the end of this tutorial, the HTTP request **Clean up HTTP Requests > DEL Delete App Data in Design Automation** calls this endpoint and clears the app of all data. +- Once you add data to an App, you are not allowed to set a nickname for the app. The only way you can assign a nickname to an app with data is by first calling the `[DELETE] /forgeapps/me`. This action deletes all data associated with that app, including any existing nickname. The request **Extras > Delete App Data in Design Automation** in this Postman Collection calls (`[DELETE] /forgeapps/me`) and clears the app of all data. ![Delete App Data](../images/task2-delete_forge_app.png "Delete app") -- If you get stuck while working on this tutorial, you can use **DEL Delete App Data in Design Automation** to clear all data from the app, and restart from Task 1. +- If you get stuck while working on this tutorial, and are unable to proceed, use this request to clear all data from the app, and restart from Task 1. - Nicknames cannot contain spaces, and must be globally unique. If the nickname is already in use, even by someone else, APS returns a `409 Conflict` error when you try to set the Nickname. diff --git a/DA43dsMax/instructions/task-3.md b/DA43dsMax/instructions/task-3.md index 87d63d9e..5a400771 100644 --- a/DA43dsMax/instructions/task-3.md +++ b/DA43dsMax/instructions/task-3.md @@ -11,19 +11,19 @@ An *Activity* is an action that can be executed using the Design Automation API. ![Body tab of Create Activity](../images/task3-create_activity.png "Body tab of Create Activity") **Notes** - - `id` is the name given to the new Activity. - + - `id` is the name given to the new Activity. + - `commandLine` is the command run by this Activity. The variables used on the command line are replaced with actual values before executing the Activity. This mechanism lets you replace the file path(s) you used while testing the command line locally, with file paths that are applicable to Design Automation. For more information see the [documentation on Command lines](https://aps.autodesk.com/en/docs/design-automation/v3/developers_guide/field-guide/#command-lines). The variables used on the command line are: - - `$(engine.path)` - The full path to the folder containing *3dsmaxbatch.exe*. The variable ``$(engine.path)`` will be replaced by the path to where the engine is installed. The engine is defined in the JSON payload as `"engine": "Autodesk.3dsMax+2020"`. **Do not edit or alter this commandLine in the request body of Activity posts.** + - `$(engine.path)` - The full path to the folder containing *3dsmaxbatch.exe*. The variable ``$(engine.path)`` will be replaced by the path to where the engine is installed. The engine is defined in the JSON payload as `"engine": "Autodesk.3dsMax+2023"`. **Do not edit or alter this commandLine in the request body of Activity posts.** - ` $(args[InputMaxScene].path)` - Will be replaced by the path to a file specified by a parameter named `InputMaxScene`. - `$(args[MaxscriptToExecute].path)` - Will be replaced by the path to a file specified by a parameter named `MaxscriptToExecute`. -- `engine` is the Design Automation engine that the Activity must run on (3ds Max 2020 in this case). +- `engine` is the Design Automation engine that the Activity must run on (3ds Max 2023 in this case). 3. Click **Send**. If the request is successful, you should see a screen similar to the following image. diff --git a/DA43dsMax/instructions/task-4.md b/DA43dsMax/instructions/task-4.md index 302f3de5..5868859b 100644 --- a/DA43dsMax/instructions/task-4.md +++ b/DA43dsMax/instructions/task-4.md @@ -1,6 +1,6 @@ # Task 4 - Prepare cloud storage -When Design Automation executes the Activity you created in Task 3, it must access the 3ds Max scene file to process and the MAXScript file to run. Design Automation also needs to upload the output of the Activity. You can use any cloud storage service for this purpose. However, in this task, you will use the Data Management API to access the *Object Storage Service* (*OSS*). You will also generate temporary *signed URLs* (URLs that contain authentication information) to let Design Automation download the input files and upload the output file. +When Design Automation executes the Activity you created in Task 3, it must access the 3ds Max scene file to process and the MAXScript file to run. Design Automation also needs to upload the output of the Activity. You can use any cloud storage service for this purpose. However, in this task, you will use the Data Management API to access the *Object Storage Service* (*OSS*). ## Create a Bucket @@ -27,70 +27,90 @@ In this tutorial, you will use a Postman environment variable named `ossBucketKe ![Successful Bucket Creation](../images/task4-sucessfull_bucket_creation.png "Successful Bucket Creation") -## Upload 3ds Max scene file to OSS +## Obtain Signed URL to upload 3ds Max scene file to OSS 1. Download the zip file containing the 3ds Max scene file *input.zip* from the [*tutorial_data* folder of this repository](../tutorial_data). -2. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > PUT Upload Input ZIP File TO OSS**. The request loads. +2. Click the **Environment quick look** icon on the upper right corner of Postman. + +3. In the **CURRENT VALUE** column, in the **ossZipFileObjectKey** row, specify an Object Key for the file you are going to upload (**Tip:** You can specify the file name of the file you will upload as the Object Key, which is *input.zip*). + +4. Click the **Environment quick look** icon to hide the variables. + +5. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > GET Obtain Signed URL to Upload the Input Zip File**. The request loads. + +6. Click **Send**. The signed URL is saved to a Collection Variable named `ContentUploadSignedURL`. The Upload Key is also saved to a variable named `UploadKey`. The Upload Key uniquely identifies the upload session. You use it later to complete the upload session. - Note the use of the Postman dynamic variable `guid` as a query-string parameter specifying the Object Key of the zip file. This variable generates a unique ID for the Object Key. A script specified in the **Tests** tab saves the Object Key to a Postman environment variable named `ossZipFileObjectKey`. +## Upload 3ds Max scene file to OSS - ![guid](../images/task4-guid.png "guid") +1. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > PUT Upload Input ZIP File TO OSS**. The request loads. 3. Click the **Body** tab. -4. Click **Select File** and select the zip file you downloaded in Step 1. +4. Click **Select File** and select the zip file you downloaded earlier. ![Select file button](../images/task4-select_files_button.png "Select file button") -5. Click **Send**. This sends the request, and updates the Postman environment variable `ossZipFileObjectKey`. If your request is successful, you should see a screen similar to the following image: +5. Click **Send**. If your request is successful, you should see a screen similar to the following image: ![Successful upload of input file](../images/task4-successful_upload.png "Successful upload of input file") -## Upload MAXScript file to OSS +## Complete the upload operation + +To make the uploaded file available for download, you must specifically instruct OSS that the upload process has been completed. + +1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Complete Uploading the Input Zip File**. The request loads. + +2. Click the **Body** tab and pay attention to how the Upload Key tells OSS what upload session to close. + +2. Click **Send**. If your request is successful, you should see a screen similar to the one below: + + ![Successful upload of input file](../images/task4-completed_upload.png "Completed upload of input file") + +## Obtain Signed URL to Upload MAXScript file to OSS 1. Download the file *Twistit.ms*, containing the 3ds Max scene file, from the [*tutorial_data* folder of this repository](../tutorial_data). -2. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > PUT Upload Input MAXScript File to OSS**. The request loads. +2. Click the **Environment quick look** icon on the upper right corner of Postman. -3. Click the **Body** tab. +3. In the **CURRENT VALUE** column, in the **ossScriptFileObjectKey** row, specify an Object Key for the file you are going to upload (**Tip:** Specify the file name of the dwg file: *Twistit.ms*). -4. Click **Select File** and select the MAXScript file you downloaded in Step 1. +4. Click the **Environment quick look** icon to hide the variables. -5. Click **Send**. This sends the request and updates the Postman environment variable `ossScriptFileObjectKey`. If the request is successful, the response status should be `200 OK`. +5. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > GET Obtain Signed URL to Upload the Input File**. The request loads. -## Get temporary download URL for 3ds Max scene file +6. Click **Send**. The signed URL is saved to a Collection Variable named `ContentUploadSignedURL`. The Upload Key is also saved to a variable named `UploadKey`. The Upload Key uniquely identifies the upload session. You use it later to complete the upload session. -Design Automation needs to download the 3ds Max scene file to process it. This request obtains a temporary signed URL that Design Automation can use to download the file. Postman then saves the signed URL to the Postman environment variable `ossZipFileSignedUrl`. -1. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > POST Get Temporary Download URL for the Input Zip**. The request loads. +## Upload MAXScript file to OSS -2. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, Postman saves the signed URL to the `ossZipFileSignedUrl` Postman environment variable. +1. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > PUT Upload Input MAXScript File to OSS**. The request loads. - ![Signed download URL](../images/task4-signed_downloadurl.png "Signed download URL") +3. Click the **Body** tab. -## Get temporary download URL for MAXScript file +4. Click **Select File** and select the MAXScript file you downloaded earlier. -This request obtains a temporary signed URL that Design Automation can use to download the MAXScript file when it executes the Activity. Postman then saves the signed URL to the Postman environment variable `ossScriptFileSignedUrl`. +5. Click **Send**. If the request is successful, the response status should be `200 OK`. -1. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > POST Get Temporary Download URL for the Input Script**. The request loads. +## Complete the upload operation -2. Click **Send**. This sends the request and saves the signed URL to the `ossScriptFileSignedUrl` Postman environment variable. If the request is successful, the response status should be `200 OK`. +To make the uploaded file available for download, you must specifically instruct OSS that the upload process has been completed. -## Get temporary upload URL +1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Complete Uploading the MaxScript File**. The request loads. -Design Automation needs a signed URL to upload the generated output. This request obtains a temporary signed URL that Design Automation can use to upload the file, and the Postman saves it to a Postman environment variable `ossUploadURL`. +2. Click the **Body** tab and pay attention to how the Upload Key tells OSS what upload session to close. -1. Click the **Environment quick look** icon on the upper right corner of Postman. +3. Click **Send**. -2. In the **CURRENT VALUE** column, in the **ossOutputFileObjectKey** row, specify an Object Key (a name to identify the output file, once it is uploaded to OSS). +## Define Object Key for the file generated by the activity. -3. Click the **Environment quick look** icon to hide the variables. +The Activity you defined in Task 3 generates a zip file containing a *.png* file and a scene file. You must specify an Object Key for the zip file so that Design Automation is save it to OSS. Use the Postman Environment Variables `ossOutputFileObjectKey` to hold the Object Key. + +1. Click the **Environment quick look** icon on the upper right corner of Postman. -4. In the Postman sidebar, click **Task 4 - Prepare Cloud Storage > POST Get Temporary Upload URL for the Output Zip**. The request loads. +2. In the **CURRENT VALUE** column, in the **ossOutputFileObjectKey** row, specify an Object Key for the text file that `ListLayersActivity` generates. -5. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, the signed URL is saved to the `ossUploadURL` Postman environment variable. + **Tip:** You can use the name you specified for the `OutputZip`, when you defined the Activity in Task 3 (*workingFolder.zip*). - ![Signed upload URL](../images/task4-signed_uploadurl.png "Signed upload URL") [:rewind:](../readme.md "readme.md") [:arrow_backward:](task-3.md "Previous task") [:arrow_forward:](task-5.md "Next task") diff --git a/DA43dsMax/instructions/task-5.md b/DA43dsMax/instructions/task-5.md index d8e7c79c..81ad3319 100644 --- a/DA43dsMax/instructions/task-5.md +++ b/DA43dsMax/instructions/task-5.md @@ -17,11 +17,11 @@ When you submit a *WorkItem* to Design Automation, you are instructing Design Au - `arguments` - Contains all the parameters needed by the Activity specified by `activityId`. They must match the parameters you specified in Task 3, when you created the Activity. - - `InputMaxScene` - Specifies how to obtain the 3ds Max scene file for the Activity. It contains either the signed URL to the scene file, or a zip file that contains the scene file. This is followed by the HTTP verb that gets the file. If you uploaded a zip file in Task 4, use the `pathInZip` attribute to specify the relative path to the 3ds Max file. If you uploaded a 3ds Max file instead of a zip file, do not specify the `pathInZip` attribute. + - `InputMaxScene` - Specifies how to obtain the 3ds Max scene file for the Activity. It contains the URN of the scene file, or the URN of a zip file that contains the scene file. This is followed by the HTTP verb that gets the file. If you uploaded a zip file in Task 4, use the `pathInZip` attribute to specify the relative path to the 3ds Max file. If you uploaded a 3ds Max file instead of a zip file, do not specify the `pathInZip` attribute. - - `MaxscriptToExecute` - Specifies how to obtain the MAXScript file for the Activity. It contains the signed URL to download the MAXScript file. + - `MaxscriptToExecute` - Specifies how to obtain the MAXScript file for the Activity. It contains the URN of the MAXScript file. - - `OutputZip` - Specifies the signed URL to the location reserved for the output of the activity, followed by the HTTP verb to use. + - `OutputZip` - Specifies the URN for the file generated by the Activity, followed by the HTTP verb to use. 3. Click **Send**. Postman saves the WorkItem ID to the `dasWorkItemId` environment variable. If the request is successful you should see a screen similar to the following image. diff --git a/DA43dsMax/instructions/task-6.md b/DA43dsMax/instructions/task-6.md index cf6ade2b..5b0036b7 100644 --- a/DA43dsMax/instructions/task-6.md +++ b/DA43dsMax/instructions/task-6.md @@ -1,14 +1,14 @@ # Task 6 - Download the results -Before you download the results from from your WorkItem, it must must complete execution. You can periodically check the status of the WorkItem and download the results once execution is complete. Alternatively, you can get Design Automation to send a POST request to a callback URL you specify, once execution is done. +Before you download the results from from your WorkItem, it must must complete execution. You can periodically check the status of the WorkItem and download the results once execution is complete. Alternatively, you can get Design Automation to send a POST request to a callback URL you specify, once execution is done. -In this tutorial, you will periodically check the status of the WorkItem. +In this tutorial, you will periodically check the status of the WorkItem. For information on how to specify a callback URL instead, see the [APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/developers_guide/callbacks/#oncomplete-callback). ## Check Status of a WorkItem -Design Automation queues WorkItems before processing them. Processing itself can take time. As such, it is important for you to check the status of the WorkItem you created, to know when the WorkItem completes, and whether the WorkItem ran successfully or not. +Design Automation queues WorkItems before processing them. Processing itself can take time. As such, it is important for you to check the status of the WorkItem you created, to know when the WorkItem completes, and whether the WorkItem ran successfully or not. 1. In the Postman sidebar, click **Task 6 - Download the Result > GET Check Status of the WorkItem**. The request loads. @@ -19,7 +19,15 @@ Design Automation queues WorkItems before processing them. Processing itself can 3. Repeat Step 2, until you see a screen similar to the following, where the status reads `success`. ![WorkItem Status check result](../images/task6-final_status.png "WorkItem Status check result") - + +## Get temporary download URL for the result + +1. On the Postman sidebar, click **Task 6 - Download the Result > GET Get S3 Download URL for Output**. The request loads. + +2. Click **Send**. You should see a screen similar to the following image. + + ![Download URL](../images/task7-download_url.png "Download URL") + ## Download the output from OSS 1. In the Postman sidebar, click **Task 6 - Download the Result > GET Download Output from OSS**. The request loads. @@ -28,7 +36,7 @@ Design Automation queues WorkItems before processing them. Processing itself can ![Download Result](../images/task6-download_step_1.png "Download Result") -3. In the response area, click **Save Response > Save to a file**. The output file downloads. Save the file as a *.zip* file, when prompted. +3. In the response area, click **Save Response to a file**. The output file downloads. Save the file as a *.zip* file, when prompted. ![Download Result](../images/task6-download_step_2.png "Download Result") diff --git a/DA43dsMax/readme.md b/DA43dsMax/readme.md index 9c53a464..1e55d890 100644 --- a/DA43dsMax/readme.md +++ b/DA43dsMax/readme.md @@ -1,7 +1,7 @@ # Design Automation for 3ds Max Step-by-Step Tutorial ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Design-Automation](https://img.shields.io/badge/Design%20Automation-v3-green.svg)](http://developer.autodesk.com/) diff --git a/DA4ACAD/collections/DA4ACAD Tutorial.postman_collection.json b/DA4ACAD/collections/DA4ACAD Tutorial.postman_collection.json index be69ad28..1f154fdd 100644 --- a/DA4ACAD/collections/DA4ACAD Tutorial.postman_collection.json +++ b/DA4ACAD/collections/DA4ACAD Tutorial.postman_collection.json @@ -1,8 +1,9 @@ { "info": { - "_postman_id": "cbab598b-dc90-4041-ab1f-ca1b10364a2e", - "name": "DA4ACAD Tutorial", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "_postman_id": "9d0a89a6-5463-4d92-a4f2-2a15a1d5a8c7", + "name": "Automating AutoCAD", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "3021021" }, "item": [ { @@ -11,13 +12,24 @@ { "name": "Get an Access Token", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "const clientId = pm.environment.get(\"client_id\");", + "const clientSecret = pm.environment.get(\"client_secret\");", + "var clientAuthKeys = btoa(clientId +\":\"+clientSecret);", + "pm.collectionVariables.set(\"client_auth_keys\", clientAuthKeys);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "e7342707-f41f-45d7-896e-a668e052bbfc", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasApiToken\", body[\"access_token\"]);" + "pm.collectionVariables.set(\"dasApiToken\", body.access_token);" ], "type": "text/javascript" } @@ -28,22 +40,23 @@ "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "application/x-www-form-urlencoded", + "type": "text" + }, + { + "key": "Accept", + "value": "application/json", + "type": "text" + }, + { + "key": "Authorization", + "value": "Basic {{client_auth_keys}}", + "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ - { - "key": "client_id", - "value": "{{client_id}}", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{client_secret}}", - "type": "text" - }, { "key": "grant_type", "value": "client_credentials", @@ -57,7 +70,7 @@ ] }, "url": { - "raw": "https://developer.api.autodesk.com/authentication/v1/authenticate", + "raw": "https://developer.api.autodesk.com/authentication/v2/token", "protocol": "https", "host": [ "developer", @@ -67,16 +80,14 @@ ], "path": [ "authentication", - "v1", - "authenticate" + "v2", + "token" ] - }, - "description": "[See Documentation](https://aps.autodesk.com/en/docs/oauth/v2/reference/http/authenticate-POST/)" + } }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 2 - Create a Nickname", @@ -125,8 +136,7 @@ }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 3 - Upload AppBundle", @@ -137,18 +147,17 @@ { "listen": "test", "script": { - "id": "b7f12a27-5199-465f-978a-2291085e1d12", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ListLayersAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", - "pm.environment.set(\"ListLayersAppVersion\", body[\"version\"]);", - "pm.environment.set(\"ListLayersAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", - "pm.environment.set(\"ListLayersAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", - "pm.environment.set(\"ListLayersAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", - "pm.environment.set(\"ListLayersAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", - "pm.environment.set(\"ListLayersAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", - "pm.environment.set(\"ListLayersAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", - "pm.environment.set(\"ListLayersAppFormRedirect\", body[\"uploadParameters\"][\"formData\"][\"success_action_redirect\"]);" + "pm.collectionVariables.set(\"ListLayersAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", + "pm.collectionVariables.set(\"ListLayersAppVersion\", body[\"version\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", + "pm.collectionVariables.set(\"ListLayersAppFormRedirect\", body[\"uploadParameters\"][\"formData\"][\"success_action_redirect\"]);" ], "type": "text/javascript" } @@ -170,7 +179,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": \"{{dasAppBundleName}}\",\n \"engine\": \"Autodesk.AutoCAD+23\",\n \"description\": \"List Layers AppBundle based on AutoCAD 2020\"\n}" + "raw": "{\n \"id\": \"{{dasAppBundleName}}\",\n \"engine\": \"Autodesk.AutoCAD+24_2\",\n \"description\": \"List Layers AppBundle based on AutoCAD 2023\"\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/appbundles", @@ -198,7 +207,6 @@ { "listen": "prerequest", "script": { - "id": "3d596d83-6ce2-4cd1-b702-bb5f9e83fcef", "exec": [ "" ], @@ -208,14 +216,8 @@ { "listen": "test", "script": { - "id": "fdb0a16e-f86f-483a-bc5f-4dec03012079", "exec": [ - "pm.environment.unset(\"ListLayersAppFormDataKey\");", - "pm.environment.unset(\"ListLayersAppFormDataPolicy\");", - "pm.environment.unset(\"ListLayersAppFormDataSignature\");", - "pm.environment.unset(\"ListLayersAppFormDataCredential\");", - "pm.environment.unset(\"ListLayersAppFormDataDate\");", - "pm.environment.unset(\"ListLayersAppFormDataToken\");" + "" ], "type": "text/javascript" } @@ -305,10 +307,9 @@ { "listen": "test", "script": { - "id": "aa4a32f1-5424-47e4-9e1b-a6a6f9973df6", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasAppBundleAlias\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasAppBundleAlias\", body[\"id\"]);" ], "type": "text/javascript" } @@ -357,8 +358,7 @@ }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 4 - Publish an Activity", @@ -369,7 +369,6 @@ { "listen": "test", "script": { - "id": "1c276a3e-1707-41b5-9643-685d1364fb5c", "exec": [ "" ], @@ -391,7 +390,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": \"{{dasActivityName}}\",\n \"commandLine\": [\n \"$(engine.path)\\\\accoreconsole.exe /i \\\"$(args[InputDwg].path)\\\" /al \\\"$(appbundles[{{dasAppBundleName}}].path)\\\" /s \\\"$(settings[script].path)\\\"\"\n ],\n \"parameters\": {\n \"InputDwg\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"get\",\n \"description\": \"Input drawing file\",\n \"localName\": \"Input.dwg\"\n },\n \"result\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"put\",\n \"description\": \"Results\",\n \"required\": true,\n \"localName\": \"layers.txt\"\n }\n },\n \"engine\": \"Autodesk.AutoCAD+22\",\n \"appbundles\": [\n \"{{dasNickName}}.{{dasAppBundleName}}+{{dasAppBundleAlias}}\"\n ],\n \"settings\": {\n \"script\": \"(command \\\"LISTLAYERS\\\")\\n\"\n },\n \"description\": \"Extracts layer names from an input drawing file and saves them to a text file\"\n}" + "raw": "{\n \"id\": \"{{dasActivityName}}\",\n \"commandLine\": [\n \"$(engine.path)\\\\accoreconsole.exe /i \\\"$(args[InputDwg].path)\\\" /al \\\"$(appbundles[{{dasAppBundleName}}].path)\\\" /s \\\"$(settings[script].path)\\\"\"\n ],\n \"parameters\": {\n \"InputDwg\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"get\",\n \"description\": \"Input drawing file\",\n \"localName\": \"Input.dwg\"\n },\n \"result\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"put\",\n \"description\": \"Results\",\n \"required\": true,\n \"localName\": \"layers.txt\"\n }\n },\n \"engine\": \"Autodesk.AutoCAD+24_2\",\n \"appbundles\": [\n \"{{dasNickName}}.{{dasAppBundleName}}+{{dasAppBundleAlias}}\"\n ],\n \"settings\": {\n \"script\": \"(command \\\"LISTLAYERS\\\")\\n\"\n },\n \"description\": \"Extracts layer names from an input drawing file and saves them to a text file\"\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/activities", @@ -419,10 +418,9 @@ { "listen": "test", "script": { - "id": "50db8d74-d9d5-4460-b0b2-cf1ff1f7b4ea", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasActivityAlias\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasActivityAlias\", body[\"id\"]);" ], "type": "text/javascript" } @@ -471,7 +469,6 @@ { "listen": "prerequest", "script": { - "id": "f6171070-6a9d-405c-afd1-8283d1bd5e19", "type": "text/javascript", "exec": [ "" @@ -481,15 +478,13 @@ { "listen": "test", "script": { - "id": "9aeaa3f0-7e03-4f56-bd5c-26f94e2ed01b", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 5 - Prepare Cloud Storage", @@ -500,16 +495,17 @@ { "listen": "test", "script": { - "id": "d798b06c-cc34-452a-8e8b-77dda52f4bad", "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossBucketKey\", body[\"bucketKey\"]);" + "" ], "type": "text/javascript" } } ], "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { @@ -545,34 +541,37 @@ "response": [] }, { - "name": "Upload Input File to OSS", + "name": "Obtain Signed URL to Upload the Input File", "event": [ { "listen": "test", "script": { - "id": "d0343ad2-94f0-4b57-bf5c-f89285ef0b01", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossDwgFileObjectKey\", body[\"objectKey\"]);" + "pm.collectionVariables.set(\"UploadKey\", body.uploadKey);", + "pm.collectionVariables.set(\"ContentUploadSignedURL\", body.urls[0]);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { - "method": "PUT", + "auth": { + "type": "noauth" + }, + "method": "GET", "header": [ { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text" } ], - "body": { - "mode": "file", - "file": {} - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossDwgFileObjectKey}}", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossDwgFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -586,112 +585,101 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossDwgFileObjectKey}}" + "{{ossDwgFileObjectKey}}", + "signeds3upload" + ], + "query": [ + { + "key": "minutesExpiration", + "value": "5", + "disabled": true + } ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-PUT/)" + } }, "response": [] }, { - "name": "Get Temporary Download URL", + "name": "Upload the Input File to OSS", "event": [ { "listen": "test", "script": { - "id": "ccd64087-feb2-4212-a0b2-200bb31de560", "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossDwgFileSignedUrl\", body[\"signedUrl\"]);", - "" + "console.log(pm.request.body.file.src)" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "auth": { + "type": "noauth" + }, + "method": "PUT", "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text", + "disabled": true } ], "body": { - "mode": "raw", - "raw": "{}\n" + "mode": "file", + "file": { + "src": "" + } }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossDwgFileObjectKey}}/signed", - "protocol": "https", + "raw": "{{ContentUploadSignedURL}}", "host": [ - "developer", - "api", - "autodesk", - "com" - ], - "path": [ - "oss", - "v2", - "buckets", - "{{ossBucketKey}}", - "objects", - "{{ossDwgFileObjectKey}}", - "signed" + "{{ContentUploadSignedURL}}" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] }, { - "name": "Get Temporary Upload URL", + "name": "Complete the Upload", "event": [ - { - "listen": "prerequest", - "script": { - "id": "fc6baf87-e384-4d56-9698-6dfc5b588350", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "f590b07c-50f8-4600-826d-63354bb34a13", "exec": [ "var body = JSON.parse(responseBody);", - "", - "pm.environment.set(\"ossOutputFileSignedUrl\", body[\"signedUrl\"]);" + "pm.collectionVariables.set(\"ossDwgFileObjectId\", body.objectId);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" }, { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "key": "Content-Type", + "value": "application/json", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{}" + "raw": "{\n \"uploadKey\":\"{{UploadKey}}\"\n}" }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}/signed?access=readwrite", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossDwgFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -705,17 +693,10 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputFileObjectKey}}", - "signed" - ], - "query": [ - { - "key": "access", - "value": "readwrite" - } + "{{ossDwgFileObjectKey}}", + "signeds3upload" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] } @@ -724,7 +705,6 @@ { "listen": "prerequest", "script": { - "id": "3f22d8ff-3455-44b0-a821-b8729f2e30d6", "type": "text/javascript", "exec": [ "" @@ -734,15 +714,13 @@ { "listen": "test", "script": { - "id": "c61a0305-ea7a-4675-8d4e-2aef33758b7b", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 6 - Submit a WorkItem", @@ -753,10 +731,9 @@ { "listen": "test", "script": { - "id": "5f687e42-5667-4e90-a7ad-1bb33fc0f786", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasWorkItemId\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasWorkItemId\", body[\"id\"]);" ], "type": "text/javascript" } @@ -764,7 +741,6 @@ { "listen": "prerequest", "script": { - "id": "7c7be5e3-a6ba-40ae-9296-d196d4d8a904", "exec": [ "" ], @@ -786,7 +762,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"activityId\": \"{{dasNickName}}.{{dasActivityName}}+{{dasActivityAlias}}\",\n\t\"arguments\": {\n\t\t\"InputDwg\": {\n \"url\": \"{{ossDwgFileSignedUrl}}\",\n \"verb\": \"get\"\n },\n \"result\": {\n \t\"url\": \"{{ossOutputFileSignedUrl}}\",\n \"verb\": \"put\"\n }\n\t}\n}" + "raw": "{\n \"activityId\": \"{{dasNickName}}.{{dasActivityName}}+{{dasActivityAlias}}\",\n \"arguments\": {\n \"InputDwg\": {\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossDwgFileObjectKey}}\",\n \"verb\": \"get\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n },\n \"result\": {\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossOutputFileObjectKey}}\",\n \"verb\": \"put\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n }\n }\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/workitems", @@ -848,7 +824,6 @@ { "listen": "prerequest", "script": { - "id": "1132e67f-2739-47b3-914a-0f75a86224d1", "type": "text/javascript", "exec": [ "" @@ -858,24 +833,32 @@ { "listen": "test", "script": { - "id": "ce1fe857-f05c-4130-8e35-b2f9147e26d1", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 7 - Download the Results ", "item": [ { - "name": "Download Output from OSS", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, + "name": "Get S3 Download URL for the Result", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossOutputFileDownloadUrl\", body[\"url\"]);", + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [ @@ -888,12 +871,8 @@ "value": "Bearer {{dasApiToken}}" } ], - "body": { - "mode": "raw", - "raw": "{}" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}/signeds3download", "protocol": "https", "host": [ "developer", @@ -907,7 +886,23 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputFileObjectKey}}" + "{{ossOutputFileObjectKey}}", + "signeds3download" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + }, + "response": [] + }, + { + "name": "Download Output from OSS", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{ossOutputFileDownloadUrl}}", + "host": [ + "{{ossOutputFileDownloadUrl}}" ] }, "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-GET/)" @@ -919,7 +914,6 @@ { "listen": "prerequest", "script": { - "id": "d77a1f77-f6f9-46ec-9146-cff573fa2f2c", "type": "text/javascript", "exec": [ "" @@ -929,15 +923,13 @@ { "listen": "test", "script": { - "id": "45f247a9-bfb1-464b-b5aa-ec2cbf9b3273", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Extras", @@ -987,7 +979,6 @@ { "listen": "test", "script": { - "id": "0ea5b8b5-1154-4350-bd8d-f59368b892ea", "exec": [ "" ], @@ -1236,13 +1227,196 @@ "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-details-GET/)" }, "response": [] + }, + { + "name": "Get all Accessible App Bundles", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/appbundles", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "appbundles" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-details-GET/)" + }, + "response": [] + }, + { + "name": "Get S3 Download URL", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossDwgFileSignedUrl\", body[\"signedUrl\"]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{}\n" + }, + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossDwgFileObjectKey}}/signed", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "objects", + "{{ossDwgFileObjectKey}}", + "signed" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + }, + "response": [] + }, + { + "name": "Get Temporary URL to Upload Output", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossOutputFileSignedUrl\", body[\"signedUrl\"]);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}/signed?access=readwrite", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "objects", + "{{ossOutputFileObjectKey}}", + "signed" + ], + "query": [ + { + "key": "access", + "value": "readwrite" + } + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + }, + "response": [] + }, + { + "name": "My App Nickname", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/forgeapps/me", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "forgeapps", + "me" + ] + } + }, + "response": [] } ], "event": [ { "listen": "prerequest", "script": { - "id": "20d715f3-6887-4c89-8a03-55a79fcb4bba", "type": "text/javascript", "exec": [ "" @@ -1252,16 +1426,91 @@ { "listen": "test", "script": { - "id": "7ce34874-5d7d-4317-8808-a3715fb86712", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] } ], - "protocolProfileBehavior": {} + "variable": [ + { + "key": "client_auth_keys", + "value": "" + }, + { + "key": "dasApiToken", + "value": "" + }, + { + "key": "ListLayersAppUrl", + "value": "" + }, + { + "key": "ListLayersAppVersion", + "value": "" + }, + { + "key": "ListLayersAppFormDataKey", + "value": "" + }, + { + "key": "ListLayersAppFormDataPolicy", + "value": "" + }, + { + "key": "ListLayersAppFormDataSignature", + "value": "" + }, + { + "key": "ListLayersAppFormDataCredential", + "value": "" + }, + { + "key": "ListLayersAppFormDataDate", + "value": "" + }, + { + "key": "ListLayersAppFormDataToken", + "value": "" + }, + { + "key": "ListLayersAppFormRedirect", + "value": "" + }, + { + "key": "dasAppBundleAlias", + "value": "" + }, + { + "key": "UploadKey", + "value": "" + }, + { + "key": "ContentUploadSignedURL", + "value": "" + }, + { + "key": "ossDwgFileSignedUrl", + "value": "" + }, + { + "key": "ossOutputFileSignedUrl", + "value": "" + }, + { + "key": "dasWorkItemId", + "value": "" + }, + { + "key": "ossDwgFileObjectId", + "value": "" + }, + { + "key": "ossDwgFileUrn", + "value": "" + } + ] } diff --git a/DA4ACAD/collections/DA4ACAD Tutorial.postman_environment.json b/DA4ACAD/collections/DA4ACAD Tutorial.postman_environment.json index 617629fc..688acd9a 100644 --- a/DA4ACAD/collections/DA4ACAD Tutorial.postman_environment.json +++ b/DA4ACAD/collections/DA4ACAD Tutorial.postman_environment.json @@ -1,5 +1,5 @@ { - "id": "19d224cb-ab64-4a84-9f4b-5c38bb454dd6", + "id": "c2ec275e-0a92-427d-9d0d-ae2351627f0d", "name": "DA4ACAD Tutorial", "values": [ { @@ -12,11 +12,6 @@ "value": "", "enabled": true }, - { - "key": "dasApiToken", - "value": "", - "enabled": true - }, { "key": "dasNickName", "value": "", @@ -32,21 +27,6 @@ "value": "", "enabled": true }, - { - "key": "dasActivityAlias", - "value": "", - "enabled": true - }, - { - "key": "dasAppBundleAlias", - "value": "", - "enabled": true - }, - { - "key": "dasWorkItemId", - "value": "", - "enabled": true - }, { "key": "ossBucketKey", "value": "", @@ -57,43 +37,13 @@ "value": "", "enabled": true }, - { - "key": "ossDwgFileSignedUrl", - "value": "", - "enabled": true - }, { "key": "ossOutputFileObjectKey", "value": "", "enabled": true - }, - { - "key": "ossOutputFileSignedUrl", - "value": "", - "enabled": true - }, - { - "key": "ListLayersAppFormRedirect", - "value": "", - "enabled": true - }, - { - "key": "ListLayersAppUrl", - "value": "", - "enabled": true - }, - { - "key": "ListLayersAppVersion", - "value": "", - "enabled": true - }, - { - "key": "ossZipFileSignedUrl", - "value": "", - "enabled": true } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2019-10-17T11:14:37.705Z", - "_postman_exported_using": "Postman/7.8.0" + "_postman_exported_at": "2023-10-06T06:28:52.229Z", + "_postman_exported_using": "Postman/10.18.2" } \ No newline at end of file diff --git a/DA4ACAD/collections/acad_collections.zip b/DA4ACAD/collections/acad_collections.zip new file mode 100644 index 00000000..6dbb42b5 Binary files /dev/null and b/DA4ACAD/collections/acad_collections.zip differ diff --git a/DA4ACAD/images/aps_portal_2_acad_postman_menu_01.png b/DA4ACAD/images/aps_portal_2_acad_postman_menu_01.png index b53eb82f..8295b005 100644 Binary files a/DA4ACAD/images/aps_portal_2_acad_postman_menu_01.png and b/DA4ACAD/images/aps_portal_2_acad_postman_menu_01.png differ diff --git a/DA4ACAD/images/aps_portal_2_acad_postman_menu_02.png b/DA4ACAD/images/aps_portal_2_acad_postman_menu_02.png index 0c917755..af0bb5b2 100644 Binary files a/DA4ACAD/images/aps_portal_2_acad_postman_menu_02.png and b/DA4ACAD/images/aps_portal_2_acad_postman_menu_02.png differ diff --git a/DA4ACAD/images/task1-environment_edit_variable.png b/DA4ACAD/images/task1-environment_edit_variable.png index 7b2bc79f..b44c4095 100644 Binary files a/DA4ACAD/images/task1-environment_edit_variable.png and b/DA4ACAD/images/task1-environment_edit_variable.png differ diff --git a/DA4ACAD/images/task1-environment_quick_look_icon.png b/DA4ACAD/images/task1-environment_quick_look_icon.png index 16a50db7..3ba9ad32 100644 Binary files a/DA4ACAD/images/task1-environment_quick_look_icon.png and b/DA4ACAD/images/task1-environment_quick_look_icon.png differ diff --git a/DA4ACAD/images/task1-preview_environment_variables.png b/DA4ACAD/images/task1-preview_environment_variables.png index 8f014441..adad16c8 100644 Binary files a/DA4ACAD/images/task1-preview_environment_variables.png and b/DA4ACAD/images/task1-preview_environment_variables.png differ diff --git a/DA4ACAD/images/task2-authenticate_successfull.png b/DA4ACAD/images/task2-authenticate_successfull.png index 6e29033d..a9f95019 100644 Binary files a/DA4ACAD/images/task2-authenticate_successfull.png and b/DA4ACAD/images/task2-authenticate_successfull.png differ diff --git a/DA4ACAD/images/task2-delete_forge_app.png b/DA4ACAD/images/task2-delete_forge_app.png index 6f02efeb..48f8a7f1 100644 Binary files a/DA4ACAD/images/task2-delete_forge_app.png and b/DA4ACAD/images/task2-delete_forge_app.png differ diff --git a/DA4ACAD/images/task2-environment_variables_grid.png b/DA4ACAD/images/task2-environment_variables_grid.png index 82d2203a..50417861 100644 Binary files a/DA4ACAD/images/task2-environment_variables_grid.png and b/DA4ACAD/images/task2-environment_variables_grid.png differ diff --git a/DA4ACAD/images/task2-successfull.png b/DA4ACAD/images/task2-successfull.png index 0a4bd384..990f77cb 100644 Binary files a/DA4ACAD/images/task2-successfull.png and b/DA4ACAD/images/task2-successfull.png differ diff --git a/DA4ACAD/images/task3-appbundle_alias.png b/DA4ACAD/images/task3-appbundle_alias.png index a8ada357..1a4df82d 100644 Binary files a/DA4ACAD/images/task3-appbundle_alias.png and b/DA4ACAD/images/task3-appbundle_alias.png differ diff --git a/DA4ACAD/images/task3-appbundle_alias_set.png b/DA4ACAD/images/task3-appbundle_alias_set.png index 79b2ce07..1b822ae3 100644 Binary files a/DA4ACAD/images/task3-appbundle_alias_set.png and b/DA4ACAD/images/task3-appbundle_alias_set.png differ diff --git a/DA4ACAD/images/task3-appbundle_body.png b/DA4ACAD/images/task3-appbundle_body.png index c6d46a5a..d0c3f73f 100644 Binary files a/DA4ACAD/images/task3-appbundle_body.png and b/DA4ACAD/images/task3-appbundle_body.png differ diff --git a/DA4ACAD/images/task3-appbundle_form_data.png b/DA4ACAD/images/task3-appbundle_form_data.png deleted file mode 100644 index adb8253e..00000000 Binary files a/DA4ACAD/images/task3-appbundle_form_data.png and /dev/null differ diff --git a/DA4ACAD/images/task3-appbundle_registered.png b/DA4ACAD/images/task3-appbundle_registered.png index 576dc641..b6f54b75 100644 Binary files a/DA4ACAD/images/task3-appbundle_registered.png and b/DA4ACAD/images/task3-appbundle_registered.png differ diff --git a/DA4ACAD/images/task3-appbundle_select_file.png b/DA4ACAD/images/task3-appbundle_select_file.png index 34c5bdfe..f88414d7 100644 Binary files a/DA4ACAD/images/task3-appbundle_select_file.png and b/DA4ACAD/images/task3-appbundle_select_file.png differ diff --git a/DA4ACAD/images/task3-appbundle_uploaded.png b/DA4ACAD/images/task3-appbundle_uploaded.png index dc6e348c..41525b96 100644 Binary files a/DA4ACAD/images/task3-appbundle_uploaded.png and b/DA4ACAD/images/task3-appbundle_uploaded.png differ diff --git a/DA4ACAD/images/task4-activity_alias_create_success.png b/DA4ACAD/images/task4-activity_alias_create_success.png index a52f1fb0..df5c3c8b 100644 Binary files a/DA4ACAD/images/task4-activity_alias_create_success.png and b/DA4ACAD/images/task4-activity_alias_create_success.png differ diff --git a/DA4ACAD/images/task4-activity_create_success.png b/DA4ACAD/images/task4-activity_create_success.png index 9696e07f..7c9ba74d 100644 Binary files a/DA4ACAD/images/task4-activity_create_success.png and b/DA4ACAD/images/task4-activity_create_success.png differ diff --git a/DA4ACAD/images/task4-create_activity.png b/DA4ACAD/images/task4-create_activity.png index 28be0433..4c2a3fa2 100644 Binary files a/DA4ACAD/images/task4-create_activity.png and b/DA4ACAD/images/task4-create_activity.png differ diff --git a/DA4ACAD/images/task5-select_files_button.png b/DA4ACAD/images/task5-select_files_button.png index bd7c425f..7d10e2f8 100644 Binary files a/DA4ACAD/images/task5-select_files_button.png and b/DA4ACAD/images/task5-select_files_button.png differ diff --git a/DA4ACAD/images/task5-signed_downloadurl.png b/DA4ACAD/images/task5-signed_downloadurl.png deleted file mode 100644 index 3d5ae9e6..00000000 Binary files a/DA4ACAD/images/task5-signed_downloadurl.png and /dev/null differ diff --git a/DA4ACAD/images/task5-signed_uploadurl.png b/DA4ACAD/images/task5-signed_uploadurl.png deleted file mode 100644 index 6a46c6cf..00000000 Binary files a/DA4ACAD/images/task5-signed_uploadurl.png and /dev/null differ diff --git a/DA4ACAD/images/task5-successful_upload.png b/DA4ACAD/images/task5-successful_upload.png index 71e62497..b79e395d 100644 Binary files a/DA4ACAD/images/task5-successful_upload.png and b/DA4ACAD/images/task5-successful_upload.png differ diff --git a/DA4ACAD/images/task5-sucessfull_bucket_creation.png b/DA4ACAD/images/task5-sucessfull_bucket_creation.png index e39a728a..47b0f071 100644 Binary files a/DA4ACAD/images/task5-sucessfull_bucket_creation.png and b/DA4ACAD/images/task5-sucessfull_bucket_creation.png differ diff --git a/DA4ACAD/images/task5-upload.png b/DA4ACAD/images/task5-upload.png new file mode 100644 index 00000000..53df88fa Binary files /dev/null and b/DA4ACAD/images/task5-upload.png differ diff --git a/DA4ACAD/images/task6-check_status.png b/DA4ACAD/images/task6-check_status.png index 921c460d..5b250a9d 100644 Binary files a/DA4ACAD/images/task6-check_status.png and b/DA4ACAD/images/task6-check_status.png differ diff --git a/DA4ACAD/images/task6-result_url.png b/DA4ACAD/images/task6-result_url.png index df0d706a..2e168d38 100644 Binary files a/DA4ACAD/images/task6-result_url.png and b/DA4ACAD/images/task6-result_url.png differ diff --git a/DA4ACAD/images/task7-download_step_1.png b/DA4ACAD/images/task7-download_step_1.png index bc85a0c2..a3ea9a36 100644 Binary files a/DA4ACAD/images/task7-download_step_1.png and b/DA4ACAD/images/task7-download_step_1.png differ diff --git a/DA4ACAD/images/task7-download_step_2.png b/DA4ACAD/images/task7-download_step_2.png index 56fcc09f..79f3d44f 100644 Binary files a/DA4ACAD/images/task7-download_step_2.png and b/DA4ACAD/images/task7-download_step_2.png differ diff --git a/DA4ACAD/images/task7-download_url.png b/DA4ACAD/images/task7-download_url.png new file mode 100644 index 00000000..e621643f Binary files /dev/null and b/DA4ACAD/images/task7-download_url.png differ diff --git a/DA4ACAD/instructions/before_you_begin.md b/DA4ACAD/instructions/before_you_begin.md index 25fd7458..16669b6b 100644 --- a/DA4ACAD/instructions/before_you_begin.md +++ b/DA4ACAD/instructions/before_you_begin.md @@ -1,32 +1,23 @@ # Before you begin... -## 1. Import Postman Environment for the tutorial +## Import the Postman Collection and Postman environment. -Postman Environments are named configurations that implement variables to store values you typically use across many HTTP requests. For example, your access token, which has to specified with every request you send to APS, is stored in an environment variable named `dapAccesssToken`. To import the environment you need for this tutorial: +Postman Collections are groups of prepopulated HTTP requests. They can also contain scripts that are executed when you send an HTTP request, and/or receive a response. -1. Download the file *DA4ACAD Tutorial.postman_environment.json* from the [*collections* folder of this repository](../collections). +Postman environments are named configurations that implement environment variables to store values you typically use across many HTTP requests. For example, this Postman Collection stores the Access Token, which is used across most HTTP requests, in a variable named `dasApiToken`. -2. Import *DA4ACAD Tutorial.postman_environment.json* +To import the Postman Collection and environment you need for this tutorial: - 1. In the Postman header bar, click **Import**. A dialog displays. +1. Download the following zip file from the [*collections* folder](../collections) and expand it on your local machine. - 2. Drag the file you downloaded in step 1 to the area marked **Drop files here**. + - _acad_collections.zip_ -3. Click the **Environment drop-down** on the upper-right, and select **DA4ACAD Tutorial**. The environment loads. - ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") - -## 2. Import the Postman Collection for the tutorial. - -Postman Collections are groups of prepopulated HTTP requests. To import the requests you need for this tutorial: - -1. Download the file *DA4ACAD Tutorial.postman_collection.json* from the [*collections* folder of this repository](../collections). +2. In the Postman header bar, click **Import**. A dialog displays. -2. Import *DA4ACAD Tutorial.postman_collection.json* - - 1. In the Postman header bar, click **Import**. A dialog displays. - - 2. Drag the file you downloaded in step 1 to the area marked **Drop files here**. +3. Drag the files you expanded in step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and pick the files you expanded in step 1. +4. Click the **Environment drop-down** on the upper-right, and select **DA4ACAD Tutorial**. The environment loads. + ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") [:rewind:](../readme.md "readme.md") [:arrow_forward:](task-1.md "Next task") diff --git a/DA4ACAD/instructions/task-1.md b/DA4ACAD/instructions/task-1.md index 2bd43178..d49e5138 100644 --- a/DA4ACAD/instructions/task-1.md +++ b/DA4ACAD/instructions/task-1.md @@ -2,10 +2,10 @@ ## Create an App -1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v1/tutorials/create-app/). - When specifying details of the app, select "Design Automation API" and "Data Management API". +1. Follow the instructions on the tutorial [Create an App](https://aps-stg.autodesk.com/en/docs/oauth/v2/tutorials/create-app/). + When specifying **API Access**, ensure that "Design Automation API" and "Data Management API" are selected. -2. Jot down the Client ID and Client Secret of the app you created. +2. Note down the Client ID and Client Secret of the app you created. ## Save Client ID and Client Secret to Postman Environment Variables @@ -28,19 +28,23 @@ To set the environment variables: ## Get an Access Token -To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a prepopulated authenticate request that you can send. To send the request to APS: +To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a pre-populated authenticate request that you can send. To send the request to APS: 1. On the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads. -2. Click the **Body** tab. +2. Click the **Pre-request Script** tab. Notice how a script (written in JavaScript) takes the Client ID and Client Secret, concatenates them, converts to a Base64 encoded string, and saves it back to a Postman Collection Variable named `client_auth_keys`. -3. Move the cursor over the **Value** column of the **client_id** and **client_secret**, and verify that the values you specified as environment variables are displayed. ![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret") -4. Click **Send**. The request is sent to APS. If your request authenticates successfully, you should see a response similar to the following: +3. Click the **Headers** tab. Take note of how `client_auth_keys` is used in the request header. + +4. Click the **Body** tab. Take note of how the required scopes are specified. + +5. Click **Send**. The request is sent to APS. If your request authenticates successfully, you should see a response similar to the following: + ![Successful authentication](../images/task2-authenticate_successfull.png "Successful authentication") -Postman saves the Access Token in the Postman Environment Variable `dasApiToken`. Postman picks up the Access Token from this variable for all subsequent requests. This variable eliminates the need for you to repeatedly specify the value of the token for subsequent requests. +Postman saves the Access Token to a Postman Collection Variable named `dasApiToken`. Postman picks up the Access Token from this variable for all subsequent requests. This variable eliminates the need for you to repeatedly specify the value of the token for subsequent requests. [:rewind:](../readme.md "readme.md") [:arrow_backward:](before_you_begin.md "Previous task" ) [:arrow_forward:](task-2.md "Next task") diff --git a/DA4ACAD/instructions/task-2.md b/DA4ACAD/instructions/task-2.md index 31479c8e..2dcb359e 100644 --- a/DA4ACAD/instructions/task-2.md +++ b/DA4ACAD/instructions/task-2.md @@ -1,6 +1,6 @@ # Task 2 - Create a Nickname -APS uses the Client ID to uniquely identify an app. The Client ID can be long and cryptic, and hence a source of irritation when you reference the data you add to your app. +APS uses the Client ID to uniquely identify an app. The Client ID can often be lengthy and cryptic, which can be a source of frustration when you reference the data added to your app.. A Nickname lets you map a Client ID to an easy-to-use name that you can use in place of the Client ID. This tutorial uses the `dasNickName` Postman Environment Variable to store the Nickname. diff --git a/DA4ACAD/instructions/task-3.md b/DA4ACAD/instructions/task-3.md index 5dcfbe44..7ba021f2 100644 --- a/DA4ACAD/instructions/task-3.md +++ b/DA4ACAD/instructions/task-3.md @@ -1,6 +1,6 @@ # Task 3 - Upload an AppBundle to Design Automation -An AppBundle is a package of binaries and supporting files that contains the custom commands you want to run. For this tutorial, you will use the AppBundle named *ListLayers.zip* that is stored in the [*tutorial_data* folder of this repository](../tutorial_data). This AppBundle contains an AutoCAD plug-in, *command.dll*. This plug-in implements a custom command named **LISTLAYERS**, which extracts layer names from the current drawing, and writes the names to a text file. See the corresponding [task in the Step-by-Step tutorial on the APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/autocad/task-3-upload-appbundle/) to learn how to create an AppBundle. +An AppBundle is a package of binaries and supporting files that contains the custom commands you want to run. For this tutorial, you will use an AppBundle named *ListLayers.zip* that is stored in the [*tutorial_data* folder of this repository](../tutorial_data). This AppBundle contains an AutoCAD plug-in, *command.dll*. This plug-in implements a custom command named **LISTLAYERS**, which extracts layer names from the current drawing, and writes the names to a text file. See the corresponding [task in the Step-by-Step tutorial on the APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/autocad/task-3-upload-appbundle/) to learn how to create an AppBundle. ## Download the AppBundle @@ -8,7 +8,7 @@ An AppBundle is a package of binaries and supporting files that contains the cus ## Register the AppBundle -When registering the AppBundle, you provide a name for the AppBundle (the id), and specify that it must run on AutoCAD 2020. The name can be different to the name of the AppBundle zip file. +When registering the AppBundle, you provide a name for the AppBundle (the id), and specify that it must run on AutoCAD 2023. The name can be different to the name of the AppBundle zip file. 1. On the Postman sidebar, click **Task 3 - Upload AppBundle > POST Register the AppBundle**. The request loads. @@ -22,7 +22,7 @@ When registering the AppBundle, you provide a name for the AppBundle (the id), a 3. Click the **Environment quick look** icon again. -3. Click the **Body** tab, and verify that the `id`, is set to the `dasAppBundleName` variable and `engine` is set to `Autodesk.AutoCAD+23` (AutoCAD 2020). +3. Click the **Body** tab, and verify that the `id`, is set to the `dasAppBundleName` variable and `engine` is set to `Autodesk.AutoCAD+24_2` (AutoCAD 2023). ![AppBundle Body](../images/task3-appbundle_body.png "AppBundle Body") @@ -30,9 +30,7 @@ When registering the AppBundle, you provide a name for the AppBundle (the id), a ![AppBundel Registered](../images/task3-appbundle_registered.png "AppBundel Registered") - `uploadParameters` shown in the preceding image contains the information required to upload the AppBundle to APS. This information is saved to a series of Postman Environment variables, so that it can be reused in the next step. - - ![formData](../images/task3-appbundle_form_data.png "formData") + `uploadParameters` shown in the preceding image contains the information required to upload the AppBundle to APS. This information is saved to a series of Postman Collection Variables, so that they can be reused in the next step. ## Upload the AppBundle diff --git a/DA4ACAD/instructions/task-4.md b/DA4ACAD/instructions/task-4.md index 9660990a..f36f05fa 100644 --- a/DA4ACAD/instructions/task-4.md +++ b/DA4ACAD/instructions/task-4.md @@ -2,7 +2,7 @@ An Activity is an action that can be executed in Design Automation. -## Create a New Activity +## Create a new Activity 1. On the Postman sidebar, click **Task 4 - Publish an Activity > POST Create a New Activity**. The request loads. diff --git a/DA4ACAD/instructions/task-5.md b/DA4ACAD/instructions/task-5.md index de6a2e3f..d1bbdcbf 100644 --- a/DA4ACAD/instructions/task-5.md +++ b/DA4ACAD/instructions/task-5.md @@ -1,10 +1,11 @@ -# Task 5 - Prepare cloud storage +# Task 5 - Prepare Cloud Storage -The Activity ListLayersActivity takes a dwg file as an input, extracts layer names from it, and produces a text file containing the layer names as output. In this task, we prepare the cloud storage to hold these files. While you can use any cloud storage service for this purpose, this tutorial uses the Object Storage Service (OSS) through the Data Management API. +The Activity `ListLayersActivity` takes a dwg file as an input, extracts layer names from it, and produces a text file containing the layer names as output. In this task, we prepare the cloud storage to hold these files. While you can use any cloud storage service for this purpose, this tutorial uses the Object Storage Service (OSS) through the Data Management API. -There are three Postman Environment Variables you must specify for this task. They are +There are two Postman Environment Variables you must specify for this task. They are - `ossBucketKey` - The Bucket Key for the Bucket that holds your files in the cloud. -- `ossOutputFileObjectKey` - The Object Key of the placeholder for the output file that the add-in produces. +- `ossDwgFileObjectKey` - An ID for the dwg file that the activity must run operate on. + ## Create a Bucket @@ -25,52 +26,59 @@ There are three Postman Environment Variables you must specify for this task. Th ![Success full Bucket Creation](../images/task5-sucessfull_bucket_creation.png "Success full Bucket Creation") -## Upload input file to OSS +## Obtain Signed URL to upload the Input File 1. Download the input file, *Mechanical - Multileaders.dwg* from the [*tutorial_data* folder of this repository](../tutorial_data). 2. Click the **Environment quick look** icon on the upper right corner of Postman. -3. In the **CURRENT VALUE** column, in the **ossDwgFileObjectKey** row, specify an Object Key (a name to identify the input file, once it is uploaded to OSS). +3. In the **CURRENT VALUE** column, in the **ossDwgFileObjectKey** row, specify an Object Key for the file you are going to upload (**Tip:** Specify the file name of the dwg file: *Mechanical - Multileaders.dwg*). 4. Click the **Environment quick look** icon to hide the variables. -5. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > PUT Upload Input File**. The request loads. +5. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > GET Obtain Signed URL to Upload the Input File**. The request loads. + +6. Click **Send**. The signed URL is saved to a Collection Variable named `ContentUploadSignedURL`. The Upload Key is also saved to a variable named `UploadKey`. The Upload Key uniquely identifies the upload session. You use it later to complete the upload session. + + + +## Upload input file to OSS + +1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > PUT Upload Input File to OSS**. The request loads. -6. Click the **Body** tab. +2. Click the **Body** tab. -7. Click **Select File** and pick the file you downloaded in step 1. +3. Click **Select File** and pick the file you downloaded earlier (*Mechanical - Multileaders.dwg*). ![Select file button](../images/task5-select_files_button.png "Select file button") -8. Click **Send**. If your request is successful, you should see a screen similar to the one below: +4. Click **Send**. If your request is successful, you should see a screen similar to the one below: - ![Successful upload of input file](../images/task5-successful_upload.png "Successful upload of input file") + ![Successful upload of input file](../images/task5-upload.png "Uploading input file") -## Get temporary download URL +## Complete the upload -Design Automation needs to download the input file to process it. This request obtains a temporary signed URL that Design Automation can use to download the file, and saves it to a Postman Environment Variable. The URL expires in an hour. +To make the uploaded file available for download, you must specifically instruct OSS that the upload process has been completed. -1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Get Temporary Download URL**. The request loads. +1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Complete the upload**. The request loads. -2. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, the signed URL is saved to the `ossDownloadURL` Postman Environment Variable. +2. Click the **Body** tab and pay attention to how the Upload Key tells OSS what upload session to close. - ![Signed download URL](../images/task5-signed_downloadurl.png "Signed download URL") +2. Click **Send**. If your request is successful, you should see a screen similar to the one below: -## Get temporary upload URL + ![Successful upload of input file](../images/task5-successful_upload.png "Successful upload of input file") -Design Automation needs a signed URL to upload text file that the ListLayers Activity creates. This request obtains a temporary signed URL that Design Automation can use to upload the file. Postman saves the URL to a Postman Environment Variable. -1. Click the **Environment quick look** icon on the upper right corner of Postman. -2. In the **CURRENT VALUE** column, in the **ossOutputFileObjectKey** row, specify an Object Key (a name to identify the output file, once it is uploaded to OSS). +## Define Object Key for the resulting text file generated by the activity. -3. Click the **Environment quick look** icon to hide the variables. +`ListLayersActivity` generates a text file containing layer names as an output. You must specify an Object Key for the text file so that Design Automation is save it to OSS. Use the Postman Environment Variables `ossOutputFileObjectKey` to hold the Object Key. + +1. Click the **Environment quick look** icon on the upper right corner of Postman. -4. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Get Temporary Upload URL**. The request loads. +2. In the **CURRENT VALUE** column, in the **ossOutputFileObjectKey** row, specify an Object Key for the text file that `ListLayersActivity` generates. -5. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, the signed URL is saved to the `ossUploadURL` Postman Environment Variable. + **Tip:** You can use the file name of the text file (*layers.txt*) as its Object Key. - ![Signed upload URL](../images/task5-signed_uploadurl.png "Signed upload URL") -[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-4.md "Previous task") [:arrow_forward:](task-6.md "Next task") +[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-4.md "Previous task") [:arrow_forward:](task-5.md "Next task") diff --git a/DA4ACAD/instructions/task-6.md b/DA4ACAD/instructions/task-6.md index 05b49bcf..47608546 100644 --- a/DA4ACAD/instructions/task-6.md +++ b/DA4ACAD/instructions/task-6.md @@ -6,10 +6,11 @@ The relationship between an Activity and a WorkItem can be thought of as the rel Named parameters on the Activity have corresponding named arguments on the WorkItem. Like in function calls, optional parameters of the Activity can be skipped and left unspecified while posting a WorkItem. -For this exercise, you create a WorkItem to execute the Activity ListLayers. The WorkItem uses the dwg file you uploaded in the previous task as the input for the Activity. The request downloads the dwg file from the signed URL stored in the variable 'ossDwgFileSignedUrl'. +For this exercise, you create a WorkItem to execute the Activity ListLayers. The WorkItem uses the dwg file you uploaded in the previous task as the input for the Activity. ## Create a WorkItem + 1. On the Postman sidebar, click **Task 6 - Submit a WorkItem > Create a WorkItem**. The request loads. 2. Click the **Body** tab and observe how the Activity ID, the input file, and the output file are specified. @@ -24,14 +25,14 @@ For this exercise, you create a WorkItem to execute the Activity ListLayers. The - `arguments` - Contains all the parameters that need to be passed to the Activity specified by `activityId`. They must match the parameters you specified in Task 4, when you created the Activity. - - `InputDwg` - Specifies how to obtain the input dwg file for the Activity. The value specified here is the Postman variable `ossDwgFileSignedUrl`, which contains the signed download URL you created in Task 5. + - `InputDwg` - Specifies the URN of the input dwg file for the Activity. It is constructed by combining the Object ID of the input dwg file with the Bucket Key and the statement `urn:adsk.objects:os.object:`. **Note** Had you uploaded a zip file instead of a dwg file, you would have been required specify the `pathInZip` attribute. This attribute specifies the path to the dwg file within the zip file. - - `result` - Specifies the signed URL to the location reserved for the output of the activity. + - `result` - Specifies the URN of the output file resulting from the activity. It is constructed by combining the Object ID of the resulting text file with the Bucket Key and the statement `urn:adsk.objects:os.object:`. -## Check Status of a WorkItem +## Check status of a WorkItem Design Automation WorkItems are queued before they are processed. Processing itself can take time. Once processing is done, you need to know if the WorkItems ran successfully or not. As such it is important for you to check the status of the WorkItem you created. diff --git a/DA4ACAD/instructions/task-7.md b/DA4ACAD/instructions/task-7.md index f43f7702..9635a13c 100644 --- a/DA4ACAD/instructions/task-7.md +++ b/DA4ACAD/instructions/task-7.md @@ -2,6 +2,17 @@ Once the WorkItem has completed executing the Activity, Design Automation uploads the resulting text file to OSS. You use the Data Management API to download the text file to your local machine. + +## Get temporary download URL for the result + +1. On the Postman sidebar, click **Task 7 - Download the Result > GET S3 Download URL for the result**. The request loads. + +2. Click **Send**. You should see a screen similar to the following image. + + ![Download URL](../images/task7-download_url.png "Download URL") + + + ## Download the output from OSS 1. On the Postman sidebar, click **Task 7 - Download the Result > GET Download Output from OSS**. The request loads. @@ -10,8 +21,8 @@ Once the WorkItem has completed executing the Activity, Design Automation upload ![Download Result](../images/task7-download_step_1.png "Download Result") -3. In the response area, click **Save Response > Save to a file**. The output file downloads. Save the file as a *.txt* file, when prompted to. +3. In the response area, click **Save response to a file**. The output file downloads. Save the file as a *.txt* file, when prompted to. ![Download Result](../images/task7-download_step_2.png "Download Result") -[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-6.md "Previous task") \ No newline at end of file +[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-6.md "Previous task") diff --git a/DA4ACAD/readme.md b/DA4ACAD/readme.md index 2c919ffe..4b769614 100644 --- a/DA4ACAD/readme.md +++ b/DA4ACAD/readme.md @@ -1,22 +1,21 @@ # Design Automation for AutoCAD Step-by-Step Tutorial ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Design-Automation](https://img.shields.io/badge/Design%20Automation-v3-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v7-orange.svg)](https://www.getpostman.com/) -[![AutoCAD](https://img.shields.io/badge/AutoCAD-2016-DF1B22.svg)](http://developer.autodesk.com/) -[![AutoCAD](https://img.shields.io/badge/AutoCAD-2017-DF1B22.svg)](http://developer.autodesk.com/) -[![AutoCAD](https://img.shields.io/badge/AutoCAD-2018-DF1B22.svg)](http://developer.autodesk.com/) -[![AutoCAD](https://img.shields.io/badge/AutoCAD-2019-DF1B22.svg)](http://developer.autodesk.com/) -[![AutoCAD](https://img.shields.io/badge/AutoCAD-2020-DF1B22.svg)](http://developer.autodesk.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) +[![AutoCAD](https://img.shields.io/badge/AutoCAD-2021-DF1B22.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/AutoCAD-2022-DF1B22.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/AutoCAD-2023-DF1B22.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/AutoCAD-2024-DF1B22.svg)](http://developer.autodesk.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) [![License](https://img.shields.io/:license-MIT-blue.svg)](http://opensource.org/licenses/MIT) -This folder contains a Postman Collection that contains the requests used in the [Design Automation for AutoCAD Step-by-Step tutorial](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/autocad/) on the APS developer portal. +This folder contains a Postman Collection that contains the requests used in the [Automating AutoCAD Step-by-Step tutorial](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/autocad/) on the APS developer portal. On the Postman sidebar, requests are stored in folders that have the same name as the corresponding task in the APS developer portal. ![APS developer portal menu to Postman](images/aps_portal_2_acad_postman_menu_01.png "APS developer portal task to Postman mapping") diff --git a/DA4Inventor/collections/DA4Inventor Tutorial.postman_collection.json b/DA4Inventor/collections/DA4Inventor Tutorial.postman_collection.json index 9d2c7b79..0f435006 100644 --- a/DA4Inventor/collections/DA4Inventor Tutorial.postman_collection.json +++ b/DA4Inventor/collections/DA4Inventor Tutorial.postman_collection.json @@ -1,8 +1,9 @@ { "info": { - "_postman_id": "2a2f89e0-1502-48eb-94a5-41b3f3168405", - "name": "DA4Inventor Tutorial", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "_postman_id": "679a4e9f-8cd7-440e-8c01-1a1c840028ed", + "name": "Automating Inventor", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "3021021" }, "item": [ { @@ -11,13 +12,24 @@ { "name": "Get an Access Token", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "const clientId = pm.environment.get(\"client_id\");", + "const clientSecret = pm.environment.get(\"client_secret\");", + "var clientAuthKeys = btoa(clientId +\":\"+clientSecret);", + "pm.collectionVariables.set(\"client_auth_keys\", clientAuthKeys);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "8e60b492-16d3-4b35-a68d-f2686c14bc1d", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasApiToken\", body[\"access_token\"]);" + "pm.collectionVariables.set(\"dasApiToken\", body.access_token);" ], "type": "text/javascript" } @@ -28,22 +40,23 @@ "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "application/x-www-form-urlencoded", + "type": "text" + }, + { + "key": "Accept", + "value": "application/json", + "type": "text" + }, + { + "key": "Authorization", + "value": "Basic {{client_auth_keys}}", + "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ - { - "key": "client_id", - "value": "{{client_id}}", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{client_secret}}", - "type": "text" - }, { "key": "grant_type", "value": "client_credentials", @@ -57,7 +70,7 @@ ] }, "url": { - "raw": "https://developer.api.autodesk.com/authentication/v1/authenticate", + "raw": "https://developer.api.autodesk.com/authentication/v2/token", "protocol": "https", "host": [ "developer", @@ -67,16 +80,14 @@ ], "path": [ "authentication", - "v1", - "authenticate" + "v2", + "token" ] - }, - "description": "[See Documentation](https://aps.autodesk.com/en/docs/oauth/v2/reference/http/authenticate-POST/)" + } }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 2 - Create a Nickname", @@ -130,7 +141,6 @@ { "listen": "prerequest", "script": { - "id": "78f13638-330b-43be-9958-27c128ee4c8f", "type": "text/javascript", "exec": [ "" @@ -140,15 +150,13 @@ { "listen": "test", "script": { - "id": "c0033dfa-ecc7-4cad-8a3b-a05c3dbdd9a9", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 3 - Upload AppBundle", @@ -159,19 +167,18 @@ { "listen": "test", "script": { - "id": "5639e57e-7a89-4595-a461-337bb8bbdb3d", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasAppBundleId\",body[\"id\"]);", - "pm.environment.set(\"ChangeParamAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", - "pm.environment.set(\"ChangeParamAppVersion\", body[\"version\"]);", - "pm.environment.set(\"ChangeParamAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", - "pm.environment.set(\"ChangeParamAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", - "pm.environment.set(\"ChangeParamAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", - "pm.environment.set(\"ChangeParamAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", - "pm.environment.set(\"ChangeParamAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", - "pm.environment.set(\"ChangeParamAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", - "pm.environment.set(\"ChangeParamAppFormRedirect\", body[\"uploadParameters\"][\"formData\"][\"success_action_redirect\"]);" + "pm.collectionVariables.set(\"dasAppBundleId\",body[\"id\"]);", + "pm.collectionVariables.set(\"ChangeParamAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", + "pm.collectionVariables.set(\"ChangeParamAppVersion\", body[\"version\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", + "pm.collectionVariables.set(\"ChangeParamAppFormRedirect\", body[\"uploadParameters\"][\"formData\"][\"success_action_redirect\"]);" ], "type": "text/javascript" } @@ -193,7 +200,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": \"ChangeParamApp\",\n \"engine\": \"Autodesk.Inventor+24\",\n \"description\": \"Change Parameters AppBundle based on Inventor 2020\"\n}" + "raw": "{\n \"id\": \"ChangeParamApp\",\n \"engine\": \"Autodesk.Inventor+2024\",\n \"description\": \"Change Parameters AppBundle based on Inventor 2024\"\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/appbundles", @@ -221,7 +228,6 @@ { "listen": "prerequest", "script": { - "id": "ed69b4ae-cdf1-4258-9434-551125891429", "exec": [ "" ], @@ -231,7 +237,6 @@ { "listen": "test", "script": { - "id": "2dd14878-68aa-4d3a-b8a5-875da11f78b7", "exec": [ "" ], @@ -323,10 +328,9 @@ { "listen": "test", "script": { - "id": "21833cdd-ccfd-4f25-98ff-cbec1e4cd627", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasAppBundleAlias\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasAppBundleAlias\", body[\"id\"]);" ], "type": "text/javascript" } @@ -380,7 +384,6 @@ { "listen": "prerequest", "script": { - "id": "ccf51ef5-104e-47ef-8ad2-c77243cdf4f5", "type": "text/javascript", "exec": [ "" @@ -390,15 +393,13 @@ { "listen": "test", "script": { - "id": "8c82bdd2-7ebc-40b1-a493-12ce92ff2a8f", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 4 - Publish an Activity", @@ -409,10 +410,9 @@ { "listen": "test", "script": { - "id": "73d3859b-9d36-485b-be68-23a7db2be321", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasActivityName\",body[\"id\"]);" + "pm.collectionVariables.set(\"dasActivityName\",body[\"id\"]);" ], "type": "text/javascript" } @@ -432,7 +432,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": \"ChangeParamActivity\",\n \"commandLine\": [\n \"$(engine.path)\\\\InventorCoreConsole.exe /i \\\"$(args[InventorDoc].path)\\\" /al \\\"$(appbundles[ChangeParamApp].path)\\\" \\\"$(args[InventorParams].path)\\\"\"\n ],\n \"parameters\": {\n \"InventorDoc\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"get\",\n \"description\": \"Input Inventor part file\",\n \"localName\": \"Input.ipt\"\n },\n \"InventorParams\": {\n \t\"zip\": false,\n \t\"ondemand\": false,\n \t\"verb\": \"get\",\n \t\"description\" : \"JSON object containing new width and height parameters\",\n \"localName\": \"params.json\"\n },\n \"OutputIpt\": {\n \"zip\": false,\n \"ondemand\": false,\n \"optional\": true,\n \"localName\": \"ResultSmall.ipt\",\n \"verb\": \"post\"\n },\n \"OutputIam\": {\n \"zip\": true,\n \"ondemand\": false,\n \"optional\": true,\n \"localName\": \"ResultSmall.zip\",\n \"verb\": \"post\"\n },\n \"OutputBmp\": {\n \"zip\": false,\n \"ondemand\": false,\n \"optional\": true,\n \"localName\": \"ResultSmall.bmp\",\n \"verb\": \"post\"\n }\n },\n \"engine\": \"Autodesk.Inventor+24\",\n \"appbundles\": [\n \"{{dasAppBundleId}}+{{dasAppBundleAlias}}\"\n ],\n \"settings\": {},\n \"description\": \"Resizes an Inventor part or assembly to the height and width parameters contained in the JSON object specified by the InventorParams parameter. Also produces a BMP file of the result.\"\n}" + "raw": "{\n \"id\": \"ChangeParamActivity\",\n \"commandLine\": [\n \"$(engine.path)\\\\InventorCoreConsole.exe /i \\\"$(args[InventorDoc].path)\\\" /al \\\"$(appbundles[ChangeParamApp].path)\\\" \\\"$(args[InventorParams].path)\\\"\"\n ],\n \"parameters\": {\n \"InventorDoc\": {\n \"zip\": false,\n \"ondemand\": false,\n \"verb\": \"get\",\n \"description\": \"Input Inventor part file\",\n \"localName\": \"Input.ipt\"\n },\n \"InventorParams\": {\n \t\"zip\": false,\n \t\"ondemand\": false,\n \t\"verb\": \"get\",\n \t\"description\" : \"JSON object containing new width and height parameters\",\n \"localName\": \"params.json\"\n },\n \"OutputIpt\": {\n \"zip\": false,\n \"ondemand\": false,\n \"optional\": true,\n \"localName\": \"ResultSmall.ipt\",\n \"verb\": \"post\"\n },\n \"OutputIam\": {\n \"zip\": true,\n \"ondemand\": false,\n \"optional\": true,\n \"localName\": \"ResultSmall.zip\",\n \"verb\": \"post\"\n },\n \"OutputBmp\": {\n \"zip\": false,\n \"ondemand\": false,\n \"optional\": true,\n \"localName\": \"ResultSmall.bmp\",\n \"verb\": \"post\"\n }\n },\n \"engine\": \"Autodesk.Inventor+2024\",\n \"appbundles\": [\n \"{{dasAppBundleId}}+{{dasAppBundleAlias}}\"\n ],\n \"settings\": {},\n \"description\": \"Resizes an Inventor part or assembly to the height and width parameters contained in the JSON object specified by the InventorParams parameter. Also produces a BMP file of the result.\"\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/activities", @@ -460,10 +460,9 @@ { "listen": "test", "script": { - "id": "0fc0548f-0c6a-40e2-9c2a-bfd216a8a1cf", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasActivityAlias\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasActivityAlias\", body[\"id\"]);" ], "type": "text/javascript" } @@ -507,11 +506,10 @@ }, "response": [] } - ], - "protocolProfileBehavior": {} + ] }, { - "name": "Task 5 - Prepare Cloud Storage", + "name": "Task 5 - Prepare Cloud Storage Copy", "item": [ { "name": "Create a Bucket", @@ -519,16 +517,17 @@ { "listen": "test", "script": { - "id": "535e27cd-14ab-4414-a42d-e9443ae0454d", "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossBucketKey\", body[\"bucketKey\"]);" + "" ], "type": "text/javascript" } } ], "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { @@ -564,153 +563,37 @@ "response": [] }, { - "name": "Upload Input File to OSS", + "name": "Obtain Signed URL to Upload the Input File", "event": [ { "listen": "test", "script": { - "id": "59a084a5-acfb-409f-b8f4-5523a3d6233c", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossInputFileObjectKey\", body[\"objectKey\"]);" + "pm.collectionVariables.set(\"UploadKey\", body.uploadKey);", + "pm.collectionVariables.set(\"ContentUploadSignedURL\", body.urls[0]);" ], "type": "text/javascript" } } ], - "request": { - "method": "PUT", - "header": [ - { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}" - } - ], - "body": { - "mode": "file", - "file": {} - }, - "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossInputFileObjectKey}}", - "protocol": "https", - "host": [ - "developer", - "api", - "autodesk", - "com" - ], - "path": [ - "oss", - "v2", - "buckets", - "{{ossBucketKey}}", - "objects", - "{{ossInputFileObjectKey}}" - ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-PUT/)" + "protocolProfileBehavior": { + "disabledSystemHeaders": {} }, - "response": [] - }, - { - "name": "Get Temporary Download URL", - "event": [ - { - "listen": "test", - "script": { - "id": "bb1f3f0c-4496-4f44-9f9c-9bd8062a381f", - "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossInputFileSignedUrl\", body[\"signedUrl\"]);", - "" - ], - "type": "text/javascript" - } - } - ], "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}" - } - ], - "body": { - "mode": "raw", - "raw": "{}\n" - }, - "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossInputFileObjectKey}}/signed", - "protocol": "https", - "host": [ - "developer", - "api", - "autodesk", - "com" - ], - "path": [ - "oss", - "v2", - "buckets", - "{{ossBucketKey}}", - "objects", - "{{ossInputFileObjectKey}}", - "signed" - ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" - }, - "response": [] - }, - { - "name": "Get Temporary Upload URL for Output IPT file", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "67779a2c-7fe0-4479-9d7b-1c3e71ce12da", - "exec": [ - "" - ], - "type": "text/javascript" - } + "auth": { + "type": "noauth" }, - { - "listen": "test", - "script": { - "id": "c2653b08-8363-414a-8228-5a1115f4edf3", - "exec": [ - "var body = JSON.parse(responseBody);", - "", - "pm.environment.set(\"ossOutputIptFileSignedUrl\", body[\"signedUrl\"]);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", + "method": "GET", "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text" } ], - "body": { - "mode": "raw", - "raw": "{}" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputIptFileObjectKey}}/signed?access=readwrite", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossInputFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -724,135 +607,101 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputIptFileObjectKey}}", - "signed" + "{{ossInputFileObjectKey}}", + "signeds3upload" ], "query": [ { - "key": "access", - "value": "readwrite" + "key": "minutesExpiration", + "value": "5", + "disabled": true } ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] }, { - "name": "Get Temporary Upload URL for Output IAM file", + "name": "Upload the Input File to OSS", "event": [ - { - "listen": "prerequest", - "script": { - "id": "91ad28d5-2312-4ec0-8ae4-19df1cff3264", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "cbb259a1-956f-46c7-9483-1201db8bfa91", "exec": [ - "var body = JSON.parse(responseBody);", - "", - "pm.environment.set(\"ossOutputIamFileSignedUrl\", body[\"signedUrl\"]);" + "console.log(pm.request.body.file.src)" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "auth": { + "type": "noauth" + }, + "method": "PUT", "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, { "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "value": "Bearer {{dasApiToken}}", + "type": "text", + "disabled": true } ], "body": { - "mode": "raw", - "raw": "{}" + "mode": "file", + "file": { + "src": "" + } }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputIamFileObjectKey}}/signed?access=readwrite", - "protocol": "https", + "raw": "{{ContentUploadSignedURL}}", "host": [ - "developer", - "api", - "autodesk", - "com" - ], - "path": [ - "oss", - "v2", - "buckets", - "{{ossBucketKey}}", - "objects", - "{{ossOutputIamFileObjectKey}}", - "signed" - ], - "query": [ - { - "key": "access", - "value": "readwrite" - } + "{{ContentUploadSignedURL}}" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] }, { - "name": "Get Temporary Upload URL for Output BMP FIle", + "name": "Complete the Upload", "event": [ - { - "listen": "prerequest", - "script": { - "id": "6167e2bb-89c8-4069-98e2-20b7cd3ab4b3", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "510f1d36-a156-4c24-be73-e56d6cff0cd1", "exec": [ "var body = JSON.parse(responseBody);", - "", - "pm.environment.set(\"ossOutputBmpFileSignedUrl\", body[\"signedUrl\"]);" + "pm.collectionVariables.set(\"ossInputFileObjectId\", body.objectId);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" }, { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}" + "key": "Content-Type", + "value": "application/json", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{}" + "raw": "{\n \"uploadKey\":\"{{UploadKey}}\"\n}" }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputBmpFileObjectKey}}/signed?access=readwrite", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossInputFileObjectKey}}/signeds3upload", "protocol": "https", "host": [ "developer", @@ -866,17 +715,10 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputBmpFileObjectKey}}", - "signed" - ], - "query": [ - { - "key": "access", - "value": "readwrite" - } + "{{ossInputFileObjectKey}}", + "signeds3upload" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] } @@ -885,7 +727,6 @@ { "listen": "prerequest", "script": { - "id": "a82cfeda-2368-4cc4-9140-aa8e752b0b1b", "type": "text/javascript", "exec": [ "" @@ -895,29 +736,26 @@ { "listen": "test", "script": { - "id": "7e0fb04e-4c17-4b3b-b388-4cdabf897c12", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 6 - Submit a WorkItem", "item": [ { - "name": "Send WorkItem", + "name": "Create a WorkItem", "event": [ { "listen": "test", "script": { - "id": "9048dfc6-1454-4e31-9c75-b968d8c9579c", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasWorkItemId\", body[\"id\"]);" + "pm.collectionVariables.set(\"dasWorkItemId\", body[\"id\"]);" ], "type": "text/javascript" } @@ -925,7 +763,6 @@ { "listen": "prerequest", "script": { - "id": "eb643247-06d2-4471-abdf-6417d9c9bc85", "exec": [ "" ], @@ -947,7 +784,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"activityId\": \"{{dasActivityName}}+{{dasActivityAlias}}\",\n\t\"arguments\": {\n\t\t\"InventorDoc\": {\n\t\t\t\"url\": \"{{ossInputFileSignedUrl}}\"\n\t\t},\n\t\t\"InventorParams\": {\n\t\t\t\"url\": \"data:application/json,{\\\"height\\\":\\\"16 in\\\", \\\"width\\\":\\\"10 in\\\"}\"\n\t\t},\n\t\t\"OutputIpt\": {\n\t\t\t\"url\": \"{{ossOutputIptFileSignedUrl}}\",\n\t\t\t\"verb\": \"put\"\n\t\t},\n\t\t\"OutputBmp\": {\n\t\t\t\"url\": \"{{ossOutputBmpFileSignedUrl}}\",\n\t\t\t\"verb\": \"put\"\n\t\t}\n\t}\n}" + "raw": "{\n \"activityId\": \"{{dasActivityName}}+{{dasActivityAlias}}\",\n \"arguments\": {\n \"InventorDoc\": {\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossInputFileObjectKey}}\",\n \"verb\": \"get\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n },\n \"InventorParams\": {\n \"url\": \"data:application/json,{\\\"height\\\":\\\"16 in\\\", \\\"width\\\":\\\"10 in\\\"}\"\n },\n \"OutputIpt\": {\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossOutputIptFileObjectKey}}\",\n \"verb\": \"put\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n },\n \"OutputBmp\": {\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossOutputBmpFileObjectKey}}\",\n \"verb\": \"put\",\n \"headers\": {\n \"Authorization\": \"Bearer {{dasApiToken}}\"\n }\n }\n }\n}" }, "url": { "raw": "https://developer.api.autodesk.com/da/us-east/v3/workitems", @@ -1009,7 +846,6 @@ { "listen": "prerequest", "script": { - "id": "c286b457-2e47-4911-b3d0-22823118ca99", "type": "text/javascript", "exec": [ "" @@ -1019,24 +855,32 @@ { "listen": "test", "script": { - "id": "39b73499-5689-4658-bdd7-b60367106408", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 7 - Download the Results", "item": [ { - "name": "Download Resized IPT file from OSS", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, + "name": "Get S3 Download URL for Resized IPT file", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossOutputIptFileDownloadUrl\", body[\"url\"]);", + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [ @@ -1049,12 +893,8 @@ "value": "Bearer {{dasApiToken}}" } ], - "body": { - "mode": "raw", - "raw": "{}" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputIptFileObjectKey}}", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputIptFileObjectKey}}/signeds3download", "protocol": "https", "host": [ "developer", @@ -1068,18 +908,44 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputIptFileObjectKey}}" + "{{ossOutputIptFileObjectKey}}", + "signeds3download" ] }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-GET/)" + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" }, "response": [] }, { - "name": "Download Generated BMP file from OSS", - "protocolProfileBehavior": { - "disableBodyPruning": true + "name": "Download Resized IPT file from OSS", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{ossOutputIptFileDownloadUrl}}", + "host": [ + "{{ossOutputIptFileDownloadUrl}}" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-GET/)" }, + "response": [] + }, + { + "name": "Get S3 Download URL for Generated BMP", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossOutputBmpFileDownloadUrl\", body[\"url\"]);", + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [ @@ -1092,12 +958,8 @@ "value": "Bearer {{dasApiToken}}" } ], - "body": { - "mode": "raw", - "raw": "{}" - }, "url": { - "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputBmpFileObjectKey}}", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputBmpFileObjectKey}}/signeds3download", "protocol": "https", "host": [ "developer", @@ -1111,7 +973,23 @@ "buckets", "{{ossBucketKey}}", "objects", - "{{ossOutputBmpFileObjectKey}}" + "{{ossOutputBmpFileObjectKey}}", + "signeds3download" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + }, + "response": [] + }, + { + "name": "Download Generated BMP file from OSS", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{ossOutputBmpFileDownloadUrl}}", + "host": [ + "{{ossOutputBmpFileDownloadUrl}}" ] }, "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-GET/)" @@ -1123,7 +1001,6 @@ { "listen": "prerequest", "script": { - "id": "a8259187-b477-4c4b-99f4-85169492e84c", "type": "text/javascript", "exec": [ "" @@ -1133,19 +1010,48 @@ { "listen": "test", "script": { - "id": "eb77640a-4dbe-4078-b20d-388c14299c4c", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Extras", "item": [ + { + "name": "My App Nickname", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/forgeapps/me", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "forgeapps", + "me" + ] + } + }, + "response": [] + }, { "name": "Delete App Data in Design Automation", "request": { @@ -1191,7 +1097,6 @@ { "listen": "test", "script": { - "id": "e79d61c8-d66a-45c7-940d-f4ab9bd3ca9c", "exec": [ "" ], @@ -1414,7 +1319,6 @@ { "listen": "prerequest", "script": { - "id": "eb00fe7e-0266-4546-bf94-f134c6114802", "type": "text/javascript", "exec": [ "" @@ -1424,16 +1328,87 @@ { "listen": "test", "script": { - "id": "44b20a07-510a-4937-b9fd-702e438dcd41", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] } ], - "protocolProfileBehavior": {} -} + "variable": [ + { + "key": "client_auth_keys", + "value": "" + }, + { + "key": "dasApiToken", + "value": "" + }, + { + "key": "dasAppBundleId", + "value": "" + }, + { + "key": "ChangeParamAppUrl", + "value": "" + }, + { + "key": "ChangeParamAppVersion", + "value": "" + }, + { + "key": "ChangeParamAppFormDataKey", + "value": "" + }, + { + "key": "ChangeParamAppFormDataPolicy", + "value": "" + }, + { + "key": "ChangeParamAppFormDataSignature", + "value": "" + }, + { + "key": "ChangeParamAppFormDataCredential", + "value": "" + }, + { + "key": "ChangeParamAppFormDataDate", + "value": "" + }, + { + "key": "ChangeParamAppFormDataToken", + "value": "" + }, + { + "key": "ChangeParamAppFormRedirect", + "value": "" + }, + { + "key": "dasAppBundleAlias", + "value": "" + }, + { + "key": "dasActivityName", + "value": "" + }, + { + "key": "dasActivityAlias", + "value": "" + }, + { + "key": "UploadKey", + "value": "" + }, + { + "key": "ContentUploadSignedURL", + "value": "" + }, + { + "key": "ossInputFileObjectId", + "value": "" + } + ] +} \ No newline at end of file diff --git a/DA4Inventor/collections/DA4Inventor-Environment.postman_environment.json b/DA4Inventor/collections/DA4Inventor-Environment.postman_environment.json index 2aaa42b0..e78bc08c 100644 --- a/DA4Inventor/collections/DA4Inventor-Environment.postman_environment.json +++ b/DA4Inventor/collections/DA4Inventor-Environment.postman_environment.json @@ -41,14 +41,9 @@ "key": "ossOutputBmpFileObjectKey", "value": "", "enabled": true - }, - { - "key": "dasApiToken", - "value": "", - "enabled": true } ], "_postman_variable_scope": "environment", "_postman_exported_at": "2019-09-03T09:06:46.253Z", "_postman_exported_using": "Postman/7.6.0" -} \ No newline at end of file +} diff --git a/DA4Inventor/collections/inventor_collections.zip b/DA4Inventor/collections/inventor_collections.zip new file mode 100644 index 00000000..344cbac0 Binary files /dev/null and b/DA4Inventor/collections/inventor_collections.zip differ diff --git a/DA4Inventor/images/2023-09-28_17-17-45task2-environment_variables_grid.png b/DA4Inventor/images/2023-09-28_17-17-45task2-environment_variables_grid.png new file mode 100644 index 00000000..6d553fc3 Binary files /dev/null and b/DA4Inventor/images/2023-09-28_17-17-45task2-environment_variables_grid.png differ diff --git a/DA4Inventor/images/aps_portal_2_inventor_postman_menu_01.png b/DA4Inventor/images/aps_portal_2_inventor_postman_menu_01.png index f9b6a0c2..ae2ffaf8 100644 Binary files a/DA4Inventor/images/aps_portal_2_inventor_postman_menu_01.png and b/DA4Inventor/images/aps_portal_2_inventor_postman_menu_01.png differ diff --git a/DA4Inventor/images/aps_portal_2_inventor_postman_menu_02.png b/DA4Inventor/images/aps_portal_2_inventor_postman_menu_02.png index eda693f8..db6a514b 100644 Binary files a/DA4Inventor/images/aps_portal_2_inventor_postman_menu_02.png and b/DA4Inventor/images/aps_portal_2_inventor_postman_menu_02.png differ diff --git a/DA4Inventor/images/postman_environment_dropdown.png b/DA4Inventor/images/postman_environment_dropdown.png index c0b4eef8..3c693058 100644 Binary files a/DA4Inventor/images/postman_environment_dropdown.png and b/DA4Inventor/images/postman_environment_dropdown.png differ diff --git a/DA4Inventor/images/task1-authenticate_successfull.png b/DA4Inventor/images/task1-authenticate_successfull.png index 16106c04..cc24d6fe 100644 Binary files a/DA4Inventor/images/task1-authenticate_successfull.png and b/DA4Inventor/images/task1-authenticate_successfull.png differ diff --git a/DA4Inventor/images/task1-environment_edit_variable.png b/DA4Inventor/images/task1-environment_edit_variable.png index eb818086..eece4bbb 100644 Binary files a/DA4Inventor/images/task1-environment_edit_variable.png and b/DA4Inventor/images/task1-environment_edit_variable.png differ diff --git a/DA4Inventor/images/task1-environment_quick_look_icon.png b/DA4Inventor/images/task1-environment_quick_look_icon.png index b7f5d0ea..ce96a43f 100644 Binary files a/DA4Inventor/images/task1-environment_quick_look_icon.png and b/DA4Inventor/images/task1-environment_quick_look_icon.png differ diff --git a/DA4Inventor/images/task1-preview_environment_variables.png b/DA4Inventor/images/task1-preview_environment_variables.png index 06692222..c5c28101 100644 Binary files a/DA4Inventor/images/task1-preview_environment_variables.png and b/DA4Inventor/images/task1-preview_environment_variables.png differ diff --git a/DA4Inventor/images/task2-delete_forge_app.png b/DA4Inventor/images/task2-delete_forge_app.png index 755f31fb..b4945990 100644 Binary files a/DA4Inventor/images/task2-delete_forge_app.png and b/DA4Inventor/images/task2-delete_forge_app.png differ diff --git a/DA4Inventor/images/task2-environment_variables_grid.png b/DA4Inventor/images/task2-environment_variables_grid.png deleted file mode 100644 index 4f3202a6..00000000 Binary files a/DA4Inventor/images/task2-environment_variables_grid.png and /dev/null differ diff --git a/DA4Inventor/images/task2-successfull.png b/DA4Inventor/images/task2-successfull.png index 1a14d2b5..a5fe7f83 100644 Binary files a/DA4Inventor/images/task2-successfull.png and b/DA4Inventor/images/task2-successfull.png differ diff --git a/DA4Inventor/images/task3-appbundle_alias.png b/DA4Inventor/images/task3-appbundle_alias.png index bc01f86f..c7d7e43d 100644 Binary files a/DA4Inventor/images/task3-appbundle_alias.png and b/DA4Inventor/images/task3-appbundle_alias.png differ diff --git a/DA4Inventor/images/task3-appbundle_alias_set.png b/DA4Inventor/images/task3-appbundle_alias_set.png index 4a9bf318..07cf64a5 100644 Binary files a/DA4Inventor/images/task3-appbundle_alias_set.png and b/DA4Inventor/images/task3-appbundle_alias_set.png differ diff --git a/DA4Inventor/images/task3-appbundle_body.png b/DA4Inventor/images/task3-appbundle_body.png index 06f96259..2dbc9501 100644 Binary files a/DA4Inventor/images/task3-appbundle_body.png and b/DA4Inventor/images/task3-appbundle_body.png differ diff --git a/DA4Inventor/images/task3-appbundle_form_data.png b/DA4Inventor/images/task3-appbundle_form_data.png deleted file mode 100644 index a491a14c..00000000 Binary files a/DA4Inventor/images/task3-appbundle_form_data.png and /dev/null differ diff --git a/DA4Inventor/images/task3-appbundle_registered.png b/DA4Inventor/images/task3-appbundle_registered.png index 6ee6cf57..3557a384 100644 Binary files a/DA4Inventor/images/task3-appbundle_registered.png and b/DA4Inventor/images/task3-appbundle_registered.png differ diff --git a/DA4Inventor/images/task3-appbundle_select_file.png b/DA4Inventor/images/task3-appbundle_select_file.png index 713fb012..bc3fbcda 100644 Binary files a/DA4Inventor/images/task3-appbundle_select_file.png and b/DA4Inventor/images/task3-appbundle_select_file.png differ diff --git a/DA4Inventor/images/task3-appbundle_uploaded.png b/DA4Inventor/images/task3-appbundle_uploaded.png index 925541a3..e24789b2 100644 Binary files a/DA4Inventor/images/task3-appbundle_uploaded.png and b/DA4Inventor/images/task3-appbundle_uploaded.png differ diff --git a/DA4Inventor/images/task4-activity_alias_create_success.png b/DA4Inventor/images/task4-activity_alias_create_success.png index 1eb2f77c..44d6199e 100644 Binary files a/DA4Inventor/images/task4-activity_alias_create_success.png and b/DA4Inventor/images/task4-activity_alias_create_success.png differ diff --git a/DA4Inventor/images/task4-activity_create_success.png b/DA4Inventor/images/task4-activity_create_success.png index d0fdd0d3..4ed232e3 100644 Binary files a/DA4Inventor/images/task4-activity_create_success.png and b/DA4Inventor/images/task4-activity_create_success.png differ diff --git a/DA4Inventor/images/task4-create_activity.png b/DA4Inventor/images/task4-create_activity.png index 33d48991..66546e28 100644 Binary files a/DA4Inventor/images/task4-create_activity.png and b/DA4Inventor/images/task4-create_activity.png differ diff --git a/DA4Inventor/images/task5-select_files_button.png b/DA4Inventor/images/task5-select_files_button.png index c6e0c12c..b4fe4c7b 100644 Binary files a/DA4Inventor/images/task5-select_files_button.png and b/DA4Inventor/images/task5-select_files_button.png differ diff --git a/DA4Inventor/images/task5-signed_downloadurl.png b/DA4Inventor/images/task5-signed_downloadurl.png deleted file mode 100644 index c2c7a337..00000000 Binary files a/DA4Inventor/images/task5-signed_downloadurl.png and /dev/null differ diff --git a/DA4Inventor/images/task5-signed_uploadurl_01.png b/DA4Inventor/images/task5-signed_uploadurl_01.png index 67474a6a..bef079f3 100644 Binary files a/DA4Inventor/images/task5-signed_uploadurl_01.png and b/DA4Inventor/images/task5-signed_uploadurl_01.png differ diff --git a/DA4Inventor/images/task5-signed_uploadurl_02.png b/DA4Inventor/images/task5-signed_uploadurl_02.png deleted file mode 100644 index c0d58a21..00000000 Binary files a/DA4Inventor/images/task5-signed_uploadurl_02.png and /dev/null differ diff --git a/DA4Inventor/images/task5-successful_upload.png b/DA4Inventor/images/task5-successful_upload.png index b6be6f34..822ac96a 100644 Binary files a/DA4Inventor/images/task5-successful_upload.png and b/DA4Inventor/images/task5-successful_upload.png differ diff --git a/DA4Inventor/images/task5-sucessfull_bucket_creation.png b/DA4Inventor/images/task5-sucessfull_bucket_creation.png index e9042554..ab2f471d 100644 Binary files a/DA4Inventor/images/task5-sucessfull_bucket_creation.png and b/DA4Inventor/images/task5-sucessfull_bucket_creation.png differ diff --git a/DA4Inventor/images/task5-sucessfull_signed_url.png b/DA4Inventor/images/task5-sucessfull_signed_url.png new file mode 100644 index 00000000..856967f7 Binary files /dev/null and b/DA4Inventor/images/task5-sucessfull_signed_url.png differ diff --git a/DA4Inventor/images/task6-check_status.png b/DA4Inventor/images/task6-check_status.png index c2e8e241..c43e6c58 100644 Binary files a/DA4Inventor/images/task6-check_status.png and b/DA4Inventor/images/task6-check_status.png differ diff --git a/DA4Inventor/images/task6-result_url.png b/DA4Inventor/images/task6-result_url.png index 88b98b9f..bc01377d 100644 Binary files a/DA4Inventor/images/task6-result_url.png and b/DA4Inventor/images/task6-result_url.png differ diff --git a/DA4Inventor/images/task7-download_step_1.png b/DA4Inventor/images/task7-download_step_1.png index e0d47b36..81a5b133 100644 Binary files a/DA4Inventor/images/task7-download_step_1.png and b/DA4Inventor/images/task7-download_step_1.png differ diff --git a/DA4Inventor/images/task7-download_step_2.png b/DA4Inventor/images/task7-download_step_2.png index 0c4edef4..0d19f37d 100644 Binary files a/DA4Inventor/images/task7-download_step_2.png and b/DA4Inventor/images/task7-download_step_2.png differ diff --git a/DA4Inventor/images/task7-download_step_2b.png b/DA4Inventor/images/task7-download_step_2b.png new file mode 100644 index 00000000..2e2b9b8c Binary files /dev/null and b/DA4Inventor/images/task7-download_step_2b.png differ diff --git a/DA4Inventor/images/task7-download_step_3.png b/DA4Inventor/images/task7-download_step_3.png index fd778fb5..e1037bf0 100644 Binary files a/DA4Inventor/images/task7-download_step_3.png and b/DA4Inventor/images/task7-download_step_3.png differ diff --git a/DA4Inventor/images/task7-download_step_4.png b/DA4Inventor/images/task7-download_step_4.png index 23876a04..c3e47d9a 100644 Binary files a/DA4Inventor/images/task7-download_step_4.png and b/DA4Inventor/images/task7-download_step_4.png differ diff --git a/DA4Inventor/instructions/before_you_begin.md b/DA4Inventor/instructions/before_you_begin.md index 4bbb1333..3b501dce 100644 --- a/DA4Inventor/instructions/before_you_begin.md +++ b/DA4Inventor/instructions/before_you_begin.md @@ -1,32 +1,23 @@ # Before you begin... -## 1. Import Postman Environment for the tutorial +## Import the Postman Collection and Postman environment. -Postman Environments are named configurations that implement variables to store values you typically use across many HTTP requests. For example, your access token, which has to specified with every request you send to APS, is stored in an environment variable named `dapAccesssToken`. To import the environment you need for this tutorial: +Postman Collections are groups of prepopulated HTTP requests. They can also contain scripts that are executed when you send an HTTP request, and/or receive a response. -1. Download the file *DA4Inventor-Environment.postman_environment.json* from the [*collections* folder of this repository](../collections). +Postman environments are named configurations that implement environment variables to store values you typically use across many HTTP requests. For example, this Postman Collection stores the Access Token, which is used across most HTTP requests, in a variable named `dasApiToken`. -2. Import *DA4Inventor-Environment.postman_environment.json* +To import the Postman Collection and environment you need for this tutorial: - 1. In the Postman header bar, click **Import**. A dialog displays. +1. Download the following zip file from the [*collections* folder](../collections) and expand it on your local machine. - 2. Drag the file you downloaded in step 1 to the area marked **Drop files here**. + - _inventor_collections.zip_ -3. Click the **Environment drop-down** on the upper-right, and select **DA4Inventor**. The environment loads. - ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") - -## 2. Import the Postman Collection for the tutorial. - -Postman Collections are groups of prepopulated HTTP requests. To import the requests you need for this tutorial: - -1. Download the file *DA4Inventor Tutorial.postman_collection.json* from the [*collections* folder of this repository](../collections). +2. In the Postman header bar, click **Import**. A dialog displays. -2. Import *DA4Inventor Tutorial.postman_collection.json* - - 1. In the Postman header bar, click **Import**. A dialog displays. - - 2. Drag the file you downloaded in step 1 to the area marked **Drop files here**. +3. Drag the files you expanded in step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and pick the files you expanded in step 1. +4. Click the **Environment drop-down** on the upper-right, and select **DA4Inventor**. The environment loads. + ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") [:rewind:](../readme.md "readme.md") [:arrow_forward:](task-1.md "Next task") diff --git a/DA4Inventor/instructions/task-1.md b/DA4Inventor/instructions/task-1.md index 235a99b9..4fd77ba1 100644 --- a/DA4Inventor/instructions/task-1.md +++ b/DA4Inventor/instructions/task-1.md @@ -2,18 +2,18 @@ ## Create an App -1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v1/tutorials/create-app/). - When specifying details of the app, select "Design Automation API" and "Data Management API". +1. Follow the instructions on the tutorial [Create an App](https://aps-stg.autodesk.com/en/docs/oauth/v2/tutorials/create-app/). + When specifying **API Access**, ensure that "Design Automation API" and "Data Management API" are selected. -2. Jot down the Client ID and Client Secret of the app you created. +2. Note down the Client ID and Client Secret of the app you created. ## Save Client ID and Client Secret to Postman Environment Variables -In the DA4Inventor environment that you selected earlier, there are two Postman Environment Variables named `client_id` and `client_secret`. By setting these variables, you don't need to specify their values when you send HTTP requests to APS. +In the DA4Inventor environment that you selected earlier, there are two Postman Environment Variables named `client_id` and `client_secret`. By setting these variables, you don't need to specify their values when you send HTTP requests to APS. To set the environment variables: -1. Click the **Environment quick look** icon on the upper right corner of Postman. +1. Click the **Environment quick look** icon on the upper right corner of Postman. ![Environment quick look icon](../images/task1-environment_quick_look_icon.png "Environment quick look icon") 2. Click in the **CURRENT VALUE** column on the **client_id** row. The Edit icon displays. @@ -24,23 +24,22 @@ To set the environment variables: 4. Similarly, enter the Client Secret you jotted down earlier in the **CURRENT VALUE** column on the **client_secret** row. -5. Click the **Environment quick look** icon again. +5. Click the **Environment quick look** icon again. ## Get an Access Token -To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a prepopulated authenticate request that you can send. To send the request to APS: -1. On the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads. +To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a pre-populated authenticate request that you can send. To send the request to APS: -2. Click the **Body** tab. +1. On the Postman sidebar, click **Task 1 - Obtain an Access Token > POST Get an Access Token**. The request loads. -3. Move the cursor over the **Value** column of the **client_id** and **client_secret**, and verify that the values you specified as environment variables are displayed. - ![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret") +2. Click the **Pre-request Script** tab. Notice how a script (written in JavaScript) takes the Client ID and Client Secret, concatenates them, converts to a Base64 encoded string, and saves it back to a Postman Collection Variable named `client_auth_keys`. + ![Preview Client Id and Client Secret](../images/task1-preview_environment_variables.png "Preview Client Id and Client Secret") 4. Click **Send**. The request is sent to APS. If your request authenticates successfully, you should see a response similar to the following: -![Successful authentication](../images/task1-authenticate_successfull.png "Successful authentication") +![Successful authentication](../images/task1-authenticate_successfull.png "Successful authentication") -Postman saves the Access Token in the Postman Environment Variable `dasApiToken`. Postman picks up the Access Token from this variable for all subsequent requests. This variable eliminates the need for you to repeatedly specify the value of the token for subsequent requests. +Postman saves the Access Token in the Postman Collection Variable `dasApiToken`. Postman picks up the Access Token from this variable for all subsequent requests. This variable eliminates the need for you to repeatedly specify the value of the token for subsequent requests. [:rewind:](../readme.md "readme.md") [:arrow_backward:](before_you_begin.md "Previous task" ) [:arrow_forward:](task-2.md "Next task") diff --git a/DA4Inventor/instructions/task-2.md b/DA4Inventor/instructions/task-2.md index c2fbfe1c..df2e9d05 100644 --- a/DA4Inventor/instructions/task-2.md +++ b/DA4Inventor/instructions/task-2.md @@ -1,6 +1,6 @@ # Task 2 - Create a Nickname -APS uses the Client ID to uniquely identify an app. The Client ID can be long and cryptic, and hence a source of irritation when you reference the data you add to your app. +APS uses the Client ID to uniquely identify an app. The Client ID can often be lengthy and cryptic, which can be a source of frustration when you reference the data added to your app.. A Nickname lets you map a Client ID to an easy-to-use name that you can use in place of the Client ID. This tutorial uses the `dasNickName` Postman Environment Variable to store the Nickname. @@ -12,7 +12,6 @@ A Nickname lets you map a Client ID to an easy-to-use name that you can use in p - If you get stuck while working on this tutorial, and are unable to proceed, use this request to clear all data from the app, and restart from Task 1. - - Nicknames must be globally unique. If the nickname is already in use, even by someone else, APS returns a `409 Conflict` error when you try to set the Nickname. ## Save the Nickname to a variable diff --git a/DA4Inventor/instructions/task-3.md b/DA4Inventor/instructions/task-3.md index 1d364ad8..cbb9886d 100644 --- a/DA4Inventor/instructions/task-3.md +++ b/DA4Inventor/instructions/task-3.md @@ -1,6 +1,6 @@ # Task 3 - Upload an AppBundle to Design Automation -An AppBundle is a package of binaries and supporting files that contains the custom commands you want to run. For this tutorial, you will use the AppBundle named *samplePlugin.bundle* that is stored in the [*tutorial_data* folder of this repository](../tutorial_data). This AppBundle contains an Inventor plug-in that takes in an Inventor part or assembly file, and resizes it to a size you specify. It also generates an image (BMP file) of the part or assembly. See the corresponding [task in the Step-by-Step tutorial on the APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/inventor/task6-post-workitem/) for more information on AppBundles. +An AppBundle is a package of binaries and supporting files that contains the custom commands you want to run. For this tutorial, you will use an AppBundle named *samplePlugin.bundle* that is stored in the [*tutorial_data* folder of this repository](../tutorial_data). This AppBundle contains an Inventor plug-in that takes an Inventor part or assembly file, and resizes it to a size you specify. It also generates an image (BMP file) of the part or assembly. See the corresponding [task in the Step-by-Step tutorial on the APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/inventor/task6-post-workitem/) for more information on AppBundles. ## Download the AppBundle @@ -12,17 +12,16 @@ When registering the AppBundle, you provide a name for the AppBundle (the id), a 1. On the Postman sidebar, click **Task 3 - Upload AppBundle > POST Register the AppBundle**. The request loads. -3. Click the **Body** tab, and verify that the `id`, is set to the `ChangeParamApp` variable and `engine` is set to `Autodesk.Inventor+24` (Inventor 2020). +2. Click the **Body** tab, and verify that the `id`, is set to the `ChangeParamApp` variable and `engine` is set to `Autodesk.Inventor+2024` (Inventor 2024). ![AppBundle Body](../images/task3-appbundle_body.png "AppBundle Body") -4. Click **Send**. If the request is successful, you see a screen similar to the following image: +3. Click **Send**. If the request is successful, you see a screen similar to the following image: ![AppBundle Registered](../images/task3-appbundle_registered.png "AppBundle Registered") - `uploadParameters` shown in the response section of the preceding image contains the information required to upload the AppBundle to APS. This information is saved to a series of Postman Environment variables, so that it can be reused in the next step. + `uploadParameters` shown in the response section of the preceding image contains the information required to upload the AppBundle to APS. This information is saved to a series of Postman Collection variables, so that they can be reused in the next step. - ![formData](../images/task3-appbundle_form_data.png "formData") ## Upload the AppBundle diff --git a/DA4Inventor/instructions/task-4.md b/DA4Inventor/instructions/task-4.md index 258a438c..729c899c 100644 --- a/DA4Inventor/instructions/task-4.md +++ b/DA4Inventor/instructions/task-4.md @@ -2,7 +2,7 @@ An Activity is an action that can be executed in Design Automation. -## Create a New Activity +## Create a new Activity 1. On the Postman sidebar, click **Task 4 - Publish an Activity > POST Create a New Activity**. The request loads. @@ -30,7 +30,7 @@ An Activity is an action that can be executed in Design Automation. - `settings` specifies the command script to be run by the activity. In this case, it is empty as no script is being called. -3. Note how the name (Id) of the Activity is set to `ChangeParamActivity`. +3. Notice how the name (Id) of the Activity is set to `ChangeParamActivity`. 4. Click **Send**. If the request is successful, you should see a screen similar to the following image. diff --git a/DA4Inventor/instructions/task-5.md b/DA4Inventor/instructions/task-5.md index 579a5e1c..49262e81 100644 --- a/DA4Inventor/instructions/task-5.md +++ b/DA4Inventor/instructions/task-5.md @@ -1,6 +1,6 @@ # Task 5 - Prepare cloud storage -The Activity ChangeParamActivity resizes an Inventor part or assembly to a height and width you specify (as a JSON object). It also produces an image of the resized part or assembly. In this task, you prepare a cloud storage service to hold the input Inventor files, and the output (resized) Inventor files and image file. While you can use any cloud storage service for this purpose, this tutorial uses the Object Storage Service (OSS) through the Data Management API. +The Activity `ChangeParamActivity` resizes an Inventor part or assembly to a height and width you specify (as a JSON object). It also produces an image of the resized part or assembly. In this task, you prepare a cloud storage service to hold the input Inventor files, and the output (resized) Inventor files and image file. While you can use any cloud storage service for this purpose, this tutorial uses the Object Storage Service (OSS) through the Data Management API. This tutorial provides instructions to assist you resize an Inventor part. We encourage you to try resizing an Inventor Assembly on your own, later. @@ -8,9 +8,12 @@ There are five Postman Environment Variables you must specify for this task. The - `ossBucketKey` - The Bucket Key for the Bucket that holds your files in the cloud. - `ossInputFileObjectKey` - The Object Key of the Inventor Part file. - `ossOutputIptFileObjectKey` - The Object Key of the placeholder for the resized part the activity produces. -- `ossOutputIamFileObjectKey` - The Object Key of the placeholder for the resized assembly the activity produces. - `ossOutputBmpFileObjectKey` - The Object Key of the placeholder for the image file the activity produces. +If you are using an Inventor Assembly file as an input, you must specify the following Postman Environment as well: + +- `ossOutputIamFileObjectKey` - The Object Key of the placeholder for the resized assembly the activity produces. + ## Create a Bucket @@ -31,72 +34,62 @@ There are five Postman Environment Variables you must specify for this task. The ![Successful Bucket Creation](../images/task5-sucessfull_bucket_creation.png "Successful Bucket Creation") -## Upload input file to OSS +## Obtain Signed URL to Upload the Input File 1. Download the input file, *box.ipt* from the [*tutorial_data* folder of this repository](../tutorial_data). 2. Click the **Environment quick look** icon on the upper right corner of Postman. -3. In the **CURRENT VALUE** column, in the **ossInputFileObjectKey** row, specify an Object Key (a name to identify the input file, once it is uploaded to OSS). +3. In the **CURRENT VALUE** column, in the **ossInputFileObjectKey** row, specify an Object Key. The Object Key is a name to identify the input file, once it is uploaded to OSS. (**Tip:** Specify the file name of the dwg file: *box.ipt*). 4. Click the **Environment quick look** icon to hide the variables. -5. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > PUT Upload Input File**. The request loads. - -6. Click the **Body** tab. - -7. Click **Select File** and pick the file you downloaded in step 1. - - ![Select file button](../images/task5-select_files_button.png "Select file button") - -8. Click **Send**. If your request is successful, you should see a screen similar to the one below: +5. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > GET Obtain Signed URL to Upload the Input File**. The request loads. - ![Successful upload of input file](../images/task5-successful_upload.png "Successful upload of input file") - -## Get temporary download URL - -Design Automation needs to download the input file to process it. This request obtains a temporary signed URL that Design Automation can use to download the file. The URL expires in an hour. +6. Click **Send**. The signed URL is saved to a Collection Variable named `ContentUploadSignedURL`. The Upload Key is also saved to a variable named `UploadKey`. The Upload Key uniquely identifies the upload session. You use it later to complete the upload session. -1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Get Temporary Download URL**. The request loads. +If your request is successful, you should see a screen similar to the one below: -2. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, a script in the **Tests** tab saves this URL it to a Postman Environment Variable named `ossInputFileSignedUrl`. +![Successful Signed URL](../images/task5-sucessfull_signed_url.png "Successful Signed URL Creation") - ![Signed download URL](../images/task5-signed_downloadurl.png "Signed download URL") +## Upload input file to OSS +1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > PUT Upload Input File to OSS**. The request loads. +2. Click the **Body** tab. -## Get temporary upload URL for output IPT file +3. Click **Select File** and pick the file you downloaded earlier (*box.ipt*). -Design Automation needs a signed URL to upload the resized IPT file the Activity creates. This request obtains a temporary signed URL that Design Automation can use. The URL expires in an hour. + ![Select file button](../images/task5-select_files_button.png "Select file button") -1. Click the **Environment quick look** icon on the upper right corner of Postman. +4. Click **Send**. If your request is successful, you should see a screen similar to the one below: -2. In the **CURRENT VALUE** column, in the **ossOutputIptFileObjectKey** row, specify an Object Key (a name to identify the output file, once it is uploaded to OSS) for the resized Inventor part file. + ![Successful upload of input file](../images/task5-successful_upload.png "Successful upload of input file") -3. Click the **Environment quick look** icon to hide the variables. +## Complete the upload -4. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Get Temporary Upload URL for Output IPT File**. The request loads. +To make the uploaded file available for download, you must specifically instruct OSS that the upload process has been completed. -5. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, a script in the **Tests** tab saves the signed URL to the Postman Environment Variable `ossOutputIptFileSignedUrl`. +1. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Complete the upload**. The request loads. - ![Signed upload URL](../images/task5-signed_uploadurl_01.png "Signed upload URL") +2. Click the **Body** tab and pay attention to how the Upload Key tells OSS what upload session to close. +3. Click **Send**. If your request is successful, you should see a screen similar to the one below: + ![Successful upload of input file](../images/task5-signed_uploadurl_01.png "Successful upload of input file") -## Get temporary upload URL for output BMP file +## Define Object Keys for the files generated by the Activity -As with the resized IPT file, Design Automation needs a signed URL to upload the image file the Activity creates. This request obtains a temporary signed URL for that purpose. The URL expires in an hour. A script that exists in the **Tests** tab saves the URL to the Postman Environment Variable `ossOutputIptFileSignedUrl`. +The Activity `ChangeParamActivity` resizes the input Inventor part and produces an *.ipt* file. It also produces an image of the resized part. You must specify the Object Keys for those files so that Design Automation is save those files to OSS. Use the two Postman Environment Variables `ossOutputIptFileObjectKey` and `ossOutputBmpFileObjectKey` to hold the Object Keys. 1. Click the **Environment quick look** icon on the upper right corner of Postman. -2. In the **CURRENT VALUE** column, in the **ossOutputBmpFileObjectKey** row, specify an Object Key (a name to identify the output file, once it is uploaded to OSS) for the generated image. - -3. Click the **Environment quick look** icon to hide the variables. +2. In the **CURRENT VALUE** column, in the **ossOutputIptFileObjectKey** row, specify an Object Key for the *.ipt* file that the Activity generates. -4. On the Postman sidebar, click **Task 5 - Prepare Cloud Storage > POST Get Temporary Upload URL for Output BMP File**. The request loads. + **Tip:** You can use the file name of the ipt file (*ResultSmall.ipt*) as its Object Key. -5. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, a script in the **Tests** tab saves the signed URL to the Postman Environment Variable `ossOutputBmpFileSignedUrl`. +3. In a similar way, specify a value for **ossOutputBmpFileObjectKey**. - ![Signed upload URL](../images/task5-signed_uploadurl_02.png "Signed upload URL") +4. Click the **Environment quick look** icon. [:rewind:](../readme.md "readme.md") [:arrow_backward:](task-4.md "Previous task") [:arrow_forward:](task-6.md "Next task") diff --git a/DA4Inventor/instructions/task-6.md b/DA4Inventor/instructions/task-6.md index 113d0041..d15d15d4 100644 --- a/DA4Inventor/instructions/task-6.md +++ b/DA4Inventor/instructions/task-6.md @@ -22,16 +22,15 @@ Like in function calls, optional parameters of the Activity can be skipped and l - `arguments` - Contains all the parameters that need to be passed to the Activity specified by `activityId`. They must match the parameters you specified in Task 4, when you created the Activity. - - `InventorDoc` - Specifies how to obtain the input Inventor part file for the Activity. The value specified here is the Postman variable `ossInputFileSignedUrl`, which contains the signed download URL you created in Task 5. - - **Note** Had you uploaded a zip file instead of a IPT file, you would have been required specify the `pathInZip` attribute. This attribute specifies the path to the IPT file within the zip file. + - `InventorDoc` - Specifies the URN of the input part file for the Activity. It is constructed by combining the Object ID of the input Inventor part file with the Bucket Key and the statement `urn:adsk.objects:os.object:`. - - `InventorParams` - Specifies the new height and width of the Inventor part file, as a JSON object. + **Note** Had you uploaded a zip file instead of a IPT file, you would have been required specify the `pathInZip` attribute. This attribute specifies the path to the IPT file within the zip file. - - `OutputIpt` - Specifies the signed URL to the location on cloud storage reserved for the resized part file. The value specified here is the Postman variable `ossOutputIptFileSignedUrl`, which contains the signed URL you created for the resized part in Task 5. + - `InventorParams` - Specifies the new height and width of the Inventor part file, as a JSON object. - - `OutputBmp` - Specifies the signed URL to the location on cloud storage reserved for the generated image file. The value specified here is the Postman variable `ossOutputBmpFileSignedUrl`, which contains the signed URL you created for the image file in Task 5. + - `OutputIpt` - Specifies the URN of the generated part file. It is constructed by combining the Object ID of the generated Inventor part file with the Bucket Key and the statement `urn:adsk.objects:os.object:`. + - `OutputBmp` - Specifies the URN of the generated image file. It is constructed by combining the Object ID of the generated image file with the Bucket Key and the statement `urn:adsk.objects:os.object:`. ## Check Status of a WorkItem @@ -46,4 +45,4 @@ Design Automation WorkItems are queued before they are processed. Processing its **Note:** The best practice is to use the `onComplete` argument when submitting a WorkItem. The `onComplete` argument enables you to specify a callback URL, which is invoked when execution completes. For more information on the argument, see the [documentation on Callbacks](https://aps.autodesk.com/en/docs/design-automation/v3/developers_guide/callbacks/#oncomplete-callback). -[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-5.md "Previous task") [:arrow_forward:](task-7.md "Next task") +[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-5.md "Previous task") [:arrow_forward:](task-7.md "Next task") diff --git a/DA4Inventor/instructions/task-7.md b/DA4Inventor/instructions/task-7.md index 9f941554..225ac2db 100644 --- a/DA4Inventor/instructions/task-7.md +++ b/DA4Inventor/instructions/task-7.md @@ -1,27 +1,45 @@ # Task 7 - Download the results -Once the WorkItem has completed executing the Activity, Design Automation uploads the resulting files to OSS. You use the Data Management API to download the text file to your local machine. +Once the WorkItem has completed executing the Activity, Design Automation uploads the resulting files to OSS. You use the Data Management API to download the files to your local machine. -## Download the resized IPT file from OSS -1. On the Postman sidebar, click **Task 7 - Download the Results > GET Download Resized IPT file from OSS**. The request loads. +## Get temporary download URL of the resized IPT file + +1. On the Postman sidebar, click **Task 7 - Download the Result > GET Get S3 Download URL for Resized IPT file**. The request loads. 2. Click **Send**. You should see a screen similar to the following image. ![Download Result](../images/task7-download_step_1.png "Download Result") -3. In the response area, click **Save Response > Save to a file**. The output file downloads. Save the file as a *.ipt* file. +## Download the resized IPT file from OSS + +1. On the Postman sidebar, click **Task 7 - Download the Result > GET Download Resized IPT file from OSS**. The request loads. + +2. Click **Send**. You should see a screen similar to the following image. ![Download Result](../images/task7-download_step_2.png "Download Result") -## Download the generated BMP file from OSS +3. In the response area, click **Save response to file**. The output file downloads. Save the file as a *.bmp* file. + + ![Save Result](../images/task7-download_step_2b.png "Save Result") + +## Get temporary download URL of the generated BMP file -1. On the Postman sidebar, click **Task 7 - Download the Results > GET Download Generated BMP file from OSS**. The request loads. +1. On the Postman sidebar, click **Task 7 - Download the Result > GET Get S3 Download URL for Generated BMP**. The request loads. 2. Click **Send**. You should see a screen similar to the following image. ![Download Result](../images/task7-download_step_3.png "Download Result") -3. In the response area, click **Save Response > Save to a file**. The output file downloads. Save the file as a *.bmp* file. + +## Download generated BMP file from OSS + +1. On the Postman sidebar, click **Task 7 - Download the Result > GET Download Generated BMP**. The request loads. ![Download Result](../images/task7-download_step_4.png "Download Result") + +2. Click **Send**. You should see a screen similar to the following image. + +3. In the response area, click **Save Response > Save to a file**. The output file downloads. Save the file as a *.bmp* file. + + ![Download Result](../images/task7-download_step_5.png "Download Result") diff --git a/DA4Inventor/readme.md b/DA4Inventor/readme.md index 81a4e2dd..bbbe7cfa 100644 --- a/DA4Inventor/readme.md +++ b/DA4Inventor/readme.md @@ -1,21 +1,24 @@ # Design Automation for Inventor Step-by-Step Tutorial ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Design-Automation](https://img.shields.io/badge/Design%20Automation-v3-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v7-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) -[![AutoCAD](https://img.shields.io/badge/Inventor-2018-orange.svg)](http://developer.autodesk.com/) [![AutoCAD](https://img.shields.io/badge/Inventor-2019-orange.svg)](http://developer.autodesk.com/) [![AutoCAD](https://img.shields.io/badge/Inventor-2020-orange.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/Inventor-2021-orange.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/Inventor-2022-orange.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/Inventor-2023-orange.svg)](http://developer.autodesk.com/) +[![AutoCAD](https://img.shields.io/badge/Inventor-2024-orange.svg)](http://developer.autodesk.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) [![License](https://img.shields.io/:license-MIT-blue.svg)](http://opensource.org/licenses/MIT) -This folder contains a Postman Collection that contains the requests used in the [Design Automation for Inventor Step-by-Step tutorial](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/inventor/) on the APS developer portal. +This folder contains a Postman Collection that contains the requests used in the [Automating Inventor Step-by-Step tutorial](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/inventor/) on the APS developer portal. On the Postman sidebar, requests are stored in folders that have the same name as the corresponding task in the APS developer portal. ![APS developer portal menu to Postman](images/aps_portal_2_inventor_postman_menu_01.png "APS developer portal task to Postman mapping") diff --git a/DA4Revit/collections/DA4Revit-Collection Tutorial.postman_collection.json b/DA4Revit/collections/DA4Revit-Collection Tutorial.postman_collection.json index 228e28a3..b5800d78 100644 --- a/DA4Revit/collections/DA4Revit-Collection Tutorial.postman_collection.json +++ b/DA4Revit/collections/DA4Revit-Collection Tutorial.postman_collection.json @@ -1,8 +1,9 @@ { "info": { - "_postman_id": "acd19def-7581-4d86-8e33-bd46b23fee5e", - "name": "Design Automation For Revit Tutorial", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "_postman_id": "921baa30-0741-4871-b2cb-24e20ca61783", + "name": "Automating Revit", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "3021021" }, "item": [ { @@ -11,14 +12,24 @@ { "name": "Get an Access Token", "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "const clientId = pm.environment.get(\"client_id\");", + "const clientSecret = pm.environment.get(\"client_secret\");", + "var clientAuthKeys = btoa(clientId +\":\"+clientSecret);", + "pm.collectionVariables.set(\"client_auth_keys\", clientAuthKeys);" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "ae612db8-104c-48f6-bf94-05f92da6c32b", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"dasApiToken\", body[\"access_token\"]);", - "" + "pm.collectionVariables.set(\"dasApiToken\", body.access_token);" ], "type": "text/javascript" } @@ -29,24 +40,23 @@ "header": [ { "key": "Content-Type", - "name": "Content-Type", "value": "application/x-www-form-urlencoded", "type": "text" + }, + { + "key": "Accept", + "value": "application/json", + "type": "text" + }, + { + "key": "Authorization", + "value": "Basic {{client_auth_keys}}", + "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ - { - "key": "client_id", - "value": "{{client_id}}", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{client_secret}}", - "type": "text" - }, { "key": "grant_type", "value": "client_credentials", @@ -54,23 +64,26 @@ }, { "key": "scope", - "value": "code:all data:write data:read bucket:create bucket:delete", + "value": "code:all data:write data:read bucket:create bucket:delete bucket:read", "type": "text" } ] }, "url": { - "raw": "{{baseUrl}}/authentication/v1/authenticate", + "raw": "https://developer.api.autodesk.com/authentication/v2/token", + "protocol": "https", "host": [ - "{{baseUrl}}" + "developer", + "api", + "autodesk", + "com" ], "path": [ "authentication", - "v1", - "authenticate" + "v2", + "token" ] - }, - "description": "[See Documentation](https://aps.autodesk.com/en/docs/oauth/v2/reference/http/authenticate-POST/)" + } }, "response": [] } @@ -80,7 +93,6 @@ { "listen": "prerequest", "script": { - "id": "52cc1460-3404-491e-a2fe-a99e00f8f89e", "type": "text/javascript", "exec": [ "" @@ -90,15 +102,13 @@ { "listen": "test", "script": { - "id": "e6c89884-7c8f-4891-9e5b-f582dbe59fc9", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 3 - Create a Nickname", @@ -109,7 +119,6 @@ { "listen": "test", "script": { - "id": "156f0d70-5542-47e5-a7c5-42eada118102", "exec": [ "" ], @@ -154,7 +163,6 @@ { "listen": "prerequest", "script": { - "id": "a14d51b0-063d-42eb-ada9-0543d07cd9b0", "type": "text/javascript", "exec": [ "" @@ -164,15 +172,13 @@ { "listen": "test", "script": { - "id": "69325a16-c1e6-45b4-ab8f-7b4f92a20fa9", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 4 - Upload AppBundle", @@ -183,18 +189,17 @@ { "listen": "test", "script": { - "id": "36628175-e2e9-417e-9f3f-a6f25e01e038", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"deleteWallsAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", - "pm.environment.set(\"deleteWallsAppVersion\", body[\"version\"]);", - "pm.environment.set(\"deleteWallsAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", - "pm.environment.set(\"deleteWallsAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", - "pm.environment.set(\"deleteWallsAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", - "pm.environment.set(\"deleteWallsAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", - "pm.environment.set(\"deleteWallsAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", - "pm.environment.set(\"deleteWallsAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", - "pm.environment.set(\"deleteWallsAppFormRedirect\", body[\"uploadParameters\"][\"formData\"][\"success_action_redirect\"]);", + "pm.collectionVariables.set(\"deleteWallsAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", + "pm.collectionVariables.set(\"deleteWallsAppVersion\", body[\"version\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormRedirect\", body[\"uploadParameters\"][\"formData\"][\"success_action_redirect\"]);", "" ], "type": "text/javascript" @@ -215,7 +220,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n\t\"id\": \"DeleteWallsApp\",\r\n\t\"engine\": \"Autodesk.Revit+2020\",\r\n\t\"description\": \"Delete Walls app based on Revit 2020\"\r\n}" + "raw": "{\r\n\t\"id\": \"DeleteWallsApp\",\r\n\t\"engine\": \"Autodesk.Revit+2024\",\r\n\t\"description\": \"Delete Walls app based on Revit 2024\"\r\n}" }, "url": { "raw": "{{dasApiRoot}}/appbundles", @@ -236,7 +241,6 @@ { "listen": "prerequest", "script": { - "id": "bf4cbf1e-0c91-4eba-bda9-dedf043722d4", "exec": [ "" ], @@ -246,14 +250,8 @@ { "listen": "test", "script": { - "id": "e482ea28-b523-4cb1-80d0-53ea9cae10d7", "exec": [ - "pm.environment.unset(\"deleteWallsAppFormDataKey\");", - "pm.environment.unset(\"deleteWallsAppFormDataPolicy\");", - "pm.environment.unset(\"deleteWallsAppFormDataSignature\");", - "pm.environment.unset(\"deleteWallsAppFormDataCredential\");", - "pm.environment.unset(\"deleteWallsAppFormDataDate\");", - "pm.environment.unset(\"deleteWallsAppFormDataToken\");" + "" ], "type": "text/javascript" } @@ -322,8 +320,8 @@ }, { "key": "file", - "value": "", - "type": "file" + "type": "file", + "src": [] } ] }, @@ -358,7 +356,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"version\": {{deleteWallsAppVersion}},\r\n \"id\": \"test\"\r\n}" + "raw": "{\r\n \"version\": 1,\r\n \"id\": \"test\"\r\n}" }, "url": { "raw": "{{dasApiRoot}}/appbundles/DeleteWallsApp/aliases", @@ -381,17 +379,16 @@ { "listen": "test", "script": { - "id": "4f60fcfe-a700-42d7-982b-d6bc40890e50", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"deleteWallsAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", - "pm.environment.set(\"deleteWallsAppVersion\", body[\"version\"]);", - "pm.environment.set(\"deleteWallsAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", - "pm.environment.set(\"deleteWallsAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", - "pm.environment.set(\"deleteWallsAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", - "pm.environment.set(\"deleteWallsAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", - "pm.environment.set(\"deleteWallsAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", - "pm.environment.set(\"deleteWallsAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", + "pm.collectionVariables.set(\"deleteWallsAppUrl\", body[\"uploadParameters\"][\"endpointURL\"]);", + "pm.collectionVariables.set(\"deleteWallsAppVersion\", body[\"version\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataKey\", body[\"uploadParameters\"][\"formData\"][\"key\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataPolicy\", body[\"uploadParameters\"][\"formData\"][\"policy\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataSignature\", body[\"uploadParameters\"][\"formData\"][\"x-amz-signature\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataCredential\", body[\"uploadParameters\"][\"formData\"][\"x-amz-credential\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataDate\", body[\"uploadParameters\"][\"formData\"][\"x-amz-date\"]);", + "pm.collectionVariables.set(\"deleteWallsAppFormDataToken\", body[\"uploadParameters\"][\"formData\"][\"x-amz-security-token\"]);", "" ], "type": "text/javascript" @@ -412,7 +409,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n\t\"engine\": \"Autodesk.Revit+2020\",\r\n\t\"description\": \"Delete Walls app based on Revit 2020\"\r\n}" + "raw": "{\r\n\t\"engine\": \"Autodesk.Revit+2024\",\r\n\t\"description\": \"Delete Walls app based on Revit 2024\"\r\n}" }, "url": { "raw": "{{dasApiRoot}}/appbundles/DeleteWallsApp/versions", @@ -435,7 +432,6 @@ { "listen": "prerequest", "script": { - "id": "8f0a0f29-8b59-42bf-9d08-789f1693ec56", "exec": [ "" ], @@ -445,7 +441,6 @@ { "listen": "test", "script": { - "id": "cc9b3ec6-10a1-4013-bcdd-6ed930be50b0", "exec": [ "pm.environment.unset(\"deleteWallsAppFormDataKey\");", "pm.environment.unset(\"deleteWallsAppFormDataPolicy\");", @@ -521,8 +516,8 @@ }, { "key": "file", - "value": "", - "type": "file" + "type": "file", + "src": [] } ] }, @@ -557,7 +552,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"version\": {{deleteWallsAppVersion}}\r\n}" + "raw": "{\r\n \"version\": 2\r\n}" }, "url": { "raw": "{{dasApiRoot}}/appbundles/DeleteWallsApp/aliases/test", @@ -580,7 +575,6 @@ { "listen": "prerequest", "script": { - "id": "46ef1ae6-bc89-4dea-b52d-417311c1651f", "type": "text/javascript", "exec": [ "" @@ -590,15 +584,13 @@ { "listen": "test", "script": { - "id": "e3146846-f78a-4bec-98e3-3167ce31d708", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { "name": "Task 5 - Publish an Activity", @@ -609,10 +601,9 @@ { "listen": "test", "script": { - "id": "3239edaa-45cf-4c0e-95d6-59b332532e8d", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"deleteWallsActivityVersion\", body[\"version\"]);", + "pm.collectionVariables.set(\"deleteWallsActivityVersion\", body[\"version\"]);", "" ], "type": "text/javascript" @@ -633,7 +624,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n\t\"id\": \"DeleteWallsActivity\",\r\n\t\"commandLine\": [ \"$(engine.path)\\\\\\\\revitcoreconsole.exe /i \\\"$(args[rvtFile].path)\\\" /al \\\"$(appbundles[DeleteWallsApp].path)\\\"\" ],\r\n\t\"parameters\": {\r\n\t \"rvtFile\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"get\",\r\n\t\t\"description\": \"Input Revit model\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"input.rvt\"\r\n\t },\r\n\t \"result\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"put\",\r\n\t\t\"description\": \"Results\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"result.rvt\"\r\n\t }\r\n\t},\r\n\t\"engine\": \"Autodesk.Revit+2020\",\r\n\t\"appbundles\": [ \"{{dasNickName}}.DeleteWallsApp+test\" ],\r\n\t\"description\": \"Delete walls from Revit file.\"\r\n}" + "raw": "{\r\n\t\"id\": \"DeleteWallsActivity\",\r\n\t\"commandLine\": [ \"$(engine.path)\\\\\\\\revitcoreconsole.exe /i \\\"$(args[rvtFile].path)\\\" /al \\\"$(appbundles[DeleteWallsApp].path)\\\"\" ],\r\n\t\"parameters\": {\r\n\t \"rvtFile\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"get\",\r\n\t\t\"description\": \"Input Revit model\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"input.rvt\"\r\n\t },\r\n\t \"result\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"put\",\r\n\t\t\"description\": \"Results\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"result.rvt\"\r\n\t }\r\n\t},\r\n\t\"engine\": \"Autodesk.Revit+2024\",\r\n\t\"appbundles\": [ \"{{dasNickName}}.DeleteWallsApp+test\" ],\r\n\t\"description\": \"Delete walls from Revit file.\"\r\n}" }, "url": { "raw": "{{dasApiRoot}}/activities", @@ -664,7 +655,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"id\": \"test\",\r\n \"version\": {{deleteWallsActivityVersion}}\r\n}" + "raw": "{\r\n \"id\": \"test\",\r\n \"version\": 1\r\n}" }, "url": { "raw": "{{dasApiRoot}}/activities/DeleteWallsActivity/aliases", @@ -687,10 +678,9 @@ { "listen": "test", "script": { - "id": "8be88e70-93a5-42a1-bac3-19e1b9861451", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"deleteWallsActivityVersion\", body[\"version\"]);", + "pm.collectionVariables.set(\"deleteWallsActivityVersion\", body[\"version\"]);", "" ], "type": "text/javascript" @@ -711,7 +701,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n\t\"commandLine\": [\"$(engine.path)\\\\\\\\revitcoreconsole.exe /i \\\"$(args[rvtFile].path)\\\" /al \\\"$(appbundles[DeleteWallsApp].path)\\\"\"],\r\n\t\"parameters\": {\r\n\t \"rvtFile\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"get\",\r\n\t\t\"description\": \"Input Revit model\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"input.rvt\"\r\n\t },\r\n\t \"result\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"put\",\r\n\t\t\"description\": \"Results\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"result.rvt\"\r\n\t }\r\n\t},\r\n\t\"engine\": \"Autodesk.Revit+2020\",\r\n\t\"appbundles\": [ \"{{dasNickName}}.DeleteWallsApp+test\" ],\r\n\t\"description\": \"Delete walls from Revit file.\"\r\n}" + "raw": "{\r\n\t\"commandLine\": [\"$(engine.path)\\\\\\\\revitcoreconsole.exe /i \\\"$(args[rvtFile].path)\\\" /al \\\"$(appbundles[DeleteWallsApp].path)\\\"\"],\r\n\t\"parameters\": {\r\n\t \"rvtFile\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"get\",\r\n\t\t\"description\": \"Input Revit model\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"input.rvt\"\r\n\t },\r\n\t \"result\": {\r\n\t\t\"zip\": false,\r\n\t\t\"ondemand\": false,\r\n\t\t\"verb\": \"put\",\r\n\t\t\"description\": \"Results\",\r\n\t\t\"required\": true,\r\n\t\t\"localName\": \"result.rvt\"\r\n\t }\r\n\t},\r\n\t\"engine\": \"Autodesk.Revit+2024\",\r\n\t\"appbundles\": [ \"{{dasNickName}}.DeleteWallsApp+test\" ],\r\n\t\"description\": \"Delete walls from Revit file.\"\r\n}" }, "url": { "raw": "{{dasApiRoot}}/activities/DeleteWallsActivity/versions", @@ -749,7 +739,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"version\": {{deleteWallsActivityVersion}}\r\n}" + "raw": "{\r\n \"version\": 2\r\n}" }, "url": { "raw": "{{dasApiRoot}}/activities/DeleteWallsActivity/aliases/test", @@ -772,7 +762,6 @@ { "listen": "prerequest", "script": { - "id": "1fae5ad4-7ad1-4f4b-b1ba-65541caa508a", "type": "text/javascript", "exec": [ "" @@ -782,43 +771,57 @@ { "listen": "test", "script": { - "id": "541e1d22-ea6f-478c-b339-b4b76db15890", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { - "name": "Task 6 - Prepare Cloud Storage", + "name": "Task 6 - Prepare Cloud Storage Copy 2", "item": [ { "name": "Create a Bucket", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}", - "type": "text" + "key": "Content-Type", + "value": "application/json" }, { - "key": "Content-Type", - "value": "application/json", - "type": "text" + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" } ], "body": { "mode": "raw", - "raw": "{\n\t\"bucketKey\": \"{{ossBucketKey}}\",\n \"access\": \"full\",\n \"policyKey\": \"transient\"\n}" + "raw": "{\n\t\"bucketKey\": \"{{ossBucketKey}}\",\n\t\"access\": \"full\",\n\t\"policyKey\": \"transient\"\n}\n" }, "url": { - "raw": "{{baseUrl}}/oss/v2/buckets", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets", + "protocol": "https", "host": [ - "{{baseUrl}}" + "developer", + "api", + "autodesk", + "com" ], "path": [ "oss", @@ -831,133 +834,126 @@ "response": [] }, { - "name": "Upload Input File to OSS", + "name": "Obtain Signed URL to Upload the Input File", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"UploadKey\", body.uploadKey);", + "pm.collectionVariables.set(\"ContentUploadSignedURL\", body.urls[0]);" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { - "method": "PUT", + "auth": { + "type": "noauth" + }, + "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{dasApiToken}}", "type": "text" - }, - { - "key": "Accept-Encoding", - "value": "gzip, deflate", - "type": "text" } ], - "body": { - "mode": "file", - "file": { - "src": "" - } - }, "url": { - "raw": "{{baseUrl}}/oss/v2/buckets/:BUCKET_KEY/objects/:OBJECT_KEY", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossInputFileObjectKey}}/signeds3upload", + "protocol": "https", "host": [ - "{{baseUrl}}" + "developer", + "api", + "autodesk", + "com" ], "path": [ "oss", "v2", "buckets", - ":BUCKET_KEY", + "{{ossBucketKey}}", "objects", - ":OBJECT_KEY" + "{{ossInputFileObjectKey}}", + "signeds3upload" ], - "variable": [ - { - "key": "BUCKET_KEY", - "value": "{{ossBucketKey}}" - }, + "query": [ { - "key": "OBJECT_KEY", - "value": "{{ossInputFileObjectKey}}" + "key": "minutesExpiration", + "value": "5", + "disabled": true } ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-PUT/)" + } }, "response": [] }, { - "name": "Get Temporary Download URL", + "name": "Upload the Input File to OSS", "event": [ { "listen": "test", "script": { - "id": "ab244f6b-d625-4d7a-a5b0-9a30a6ec3211", "exec": [ - "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossDownloadURL\", body[\"signedUrl\"]);" + "console.log(pm.request.body.file.src)" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "auth": { + "type": "noauth" + }, + "method": "PUT", "header": [ { "key": "Authorization", "value": "Bearer {{dasApiToken}}", - "type": "text" - }, - { - "key": "Content-Type", - "value": "application/json", - "type": "text" + "type": "text", + "disabled": true } ], "body": { - "mode": "raw", - "raw": "{}" + "mode": "file", + "file": { + "src": "" + } }, "url": { - "raw": "{{baseUrl}}/oss/v2/buckets/:BUCKET_KEY/objects/:OBJECT_KEY/signed", + "raw": "{{ContentUploadSignedURL}}", "host": [ - "{{baseUrl}}" - ], - "path": [ - "oss", - "v2", - "buckets", - ":BUCKET_KEY", - "objects", - ":OBJECT_KEY", - "signed" - ], - "variable": [ - { - "key": "BUCKET_KEY", - "value": "{{ossBucketKey}}" - }, - { - "key": "OBJECT_KEY", - "value": "{{ossInputFileObjectKey}}" - } + "{{ContentUploadSignedURL}}" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] }, { - "name": "Get Temporary Upload URL", + "name": "Complete the Upload", "event": [ { "listen": "test", "script": { - "id": "17ea8543-3543-42f0-b772-86bd8d7ae2fc", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"ossUploadURL\", body[\"signedUrl\"]);" + "pm.collectionVariables.set(\"ossInputFileObjectId\", body.objectId);" ], "type": "text/javascript" } } ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { @@ -973,45 +969,51 @@ ], "body": { "mode": "raw", - "raw": "{}" + "raw": "{\n \"uploadKey\":\"{{UploadKey}}\"\n}" }, "url": { - "raw": "{{baseUrl}}/oss/v2/buckets/:BUCKET_KEY/objects/:OBJECT_KEY/signed?access=readwrite", + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossInputFileObjectKey}}/signeds3upload", + "protocol": "https", "host": [ - "{{baseUrl}}" + "developer", + "api", + "autodesk", + "com" ], "path": [ "oss", "v2", "buckets", - ":BUCKET_KEY", + "{{ossBucketKey}}", "objects", - ":OBJECT_KEY", - "signed" - ], - "query": [ - { - "key": "access", - "value": "readwrite" - } - ], - "variable": [ - { - "key": "BUCKET_KEY", - "value": "{{ossBucketKey}}" - }, - { - "key": "OBJECT_KEY", - "value": "{{ossOutputFileObjectKey}}" - } + "{{ossInputFileObjectKey}}", + "signeds3upload" ] - }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + } }, "response": [] } ], - "protocolProfileBehavior": {} + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] }, { "name": "Task 7 - Submit a WorkItem", @@ -1022,10 +1024,9 @@ { "listen": "test", "script": { - "id": "332656ee-4d40-49b2-9b71-a8a2762d5a56", "exec": [ "var body = JSON.parse(responseBody);", - "pm.environment.set(\"deleteWallsWorkitemId\", body[\"id\"]);", + "pm.collectionVariables.set(\"deleteWallsWorkitemId\", body[\"id\"]);", "" ], "type": "text/javascript" @@ -1046,7 +1047,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"activityId\": \"{{dasNickName}}.DeleteWallsActivity+test\",\r\n \"arguments\": {\r\n \"rvtFile\": {\r\n \"url\": \"{{ossDownloadURL}}\"\r\n },\r\n \"result\": {\r\n \"verb\": \"put\",\r\n \"url\": \"{{ossUploadURL}}\"\r\n }\r\n }\r\n}" + "raw": "{\r\n \"activityId\": \"{{dasNickName}}.DeleteWallsActivity+test\",\r\n \"arguments\": {\r\n \"rvtFile\": {\r\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossInputFileObjectKey}}\",\r\n \"verb\": \"get\",\r\n \"headers\": {\r\n \"Authorization\": \"Bearer {{dasApiToken}}\"\r\n }\r\n },\r\n \"result\": {\r\n \"url\": \"urn:adsk.objects:os.object:{{ossBucketKey}}/{{ossOutputFileObjectKey}}\",\r\n \"verb\": \"put\",\r\n \"headers\": {\r\n \"Authorization\": \"Bearer {{dasApiToken}}\"\r\n }\r\n }\r\n }\r\n}" }, "url": { "raw": "{{dasApiRoot}}/workitems", @@ -1094,7 +1095,6 @@ { "listen": "prerequest", "script": { - "id": "2f5c25ed-2842-466b-853f-ea0e711c788b", "type": "text/javascript", "exec": [ "" @@ -1104,55 +1104,427 @@ { "listen": "test", "script": { - "id": "c23cd0be-6895-4644-aebc-02242fde0363", "type": "text/javascript", "exec": [ "" ] } } - ], - "protocolProfileBehavior": {} + ] }, { - "name": "Delete App", - "request": { - "auth": { - "type": "noauth" + "name": "Task 8 - Download the Results", + "item": [ + { + "name": "Get S3 Download URL for Resulting RVT file", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var body = JSON.parse(responseBody);", + "pm.collectionVariables.set(\"ossOutputIptFileDownloadUrl\", body[\"url\"]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects/{{ossOutputFileObjectKey}}/signeds3download", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "objects", + "{{ossOutputFileObjectKey}}", + "signeds3download" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-signed-POST/)" + }, + "response": [] }, - "method": "DELETE", - "header": [ - { - "key": "Authorization", - "value": "Bearer {{dasApiToken}}", - "type": "text" + { + "name": "Download Resulting RVT File", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{ossOutputIptFileDownloadUrl}}", + "host": [ + "{{ossOutputIptFileDownloadUrl}}" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-GET/)" }, - { - "key": "Content-Type", - "value": "application/json", - "type": "text" + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] } - ], - "url": { - "raw": "{{dasApiRoot}}/forgeapps/me", - "host": [ - "{{dasApiRoot}}" + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Extras", + "item": [ + { + "name": "My App Nickname", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/forgeapps/me", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "forgeapps", + "me" + ] + } + }, + "response": [] + }, + { + "name": "Delete App Data in Design Automation", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/forgeapps/me", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "forgeapps", + "me" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/forgeapps-id-DELETE/)" + }, + "response": [] + }, + { + "name": "Delete OSS Bucket", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "forgeapps", - "me" - ] + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-DELETE/)" + }, + "response": [] + }, + { + "name": "List engines", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/engines", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "engines" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/engines-GET/)" + }, + "response": [] + }, + { + "name": "List Activities", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/da/us-east/v3/activities", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "da", + "us-east", + "v3", + "activities" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/activities-GET/)" + }, + "response": [] + }, + { + "name": "List objects in a Bucket", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/objects", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "objects" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-GET/)" + }, + "response": [] + }, + { + "name": "List Buckets", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-GET/)" + }, + "response": [] }, - "description": "[See documentation](https://aps.autodesk.com/en/docs/design-automation/v3/reference/http/forgeapps-id-DELETE/)" - }, - "response": [] + { + "name": "Get Bucket Details", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{dasApiToken}}", + "type": "text" + } + ], + "url": { + "raw": "https://developer.api.autodesk.com/oss/v2/buckets/{{ossBucketKey}}/details", + "protocol": "https", + "host": [ + "developer", + "api", + "autodesk", + "com" + ], + "path": [ + "oss", + "v2", + "buckets", + "{{ossBucketKey}}", + "details" + ] + }, + "description": "[See documentation](https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-details-GET/)" + }, + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] } ], "event": [ { "listen": "prerequest", "script": { - "id": "ece0eb97-aa96-4149-a9e7-04cd98825925", "type": "text/javascript", "exec": [ "" @@ -1162,7 +1534,6 @@ { "listen": "test", "script": { - "id": "0ae0a341-c29f-4620-8c50-ba17248ad92e", "type": "text/javascript", "exec": [ "" @@ -1170,5 +1541,70 @@ } } ], - "protocolProfileBehavior": {} -} + "variable": [ + { + "key": "client_auth_keys", + "value": "" + }, + { + "key": "dasApiToken", + "value": "" + }, + { + "key": "deleteWallsAppUrl", + "value": "" + }, + { + "key": "deleteWallsAppVersion", + "value": "" + }, + { + "key": "deleteWallsAppFormDataKey", + "value": "" + }, + { + "key": "deleteWallsAppFormDataPolicy", + "value": "" + }, + { + "key": "deleteWallsAppFormDataSignature", + "value": "" + }, + { + "key": "deleteWallsAppFormDataCredential", + "value": "" + }, + { + "key": "deleteWallsAppFormDataDate", + "value": "" + }, + { + "key": "deleteWallsAppFormDataToken", + "value": "" + }, + { + "key": "deleteWallsAppFormRedirect", + "value": "" + }, + { + "key": "deleteWallsActivityVersion", + "value": "" + }, + { + "key": "UploadKey", + "value": "" + }, + { + "key": "ContentUploadSignedURL", + "value": "" + }, + { + "key": "ossInputFileObjectId", + "value": "" + }, + { + "key": "ossOutputIptFileDownloadUrl", + "value": "" + } + ] +} \ No newline at end of file diff --git a/DA4Revit/collections/DA4Revit-Environment.postman_environment.json b/DA4Revit/collections/DA4Revit-Environment.postman_environment.json index 3e7f8817..4d6d1227 100644 --- a/DA4Revit/collections/DA4Revit-Environment.postman_environment.json +++ b/DA4Revit/collections/DA4Revit-Environment.postman_environment.json @@ -1,5 +1,5 @@ { - "id": "9ec11570-508e-432e-949b-21c270eb004c", + "id": "aa4d85e6-1628-4a98-9b8f-7f981823f7ee", "name": "DA4Revit", "values": [ { @@ -41,49 +41,9 @@ "key": "ossOutputFileObjectKey", "value": "", "enabled": true - }, - { - "key": "dasApiToken", - "value": "", - "enabled": true - }, - { - "key": "deleteWallsAppFormRedirect", - "value": "", - "enabled": true - }, - { - "key": "deleteWallsAppUrl", - "value": "", - "enabled": true - }, - { - "key": "deleteWallsAppVersion", - "value": "", - "enabled": true - }, - { - "key": "deleteWallsActivityVersion", - "value": "", - "enabled": true - }, - { - "key": "deleteWallsWorkitemId", - "value": "", - "enabled": true - }, - { - "key": "ossDownloadURL", - "value": "", - "enabled": true - }, - { - "key": "ossUploadURL", - "value": "", - "enabled": true } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2019-09-03T09:06:46.253Z", - "_postman_exported_using": "Postman/7.6.0" + "_postman_exported_at": "2023-10-04T03:35:09.382Z", + "_postman_exported_using": "Postman/10.18.2" } \ No newline at end of file diff --git a/DA4Revit/collections/revit_collections.zip b/DA4Revit/collections/revit_collections.zip new file mode 100644 index 00000000..4416bf19 Binary files /dev/null and b/DA4Revit/collections/revit_collections.zip differ diff --git a/DA4Revit/images/aps_portal_menu_2_postman_menu.png b/DA4Revit/images/aps_portal_menu_2_postman_menu.png index e88c3aa4..caec04a0 100644 Binary files a/DA4Revit/images/aps_portal_menu_2_postman_menu.png and b/DA4Revit/images/aps_portal_menu_2_postman_menu.png differ diff --git a/DA4Revit/images/aps_portal_steps_2_postman_menu.png b/DA4Revit/images/aps_portal_steps_2_postman_menu.png index 4aa5d24e..215e9545 100644 Binary files a/DA4Revit/images/aps_portal_steps_2_postman_menu.png and b/DA4Revit/images/aps_portal_steps_2_postman_menu.png differ diff --git a/DA4Revit/images/postman_environment_dropdown.png b/DA4Revit/images/postman_environment_dropdown.png index 09dc79e5..4f567b9b 100644 Binary files a/DA4Revit/images/postman_environment_dropdown.png and b/DA4Revit/images/postman_environment_dropdown.png differ diff --git a/DA4Revit/images/task2-authenticate_successfull.png b/DA4Revit/images/task2-authenticate_successfull.png index 427606e7..4030c811 100644 Binary files a/DA4Revit/images/task2-authenticate_successfull.png and b/DA4Revit/images/task2-authenticate_successfull.png differ diff --git a/DA4Revit/images/task2-environment_edit_variable.png b/DA4Revit/images/task2-environment_edit_variable.png new file mode 100644 index 00000000..53dd67d8 Binary files /dev/null and b/DA4Revit/images/task2-environment_edit_variable.png differ diff --git a/DA4Revit/images/task2-environment_quick_look_icon.png b/DA4Revit/images/task2-environment_quick_look_icon.png index fcddbfcc..72580182 100644 Binary files a/DA4Revit/images/task2-environment_quick_look_icon.png and b/DA4Revit/images/task2-environment_quick_look_icon.png differ diff --git a/DA4Revit/images/task2-preview_environment_variables.png b/DA4Revit/images/task2-preview_environment_variables.png index 73d3a04f..930bebff 100644 Binary files a/DA4Revit/images/task2-preview_environment_variables.png and b/DA4Revit/images/task2-preview_environment_variables.png differ diff --git a/DA4Revit/images/task3-delete_forge_app.png b/DA4Revit/images/task3-delete_forge_app.png index 26c3aca9..ae41558b 100644 Binary files a/DA4Revit/images/task3-delete_forge_app.png and b/DA4Revit/images/task3-delete_forge_app.png differ diff --git a/DA4Revit/images/task3-environment_variables_grid.png b/DA4Revit/images/task3-environment_variables_grid.png index 4e78fcd1..dbe3db9d 100644 Binary files a/DA4Revit/images/task3-environment_variables_grid.png and b/DA4Revit/images/task3-environment_variables_grid.png differ diff --git a/DA4Revit/images/task3-successfull.png b/DA4Revit/images/task3-successfull.png index dc0201ed..2dbd1790 100644 Binary files a/DA4Revit/images/task3-successfull.png and b/DA4Revit/images/task3-successfull.png differ diff --git a/DA4Revit/images/task4-appbundle_alias.png b/DA4Revit/images/task4-appbundle_alias.png index 089c8eb2..bf91802f 100644 Binary files a/DA4Revit/images/task4-appbundle_alias.png and b/DA4Revit/images/task4-appbundle_alias.png differ diff --git a/DA4Revit/images/task4-appbundle_alias_set.png b/DA4Revit/images/task4-appbundle_alias_set.png index ef546e29..f05ea176 100644 Binary files a/DA4Revit/images/task4-appbundle_alias_set.png and b/DA4Revit/images/task4-appbundle_alias_set.png differ diff --git a/DA4Revit/images/task4-appbundle_body.png b/DA4Revit/images/task4-appbundle_body.png index 1663a2e0..1c8cc846 100644 Binary files a/DA4Revit/images/task4-appbundle_body.png and b/DA4Revit/images/task4-appbundle_body.png differ diff --git a/DA4Revit/images/task4-appbundle_file_dropdown.png b/DA4Revit/images/task4-appbundle_file_dropdown.png index 754dadb2..5becdf44 100644 Binary files a/DA4Revit/images/task4-appbundle_file_dropdown.png and b/DA4Revit/images/task4-appbundle_file_dropdown.png differ diff --git a/DA4Revit/images/task4-appbundle_form_data.png b/DA4Revit/images/task4-appbundle_form_data.png deleted file mode 100644 index 598ee186..00000000 Binary files a/DA4Revit/images/task4-appbundle_form_data.png and /dev/null differ diff --git a/DA4Revit/images/task4-appbundle_new_version_successfull.png b/DA4Revit/images/task4-appbundle_new_version_successfull.png index 8f6a2037..9d170909 100644 Binary files a/DA4Revit/images/task4-appbundle_new_version_successfull.png and b/DA4Revit/images/task4-appbundle_new_version_successfull.png differ diff --git a/DA4Revit/images/task4-appbundle_registered.png b/DA4Revit/images/task4-appbundle_registered.png index 687b29f4..0b6df4bf 100644 Binary files a/DA4Revit/images/task4-appbundle_registered.png and b/DA4Revit/images/task4-appbundle_registered.png differ diff --git a/DA4Revit/images/task4-appbundle_select_file.png b/DA4Revit/images/task4-appbundle_select_file.png deleted file mode 100644 index 74463848..00000000 Binary files a/DA4Revit/images/task4-appbundle_select_file.png and /dev/null differ diff --git a/DA4Revit/images/task4-appbundle_uploaded.png b/DA4Revit/images/task4-appbundle_uploaded.png index df11e660..dd9358f7 100644 Binary files a/DA4Revit/images/task4-appbundle_uploaded.png and b/DA4Revit/images/task4-appbundle_uploaded.png differ diff --git a/DA4Revit/images/task5-activity_alias_create_success.png b/DA4Revit/images/task5-activity_alias_create_success.png index 7dbf0645..3a43a0df 100644 Binary files a/DA4Revit/images/task5-activity_alias_create_success.png and b/DA4Revit/images/task5-activity_alias_create_success.png differ diff --git a/DA4Revit/images/task5-activity_create_success.png b/DA4Revit/images/task5-activity_create_success.png index 7e9f1910..e3cba4e1 100644 Binary files a/DA4Revit/images/task5-activity_create_success.png and b/DA4Revit/images/task5-activity_create_success.png differ diff --git a/DA4Revit/images/task5-create_activity.png b/DA4Revit/images/task5-create_activity.png index 74758218..e1920334 100644 Binary files a/DA4Revit/images/task5-create_activity.png and b/DA4Revit/images/task5-create_activity.png differ diff --git a/DA4Revit/images/task5-sucessful_update_of_activity.png b/DA4Revit/images/task5-sucessful_update_of_activity.png index 9e92f018..e3cba4e1 100644 Binary files a/DA4Revit/images/task5-sucessful_update_of_activity.png and b/DA4Revit/images/task5-sucessful_update_of_activity.png differ diff --git a/DA4Revit/images/task5-sucessful_update_of_alias.png b/DA4Revit/images/task5-sucessful_update_of_alias.png index e8dbb4f2..2a336ec1 100644 Binary files a/DA4Revit/images/task5-sucessful_update_of_alias.png and b/DA4Revit/images/task5-sucessful_update_of_alias.png differ diff --git a/DA4Revit/images/task6-select_files_button.png b/DA4Revit/images/task6-select_files_button.png index d42d037a..4d5e6c77 100644 Binary files a/DA4Revit/images/task6-select_files_button.png and b/DA4Revit/images/task6-select_files_button.png differ diff --git a/DA4Revit/images/task6-signed_downloadurl.png b/DA4Revit/images/task6-signed_downloadurl.png index 865628c9..8b0f7313 100644 Binary files a/DA4Revit/images/task6-signed_downloadurl.png and b/DA4Revit/images/task6-signed_downloadurl.png differ diff --git a/DA4Revit/images/task6-successful_upload.png b/DA4Revit/images/task6-successful_upload.png index c9cdb27c..461f09e2 100644 Binary files a/DA4Revit/images/task6-successful_upload.png and b/DA4Revit/images/task6-successful_upload.png differ diff --git a/DA4Revit/images/task6-sucessfull_bucket_creation.png b/DA4Revit/images/task6-sucessfull_bucket_creation.png index 89ddceb5..980c9e72 100644 Binary files a/DA4Revit/images/task6-sucessfull_bucket_creation.png and b/DA4Revit/images/task6-sucessfull_bucket_creation.png differ diff --git a/DA4Revit/images/task6-upload.png b/DA4Revit/images/task6-upload.png new file mode 100644 index 00000000..1aa73fe2 Binary files /dev/null and b/DA4Revit/images/task6-upload.png differ diff --git a/DA4Revit/images/task7-check_status.png b/DA4Revit/images/task7-check_status.png index cef32f08..1d9e2cc9 100644 Binary files a/DA4Revit/images/task7-check_status.png and b/DA4Revit/images/task7-check_status.png differ diff --git a/DA4Revit/images/task7-download_step_1.png b/DA4Revit/images/task7-download_step_1.png new file mode 100644 index 00000000..6612de7e Binary files /dev/null and b/DA4Revit/images/task7-download_step_1.png differ diff --git a/DA4Revit/images/task7-download_step_2.png b/DA4Revit/images/task7-download_step_2.png new file mode 100644 index 00000000..31f64964 Binary files /dev/null and b/DA4Revit/images/task7-download_step_2.png differ diff --git a/DA4Revit/images/task7-download_step_2b.png b/DA4Revit/images/task7-download_step_2b.png new file mode 100644 index 00000000..4e1d4db8 Binary files /dev/null and b/DA4Revit/images/task7-download_step_2b.png differ diff --git a/DA4Revit/images/task7-result_url.png b/DA4Revit/images/task7-result_url.png index 4adaf1e0..0a7dddab 100644 Binary files a/DA4Revit/images/task7-result_url.png and b/DA4Revit/images/task7-result_url.png differ diff --git a/DA4Revit/instructions/before_you_begin.md b/DA4Revit/instructions/before_you_begin.md index fb7f803a..e890ecd3 100644 --- a/DA4Revit/instructions/before_you_begin.md +++ b/DA4Revit/instructions/before_you_begin.md @@ -1,30 +1,19 @@ # Before you begin... -## 1. Import Postman Environment for the tutorial +## 1. Import Postman Collections for the tutorial Postman Environments are named configurations that implement variables to store values you typically use across many HTTP requests. For example, APS's Base URL is stored in the environment variable `baseUrl`. To import the environment you need for this tutorial: -1. Download the file *DA4Revit-Environment.postman_environment.json* from the [*collections* folder of this repository](../collections). +1. Download the following zip file from the [*collections* folder](../collections) and expand it on your local machine. -2. Import *DA4Revit-Environment.postman_environment.json* + - _revit_collections.zip_ + +2. In the Postman header bar, click **Import**. A dialog displays. - 1. In the Postman header bar, click **Import**. A dialog displays. +3. Drag the files you expanded in step 1 to the area marked **Drop files here**. Alternatively, you can click **Choose Files** and pick the files you expanded in step 1. - 2. Drag the file you downloaded in step 1 to the area marked **Drop files here**. - -3. Click the **Environment drop-down** on the upper-right, and select **DA4Revit**. The DA4Revit environment loads. +4. Click the **Environment drop-down** on the upper-right, and select **DA4Revit**. The DA4Revit environment loads. ![Postman Environment drop-down](../images/postman_environment_dropdown.png "Postman Environment drop-down") -## 2. Import the Postman Collection for the tutorial. - -Postman Collections are groups of prepopulated HTTP requests. To import the requests you need for this tutorial: - -1. Download the file *DA4Revit-Collection.postman_collection.json* from the [*collections* folder of this repository](../collections). - -2. Import *DA4Revit-Collection.postman_collection.json* - - 1. In the Postman header bar, click **Import**. A dialog displays. - - 2. Drag the file you downloaded in step 1 to the area marked **Drop files here**. [:rewind:](../readme.md "readme.md") [:arrow_forward:](task-2.md "Next task") diff --git a/DA4Revit/instructions/task-2.md b/DA4Revit/instructions/task-2.md index bf4f9ec6..bde824b2 100644 --- a/DA4Revit/instructions/task-2.md +++ b/DA4Revit/instructions/task-2.md @@ -2,45 +2,43 @@ ## Create an App -1. Follow the instructions on the tutorial [Create an App](https://aps.autodesk.com/en/docs/oauth/v1/tutorials/create-app/). - When specifying details of the app, select "Design Automation API" and "Data Management API". +1. Follow the instructions on the tutorial [Create an App](https://aps-stg.autodesk.com/en/docs/oauth/v2/tutorials/create-app/). + When specifying **API Access**, ensure that "Design Automation API" and "Data Management API" are selected. -2. Jot down the Client ID and Client Secret of the app you created. +2. Note down the Client ID and Client Secret of the app you created. ## Save Client ID and Client Secret to Postman Environment Variables -In the DA4Revit environment that you selected earlier, there are two Postman Environment Variables named `client_id` and `client_secret`. By setting these variables, you won't need to specify their values when you send HTTP requests to APS. +In the DA4Revit environment that you selected earlier, there are two Postman Environment Variables named `client_id` and `client_secret`. By setting these variables, you won't need to specify their values when you send HTTP requests to APS. To set the environment variables: -1. Click the **Environment quick look** icon on the upper right corner of Postman. +1. Click the **Environment quick look** icon on the upper right corner of Postman. ![Environment quick look icon](../images/task2-environment_quick_look_icon.png "Environment quick look icon") 2. Click in the **CURRENT VALUE** column on the **client_id** row. The Edit icon displays. - ![Edit Environment Variable](../images/task2-envoronment_edit_variable.png "Edit Environment Variable") + ![Edit Environment Variable](../images/task2-environment_edit_variable.png "Edit Environment Variable") 3. Click the Edit icon, and enter the Client ID you jotted down earlier. 4. Similarly, enter the Client Secret you jotted down earlier in the **CURRENT VALUE** column on the **client_secret** row. -5. Click the **Environment quick look** icon again. +5. Click the **Environment quick look** icon again. ## Get an Access Token -To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a prepopulated authenticate request that you can send. To send the request to APS: +To get an Access Token, you must send an `authenticate` request to APS. The Postman collection has a pre-populated authenticate request that you can send. To send the request to APS: 1. On the Postman sidebar, click **Task 2 - Obtain an Access Token > POST Get an Access Token**. The request loads. -2. Click the **Body** tab. - -3. Move the cursor over the **Value** column of the **client_id** and **client_secret**, and verify that the values you specified as environment variables are displayed. - ![Preview Client Id and Client Secret](../images/task2-preview_environment_variables.png "Preview Client Id and Client Secret") +2. Click the **Pre-request Script** tab. Notice how a script (written in JavaScript) takes the Client ID and Client Secret, concatenates them, converts to a Base64 encoded string, and saves it back to a Postman Collection Variable named `client_auth_keys`. + ![Preview Client Id and Client Secret](../images/task2-preview_environment_variables.png "Preview Client Id and Client Secret") 4. Click **Send**. The request is sent to APS. If your request authenticates successfully, you should see a response similar to the following: -![Successful authentication](../images/task2-authenticate_successfull.png "Successful authentication") +![Successful authentication](../images/task2-authenticate_successfull.png "Successful authentication") -Postman saves the Access Token in the Postman Environment Variable `dasApiToken`. Postman picks up the Access Token from this variable for all subsequent requests, eliminating the need for you to repeatedly specify the value of the token. The token remains valid for one hour. If the token expires, you must obtain a fresh token by sending an `authenticate` request to APS once again. +Postman saves the Access Token in the Postman Collection Variable `dasApiToken`. Postman picks up the Access Token from this variable for all subsequent requests. This variable eliminates the need for you to repeatedly specify the value of the token for subsequent requests. [:rewind:](../readme.md "readme.md") [:arrow_backward:](before_you_begin.md "Previous task" ) [:arrow_forward:](task-3.md "Next task") diff --git a/DA4Revit/instructions/task-3.md b/DA4Revit/instructions/task-3.md index 3c423fe6..e9e40bd2 100644 --- a/DA4Revit/instructions/task-3.md +++ b/DA4Revit/instructions/task-3.md @@ -6,7 +6,7 @@ A Nickname lets you map a Client ID to an easy-to-use name that you can use in p **Notes:** -- If your app doesn't have any data, you can map the app to another nickname, and the new nickname will overwrite the old one. Once you add data to an App, you are not allowed to set a nickname for it. This is true even if you have not yet assigned a nickname for the app. The only way you can assign a nickname to an app with data is by first calling `[DELETE] /forgeapps/me`. This deletes all data associated with that app, including the nickname. The last request in this Postman Collection (**DEL Delete app**) calls this endpoint and clears the app of all data. +- If your app doesn't have any data, you can map the app to another nickname, and the new nickname will overwrite the old one. Once you add data to an App, you are not allowed to set a nickname for it. This is true even if you have not yet assigned a nickname for the app. The only way you can assign a nickname to an app with data is by first calling `[DELETE] /forgeapps/me`. This deletes all data associated with that app, including the nickname. The request **Extras > Delete App Data in Design Automation** in this Postman Collection calls (`[DELETE] /forgeapps/me`) and clears the app of all data. ![Delete App Data](../images/task3-delete_forge_app.png "Delete app") diff --git a/DA4Revit/instructions/task-4.md b/DA4Revit/instructions/task-4.md index e55c6456..79288e76 100644 --- a/DA4Revit/instructions/task-4.md +++ b/DA4Revit/instructions/task-4.md @@ -1,15 +1,14 @@ # Task 4 - Upload an AppBundle to Design Automation -An AppBundle is a package of binaries and supporting files that make up a Revit add-in. See the corresponding [task in the Step-by-Step tutorial on the APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/revit/step4-publish-appbundle/) for an explanantion of AppBundles and learn how to create an AppBundle. For the purpose of this Postman tutorial, download *DeleteWallsApp.zip*, which is stored in the [*tutorial_data* folder of this repository](../tutorial_data). The file *DeleteWalls.dll* that is contained within this AppBundle is designed to run on Revit 2018. +An AppBundle is a package of binaries and supporting files that make up a Revit add-in. See the corresponding [task in the Step-by-Step tutorial on the APS developer portal](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/revit/step4-publish-appbundle/) for an explanation of AppBundles and learn how to create an AppBundle. For the purpose of this Postman tutorial, download *DeleteWallsApp.zip*, which is stored in the [*tutorial_data* folder of this repository](../tutorial_data). The file *DeleteWalls.dll* that is contained within this AppBundle runs on Revit 2024. ## Register the AppBundle -When registering the AppBundle, you inform Design Automation that you want to name it DeleteWallsApp, and that it must run on Revit 2020. -**Note:** Screen captures show that the AppBundle runs on Revit 2018. However the Postman Collection has been updated to run on Revit 2020. +When registering the AppBundle, you inform Design Automation that you want to name it DeleteWallsApp, and that it must run on Revit 2024. 1. On the Postman sidebar, click **Task 4 - Upload AppBundle > POST Register the AppBundle**. The request loads. -2. Click the **Body** tab, and verify that the `id`, and `engine` are set to `DeleteWallsApp`, and `Autodesk.Revit+2020`. +2. Click the **Body** tab, and verify that the `id`, and `engine` are set to `DeleteWallsApp`, and `Autodesk.Revit+2024`. ![AppBundle Body](../images/task4-appbundle_body.png "AppBundle Body") @@ -17,9 +16,7 @@ When registering the AppBundle, you inform Design Automation that you want to na ![AppBundel Registered](../images/task4-appbundle_registered.png "AppBundel Registered") - The `endpointURL` and `formData` information required to upload the AppBundle is saved to Postman Environment variables. - - ![formData](../images/task4-appbundle_form_data.png "formData") + The `endpointURL` and `formData` information required to upload the AppBundle is saved to Postman Collection variables. ## Upload the AppBundle @@ -27,13 +24,11 @@ When registering the AppBundle, you inform Design Automation that you want to na 2. Click the **Body** tab, and scroll down such that the **file** row is visible. -3. Move the cursor to the **VALUE** column on the **file** row, and close the box shown in the following image. - - ![File drop-down](../images/task4-appbundle_file_dropdown.png "File drop-down") +3. Move the cursor to the **VALUE** column on the **file** row. 4. Click **Select Files**, and pick *DeleteWallsApp.zip*, which you downloaded earlier. - ![Pick DeleteWalls.zip](../images/task4-appbundle_select_file.png "Pick DeleteWalls.zip") + ![File drop-down](../images/task4-appbundle_file_dropdown.png "File drop-down") 5. Click **Send**. You should see a screen similar to the following. Note that the response has only a header and no body. @@ -45,7 +40,7 @@ When you registered the AppBundle earlier, it was registered as version 1 of the 1. On the Postman sidebar, click **Task 4 - Upload AppBundle > POST Create an Alias for the AppBundle**. The request loads. -2. Click the **Body** tab. and note how `id` is set to`test`. +2. Click the **Body** tab. and note how `id` is set to `test`. ![Alias](../images/task4-appbundle_alias.png "Alias") @@ -53,9 +48,9 @@ When you registered the AppBundle earlier, it was registered as version 1 of the ![Alias response](../images/task4-appbundle_alias_set.png "Alias response") -## Update an Existing AppBundle +## Update an existing AppBundle -To update an existing AppBundle, you must register a new version of the AppBundle and then upload the updated AppBundle for that version. If you try to overwrite an existing AppBundle, Design Automation for Revit returns a `409 Conflict` error. +To update an existing AppBundle, you must register a new version of the AppBundle and then upload the updated AppBundle for that version. If you try to overwrite an existing AppBundle, Design Automation returns a `409 Conflict` error. To register a new version: @@ -63,7 +58,7 @@ To register a new version: 2. Click the **Body** tab. Note that you are now specifying only the engine and description. -3. Click **Send**. You should see a response similar to the following image. As with registering an AppBundle, the `endpointURL` and `formData` information required to upload the AppBundle is saved to Postman Environment variables. +3. Click **Send**. You should see a response similar to the following image. As with registering an AppBundle, the `endpointURL` and `formData` information required to upload the AppBundle is saved to Postman Collection variables. ![New version sucessful](../images/task4-appbundle_new_version_successfull.png "New version successful") @@ -73,17 +68,15 @@ To register a new version: 2. Click the **Body** tab, and scroll down such that the **file** row is visible. -3. Move the cursor to the **VALUE** column on the **file** row, and close the box there. The *Select Files** button displays. - -4. Click **Select Files**, and pick *DeleteWallsApp.zip*, which you downloaded earlier. +3. Click **Select Files**, and pick *DeleteWallsApp.zip*, which you downloaded earlier. -5. Click **Send**. +4. Click **Send**. ## Assign the Alias you specified earlier to the updated AppBundle 1. On the Postman sidebar, click **Task 4 - Upload AppBundle > PATCH Assign an Existing Alias to the Updated AppBundle**. The request loads. -2. Click the **Body** tab. Observe how the new version is specified using a Postman Environment Variable. +2. Click the **Body** tab. Observe how the new version is specified. 3. Click **Send**. diff --git a/DA4Revit/instructions/task-5.md b/DA4Revit/instructions/task-5.md index bf1ba4cd..d6e2d72a 100644 --- a/DA4Revit/instructions/task-5.md +++ b/DA4Revit/instructions/task-5.md @@ -13,9 +13,9 @@ An Activity is an action that can be executed in Design Automation. You create a **Notes** - `id` is the name given to the new Activity. - `commandLine` is the command run by this Activity - - `$(engine.path)\\\\revitcoreconsole.exe` - The full path to the folder from which the engine for Revit executes. The engine is defined in the request body as `"engine": "Autodesk.Revit+2018"`. **Do not edit or alter this `commandLine` in the request body of Activity posts.** + - `$(engine.path)\\\\revitcoreconsole.exe` - The full path to the folder from which the engine for Revit executes. The engine is defined in the request body as `"engine": "Autodesk.Revit+2024"`. **Do not edit or alter this `commandLine` in the request body of Activity posts.** - `$(args[rvtFile].path)` - The full path to the folder that contains the input Revit model. `rvtFile` is the parameter that represents the Revit model to which the Activity `DeleteWallsActivity` applies the AppBundle. The AppBundle is defined in the request body as `"appbundles": [ "{{dasNickName}}.DeleteWallsApp+test" ]`. - - `engine` is the Design Automation engine that the Activity (Revit 2018 in this case) runs on. + - `engine` is the Design Automation engine that the Activity (Revit 2024 in this case) runs on. 3. Click **Send**. If the request is successful, you should see a screen similar to the following image. diff --git a/DA4Revit/instructions/task-6.md b/DA4Revit/instructions/task-6.md index 80ba1088..b8251686 100644 --- a/DA4Revit/instructions/task-6.md +++ b/DA4Revit/instructions/task-6.md @@ -26,7 +26,7 @@ There are three Postman Environment Variables you must specify for this task. Th ![Successful Bucket Creation](../images/task6-sucessfull_bucket_creation.png "Successful Bucket Creation") -## Upload input file to OSS +## Obtain Signed URL to Upload the Input File 1. Download the input file, *DeleteWalls.rvt* from the [*tutorial_data* folder of this repository](../tutorial_data). @@ -36,42 +36,51 @@ There are three Postman Environment Variables you must specify for this task. Th 4. Click the **Environment quick look** icon to hide the variables. -5. On the Postman sidebar, click **Task 6 - Prepare Cloud Storage > PUT Upload Input File**. The request loads. +5. On the Postman sidebar, click **Task 6 - Prepare Cloud Storage > GET Obtain Signed URL to Upload the Input File**. The request loads. -6. Click the **Body** tab. +6. Click **Send**. The signed URL is saved to a Collection Variable named `ContentUploadSignedURL`. The Upload Key is also saved to a variable named `UploadKey`. The Upload Key uniquely identifies the upload session. You use it later to complete the upload session. -7. Click **Select File** and pick *DeleteWalls.rvt* , the file you downloaded in step 1. + If your request is successful, you should see a screen similar to the one below: - ![Select file button](../images/task6-select_files_button.png "Select file button") + ![Successful upload of input file](../images/task6-successful_upload.png "Successful upload of input file") -8. Click **Send**. If your request is successful, you should see a screen similar to the one below: - ![Successful upload of input file](../images/task6-successful_upload.png "Successful upload of input file") +## Upload input file to OSS -## Get temporary download URL +1. On the Postman sidebar, click **Task 6 - Prepare Cloud Storage > PUT Upload Input File to OSS**. The request loads. -Design Automation needs to download the input file to process it. This request obtains a temporary signed URL that Design Automation can use to download the file, and saves it to a Postman Environment Variable. +2. Click the **Body** tab. -1. On the Postman sidebar, click **Task 6 - Prepare Cloud Storage > POST Get Temporary Download URL**. The request loads. +3. Click **Select File** and pick the file you downloaded earlier (*DeleteWalls.rvt*). -2. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, the signed URL is saved to the `ossDownloadURL` Postman Environment Variable. + ![Select file button](../images/task6-select_files_button.png "Select file button") - ![Signed download URL](../images/task6-signed_downloadurl.png "Signed download URL") +4. Click **Send**. If your request is successful, you should see a screen similar to the one below: -## Get temporary upload URL + ![Successful upload of input file](../images/task6-upload.png "Successful upload of input file") -Design Automation needs a signed URL to upload the output that the DeleteWalls add-in creates. This request obtains a temporary signed URL that Design Automation can use to upload the file, and saves it to a Postman Environment Variable. +## Complete the upload -1. Click the **Environment quick look** icon on the upper right corner of Postman. +To make the uploaded file available for download, you must specifically instruct OSS that the upload process has been completed. -2. In the **CURRENT VALUE** column, in the **ossOutputFileObjectKey** row, specify an Object Key (a name to identify the output file, once it is uploaded to OSS). +1. On the Postman sidebar, click **Task 6 - Prepare Cloud Storage > POST Complete the upload**. The request loads. -3. Click the **Environment quick look** icon to hide the variables. +2. Click the **Body** tab and pay attention to how the Upload Key tells OSS what upload session to close. + +3. Click **Send**. If your request is successful, you should see a screen similar to the one below: + + ![Signed download URL](../images/task6-signed_downloadurl.png "Signed download URL") + +## Define Object Keys for the output file that the add-in produces + +The add-in deletes the walls in the input file and produces an *.rvt* file that contains all other objects. Use the Postman Environment Variable `ossOutputFileObjectKey` to hold the Object Key of this *.rvt* file. + +1. Click the **Environment quick look** icon on the upper right corner of Postman. -4. On the Postman sidebar, click **Task 6 - Prepare Cloud Storage > POST Get Temporary Upload URL**. The request loads. +2. In the **CURRENT VALUE** column, in the **ossOutputFileObjectKey** row, specify an Object Key for the *.rvt* file that the add-in produces. -5. Click **Send**. If the request is successful, you should see a screen similar to the following image. Furthermore, the signed URL is saved to the `ossUploadURL` Postman Environment Variable. + **Tip:** You can use the file name of the *.rvt* file (*result.rvt*) as its Object Key. - ![Signed upload URL](../images/task6-signed_uploadurl.png "Signed upload URL") +3. Click the **Environment quick look** icon. [:rewind:](../readme.md "readme.md") [:arrow_backward:](task-5.md "Previous task") [:arrow_forward:](task-7.md "Next task") diff --git a/DA4Revit/instructions/task-7.md b/DA4Revit/instructions/task-7.md index e5963232..72db0a7d 100644 --- a/DA4Revit/instructions/task-7.md +++ b/DA4Revit/instructions/task-7.md @@ -6,13 +6,13 @@ The relationship between an Activity and a WorkItem can be thought of as a “fu Named parameters of the Activity have corresponding named arguments of the WorkItem. Like in function calls, optional parameters of the Activity can be skipped and left unspecified while posting a WorkItem. -For this exercise, you will apply the DeleteWalls Activity on the Revit file you uploaded to OSS in the previous task. The request picks up the Revit file from the signed url stored in the variable 'ossDownloadURL'. +For this exercise, you will apply the DeleteWalls Activity on the Revit file you uploaded to OSS in the previous task. ## Create a WorkItem 1. On the Postman sidebar, click **Task 7 - Submit a WorkItem > Create a WorkItem**. The request loads. -2. Click the **Body** tab and observe how the Actvity ID, the input file, and the ouput file are specified. +2. Click the **Body** tab and observe how the Actvity ID, the input file, and the output file are specified. 3. Click **Send**. If the request is successful you should see a screen similar to the following image. @@ -24,13 +24,13 @@ For this exercise, you will apply the DeleteWalls Activity on the Revit file you - `arguments` - Contains all the parameters that need to be passed to the Activity specified by `activityId`. They must match the parameters you specified in Task 5, when you created the Activity. - - `rvtFile` - Specifies how to obtain the input rvt file file for the Activity. It contains the signed download URL to the rvt file or a zip file that contains the rvt file. This is followed by the HTTP verb that downloads the file. + - `rvtFile` - Specifies how to obtain the input rvt file file for the Activity. It contains the URN of the rvt file, constructed by concatenating the different components of the URN into a single string. This is followed by the HTTP verb that downloads the file. **Note:** If you uploaded a zip file (instead of a rvt file) in task 6, you must specify an attribute named `pathInZip`, which indicates the path to the Revit file within the zip file. - - `result` - Specifies the signed URL to the location reserved for the output of the activity, followed by the HTTP verb to use. + - `result` - Specifies the URN reserved for the output of the activity, followed by the HTTP verb to use. ## Check Status of a WorkItem @@ -43,4 +43,4 @@ Design Automation WorkItems are queued before they are processed. Processing its ![WorkItem Status check result](../images/task7-check_status.png "WorkItem Status check result") -[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-6.md "Previous task") +[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-6.md "Previous task") [:arrow_forward:](task-8.md "Next task") diff --git a/DA4Revit/instructions/task-8.md b/DA4Revit/instructions/task-8.md new file mode 100644 index 00000000..fba8d84a --- /dev/null +++ b/DA4Revit/instructions/task-8.md @@ -0,0 +1,27 @@ +# Task 7 - Download the results + +Once the WorkItem has completed executing the Activity, Design Automation uploads the resulting file to OSS. You use the Data Management API to download the file to your local machine. + + +## Get temporary download URL of the resulting RVT file + +1. On the Postman sidebar, click **Task 7 - Download the Result > GET Get S3 Download URL for result**. The request loads. + +2. Click **Send**. You should see a screen similar to the following image. + + ![Download Result](../images/task7-download_step_1.png "Download Result") + +## Download the resulting RVT file + +1. On the Postman sidebar, click **Task 7 - Download the Result > Download Resulting RVT File**. The request loads. + +2. Click **Send**. You should see a screen similar to the following image. + + ![Download Result](../images/task7-download_step_2.png "Download Result") + +3. In the response area, click **Save response to file**. The output file downloads. Save the file as a *.rvt* file. + + ![Save Result](../images/task7-download_step_2b.png "Save Result") + + +[:rewind:](../readme.md "readme.md") [:arrow_backward:](task-7.md "Previous task") diff --git a/DA4Revit/readme.md b/DA4Revit/readme.md index d357dc08..5b96ec59 100644 --- a/DA4Revit/readme.md +++ b/DA4Revit/readme.md @@ -1,19 +1,23 @@ # Design Automation for Revit Step-by-Step Tutorial ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Design-Automation](https://img.shields.io/badge/Design%20Automation-v3-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v7-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) [![Revit](https://img.shields.io/badge/Revit-2018-1858a8.svg)](http://developer.autodesk.com/) [![Revit](https://img.shields.io/badge/Revit-2019-1858a8.svg)](http://developer.autodesk.com/) [![Revit](https://img.shields.io/badge/Revit-2020-1858a8.svg)](http://developer.autodesk.com/) +[![Revit](https://img.shields.io/badge/Revit-2021-1858a8.svg)](http://developer.autodesk.com/) +[![Revit](https://img.shields.io/badge/Revit-2022-1858a8.svg)](http://developer.autodesk.com/) +[![Revit](https://img.shields.io/badge/Revit-2023-1858a8.svg)](http://developer.autodesk.com/) +[![Revit](https://img.shields.io/badge/Revit-2024-1858a8.svg)](http://developer.autodesk.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) [![License](https://img.shields.io/:license-MIT-blue.svg)](http://opensource.org/licenses/MIT) -This folder contains a Postman Collection that contains the requests used in the [Design Automation for Revit Step-by-Step tutorial](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/revit/) on the APS developer portal. +This folder contains a Postman Collection that contains the requests used in the [Automating Revit Step-by-Step tutorial](https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/revit/) on the APS developer portal. On the Postman sidebar, requests are stored in folders that have the same name as the corresponding task in the APS developer portal. ![APS developer portal menu to Postman](images/aps_portal_menu_2_postman_menu.png "APS developer portal task to Postman mapping") diff --git a/ModelDerivative_01/readme.md b/ModelDerivative_01/readme.md index 512c820b..41e76760 100644 --- a/ModelDerivative_01/readme.md +++ b/ModelDerivative_01/readme.md @@ -1,11 +1,11 @@ # Translate a Source File Step-by-Step Tutorial ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) diff --git a/ModelDerivative_02/readme.md b/ModelDerivative_02/readme.md index 0d5e58d8..47b9781a 100644 --- a/ModelDerivative_02/readme.md +++ b/ModelDerivative_02/readme.md @@ -1,11 +1,11 @@ # Translate a Source File Packaged as a Zip File ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) diff --git a/ModelDerivative_03/readme.md b/ModelDerivative_03/readme.md index 1c4b34a1..f75e44c2 100644 --- a/ModelDerivative_03/readme.md +++ b/ModelDerivative_03/readme.md @@ -1,11 +1,11 @@ # Translate a Source File that Contains References ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) diff --git a/ModelDerivative_04/readme.md b/ModelDerivative_04/readme.md index bf00098d..ad1ce6f1 100644 --- a/ModelDerivative_04/readme.md +++ b/ModelDerivative_04/readme.md @@ -1,11 +1,11 @@ # Prepare a File for the Viewer ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) diff --git a/ModelDerivative_05/readme.md b/ModelDerivative_05/readme.md index da340b57..d3e1110c 100644 --- a/ModelDerivative_05/readme.md +++ b/ModelDerivative_05/readme.md @@ -1,11 +1,11 @@ # Extract Metadata from a Source File ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) diff --git a/ModelDerivative_06/readme.md b/ModelDerivative_06/readme.md index d17d968d..d9fc15b4 100644 --- a/ModelDerivative_06/readme.md +++ b/ModelDerivative_06/readme.md @@ -1,11 +1,11 @@ # Extract Geometry from a Source File ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg) diff --git a/ModelDerivative_07/readme.md b/ModelDerivative_07/readme.md index 184c9126..4026be11 100644 --- a/ModelDerivative_07/readme.md +++ b/ModelDerivative_07/readme.md @@ -1,11 +1,11 @@ # Translate a Revit File, Generating Room and Space Information ![Platforms](https://img.shields.io/badge/Web-Windows|MacOS-lightgray.svg) -[![oAuth2](https://img.shields.io/badge/Authentication-v1-green.svg)](http://developer.autodesk.com/) +[![oAuth2](https://img.shields.io/badge/Authentication-v2-green.svg)](http://developer.autodesk.com/) [![Data-Management](https://img.shields.io/badge/Data%20Management-v2-green.svg)](http://developer.autodesk.com/) [![Model Deivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/) -[![Postman](https://img.shields.io/badge/Postman-v9-orange.svg)](https://www.getpostman.com/) +[![Postman](https://img.shields.io/badge/Postman-v10-orange.svg)](https://www.getpostman.com/) ![Beginner](https://img.shields.io/badge/Level-Beginner-green.svg)