Skip to content

Instantly share code, notes, and snippets.

@petrbroz
Created September 19, 2019 07:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save petrbroz/5d28d996738bb0da4f7838ca43d53765 to your computer and use it in GitHub Desktop.
Save petrbroz/5d28d996738bb0da4f7838ca43d53765 to your computer and use it in GitHub Desktop.
Postman collection of Forge API requests

Environment variables

  • FORGE_CLIENT_ID - your Forge application client ID
  • FORGE_CLIENT_SECRET - your Forge application client ID
  • FORGE_SCOPES - space-separated list of access scopes (for example, viewables:read bucket:create bucket:read data:read data:create data:write code:all)
  • FORGE_HOST - URL of the Forge servers (typically https://developer.api.autodesk.com)
  • BUCKET - name of OSS bucket to use in various data management service requests

Notes

The 2-legged authentication is handled automatically via a "prerequest script". Whenever you make a request that expects a 2-legged token, the prerequest script will check whether there's an ACCESS_TOKEN env. variable and whether the token is still valid, and if not, it will will update the env. variables automatically.

{
"info": {
"_postman_id": "e9068cfd-ea58-4a1c-9c84-bc048a3c417c",
"name": "Forge",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Authentication",
"item": [
{
"name": "/authentication/v1/authenticate",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "client_id",
"value": "{{FORGE_CLIENT_ID}}",
"type": "text"
},
{
"key": "client_secret",
"value": "{{FORGE_CLIENT_SECRET}}",
"type": "text"
},
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "scope",
"value": "{{FORGE_SCOPES}}",
"type": "text"
}
]
},
"url": {
"raw": "{{FORGE_HOST}}/authentication/v1/authenticate",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"authentication",
"v1",
"authenticate"
]
},
"description": "Obtains a 2-legged authentication access token for reading viewables."
},
"response": []
}
]
},
{
"name": "Data Management",
"item": [
{
"name": "/oss/v2/buckets",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets"
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/oss/v2/buckets/:bucket/objects",
"event": [
{
"listen": "prerequest",
"script": {
"id": "2952b384-0a49-47bc-9988-a139d926d9fb",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets/:bucket/objects?limit=32",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets",
":bucket",
"objects"
],
"query": [
{
"key": "limit",
"value": "32"
}
],
"variable": [
{
"key": "bucket",
"value": "{{BUCKET}}",
"type": "string"
}
]
},
"description": "Lists all objects in given bucket."
},
"response": []
},
{
"name": "/oss/v2/buckets",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"bucketKey\":\"petrbroz-bim360-samples\",\n \"policyKey\":\"persistent\"\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets"
]
},
"description": "Creates a new bucket."
},
"response": []
},
{
"name": "/oss/v2/buckets/:bucket/objects/:object",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "file",
"file": {}
},
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets/:bucket/objects/:object",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets",
":bucket",
"objects",
":object"
],
"variable": [
{
"key": "bucket",
"value": "{{BUCKET}}",
"type": "string"
},
{
"key": "object",
"value": "house.rvt",
"type": "string"
}
]
},
"description": "Uploads a file as a new object in given bucket."
},
"response": []
},
{
"name": "/oss/v2/buckets/:bucket/objects/:object",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "file",
"file": {}
},
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets/:bucket/objects/:object",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets",
":bucket",
"objects",
":object"
],
"variable": [
{
"key": "bucket",
"value": "{{BUCKET}}",
"type": "string"
},
{
"key": "object",
"value": "problematic.rvt",
"type": "string"
}
]
},
"description": "Uploads a file as a new object in given bucket."
},
"response": []
},
{
"name": "/oss/v2/buckets/:bucketKey/objects/:objectKey/signed",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{}"
},
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets/:bucketKey/objects/:objectKey/signed?access=readwrite",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets",
":bucketKey",
"objects",
":objectKey",
"signed"
],
"query": [
{
"key": "access",
"value": "readwrite"
}
],
"variable": [
{
"key": "bucketKey",
"value": "{{BUCKET}}",
"type": "string"
},
{
"key": "objectKey",
"value": "clutch_gear_20t.png",
"type": "string"
}
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{ACCESS_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "f21e4907-3cbe-416a-8a0e-5e30295c8cd8",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "9b063c66-0cac-42d5-9948-c5e832bebe34",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Model Derivatives",
"item": [
{
"name": "/modelderivative/v2/designdata/job",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"input\": {\n\t\t\"urn\": \"dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cGV0cmJyb3otZGF0YXNhbXBsZXMvMDA4LXZiZWx0LmR3Zw\",\n\t\t\"compressedUrn\": true,\n\t\t\"rootFilename\": \"Workspace/_Jet Engine Model.iam\"\n\t},\n\t\"output\": {\n\t\t\"formats\": [\n\t\t\t{\n\t\t\t\t\"type\": \"svf\",\n\t\t\t\t\"views\": [\n\t\t\t\t\t\"2d\",\n\t\t\t\t\t\"3d\"\n\t\t\t\t]\n }\n ]\n\t}\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/modelderivative/v2/designdata/job",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"modelderivative",
"v2",
"designdata",
"job"
]
},
"description": "Submitting an SVF translation job."
},
"response": []
},
{
"name": "/modelderivative/v2/designdata/:urn/manifest",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/modelderivative/v2/designdata/:urn/manifest",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"modelderivative",
"v2",
"designdata",
":urn",
"manifest"
],
"variable": [
{
"key": "urn",
"value": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cGV0cmJyb3otYmltMzYwLXNhbXBsZXMvaG91c2UucnZ0",
"type": "string"
}
]
},
"description": "Retrieves manifest of given object."
},
"response": []
},
{
"name": "/modelderivative/v2/designdata/:urn/thumbnail",
"event": [
{
"listen": "prerequest",
"script": {
"id": "2952b384-0a49-47bc-9988-a139d926d9fb",
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/modelderivative/v2/designdata/:urn/thumbnail",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"modelderivative",
"v2",
"designdata",
":urn",
"thumbnail"
],
"variable": [
{
"id": "a7233ae9-f7ea-492d-8f5a-834b0068a6b6",
"key": "urn",
"value": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cGV0cmJyb3otZGF0YXNhbXBsZXMvYXBwbGUucnZ0",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "/modelderivative/v2/designdata/:urn/metadata",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/modelderivative/v2/designdata/:urn/metadata",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"modelderivative",
"v2",
"designdata",
":urn",
"metadata"
],
"variable": [
{
"key": "urn",
"value": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cGV0cmJyb3otZGF0YXNhbXBsZXMvQ1A1NiUyMFdFU1QlMjBBRkUlMjBTT1JURVIlMjBMMS4xLmR3Zw==",
"type": "string"
}
]
},
"description": "Retrieves metadata of a given object."
},
"response": []
},
{
"name": "/modelderivative/v2/designdata/:urn/metadata/:guid",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/modelderivative/v2/designdata/:urn/metadata/:guid",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"modelderivative",
"v2",
"designdata",
":urn",
"metadata",
":guid"
],
"variable": [
{
"key": "urn",
"value": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6YWRzay1wZXRyYnJvei1idWNrZXQvdHRlc3QucnZ0",
"type": "string"
},
{
"key": "guid",
"value": "c3ed66e5-b5b6-4fd6-88f7-543bc24b6b83",
"type": "string"
}
]
},
"description": "Retrieves metadata of a given object."
},
"response": []
},
{
"name": "/modelderivative/v2/designdata/:urn/metadata/:guid/properties",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/modelderivative/v2/designdata/:urn/metadata/:guid/properties",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"modelderivative",
"v2",
"designdata",
":urn",
"metadata",
":guid",
"properties"
],
"variable": [
{
"key": "urn",
"value": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cGV0cmJyb3otZGF0YXNhbXBsZXMvQ1A1NiUyMFdFU1QlMjBBRkUlMjBTT1JURVIlMjBMMS4xLmR3Zw==",
"type": "string"
},
{
"key": "guid",
"value": "e30bd031-d13a-a976-9153-78100829986a",
"type": "string"
}
]
},
"description": "Retrieves properties of a specific GUID in design data."
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{ACCESS_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "17385aa0-7242-4504-a5c9-728403151ae4",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "880496d9-1a5f-4b5c-b2bf-9ba354b14d39",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Design Automation v3",
"item": [
{
"name": "Engines",
"item": [
{
"name": "List engines",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/engines",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"engines"
]
},
"description": "Get list of all available engines."
},
"response": []
},
{
"name": "Get engine details",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/engines/:id",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"engines",
":id"
],
"variable": [
{
"key": "id",
"value": "Autodesk.Inventor+23",
"type": "string"
}
]
},
"description": "Get list of all available engines."
},
"response": []
},
{
"name": "Get engine status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/health/:engine",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"health",
":engine"
],
"variable": [
{
"key": "engine",
"value": "Inventor",
"type": "string"
}
]
},
"description": "Get list of all available engines."
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "App Bundles",
"item": [
{
"name": "Create app bundle",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"id\": \"MyThumbnailAppBundle\",\n\t\"description\": \"App bundle generating thumbnails from IPT files.\",\n\t\"engine\": \"Autodesk.Inventor+23\"\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles"
]
},
"description": "Creates new app bundle."
},
"response": []
},
{
"name": "List app bundles",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles"
]
}
},
"response": []
},
{
"name": "Get app bundle details",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id"
],
"variable": [
{
"key": "id",
"value": "SampleAppBundle+foo",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "Create app bundle version",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"description\": \"Thumbnail generating app bundle.\",\n\t\"engine\": \"Autodesk.Inventor+23\"\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/versions",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"versions"
],
"variable": [
{
"key": "id",
"value": "ThumbnailAppBundle",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "List app bundle versions",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/versions",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"versions"
],
"variable": [
{
"key": "id",
"value": "MyThumbnailAppBundle",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "Get app bundle version details",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/versions/:version",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"versions",
":version"
],
"variable": [
{
"key": "id",
"value": "SampleAppBundle",
"type": "string"
},
{
"key": "version",
"value": "1",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "Create app bundle alias",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"id\": \"prod\",\n\t\"version\": 1\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/aliases",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"aliases"
],
"variable": [
{
"key": "id",
"value": "MyThumbnailAppBundle",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "Update app bundle alias",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"version\": 9\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/aliases/:alias_id",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"aliases",
":alias_id"
],
"variable": [
{
"key": "id",
"value": "ThumbnailAppBundle",
"type": "string"
},
{
"key": "alias_id",
"value": "prod",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "List app bundle aliases",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/aliases",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"aliases"
],
"variable": [
{
"key": "id",
"value": "MyThumbnailAppBundle",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "Get app bundle alias details",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/appbundles/:id/aliases/:alias_id",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"appbundles",
":id",
"aliases",
":alias_id"
],
"variable": [
{
"key": "id",
"value": "ThumbnailAppBundle",
"type": "string"
},
{
"key": "alias_id",
"value": "prod",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "Upload binaries for app bundle",
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "key",
"value": "apps/YhryNMLor4R1maFhY4zER8unpISoP5E4/ThumbnailAppBundle/9",
"type": "text"
},
{
"key": "policy",
"value": "eyJleHBpcmF0aW9uIjoiMjAxOC0xMC0yNlQxNDo1MjozNS4xNDUxMDU0WiIsImNvbmRpdGlvbnMiOlt7ImtleSI6ImFwcHMvWWhyeU5NTG9yNFIxbWFGaFk0ekVSOHVucElTb1A1RTQvVGh1bWJuYWlsQXBwQnVuZGxlLzkifSx7ImJ1Y2tldCI6ImRhc3Byb2Qtc3RvcmUifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMCJ9LFsic3RhcnRzLXdpdGgiLCIkc3VjY2Vzc19hY3Rpb25fcmVkaXJlY3QiLCIiXSxbInN0YXJ0cy13aXRoIiwiJGNvbnRlbnQtVHlwZSIsImFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbSJdLHsieC1hbXotc2VydmVyLXNpZGUtZW5jcnlwdGlvbiI6IkFFUzI1NiJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCIwIiwiMTA0ODU3NjAwIl0seyJ4LWFtei1jcmVkZW50aWFsIjoiQVNJQVRHVkpaS00zTlhWTzVOU0UvMjAxODEwMjYvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdC8ifSx7IngtYW16LWFsZ29yaXRobSI6IkFXUzQtSE1BQy1TSEEyNTYifSx7IngtYW16LWRhdGUiOiIyMDE4MTAyNlQxMzUyMzVaIn0seyJ4LWFtei1zZWN1cml0eS10b2tlbiI6IkZRb0daWEl2WVhkekVDNGFERnlxcjlSYU9XYW5rN3B5R0NMOUFjcEZFcExSTzBmbENqUmVJTUtYby9iaDg4dzFoRFJBOHlacllla1lEd1BpM3JmWmNJVFVqc2lhMExiRi9sbCtXclBZbDAyblRLR2M1Y1laeEE0Lzg2Umd4SHBmS2lRUzJYMUxqTHNwajVOVTVGaCtUSXQ0eDRUTUVvN3pRN1U4TEp4Skc1dlFtMkRYaWd1dkowUy9PUnZSd0NaUjRGVU0zdFpQY0FRRlM2L1pTdU04TnhjVm4zMmt0T2xLamYwM0pyS203UWhNalg5c0ZGVkJQYXlrMlBkQkd4bHkzNmdWYzg5S0ZhRVdjeExPMVNqL1FNRzlWdnNpL3VoZkNFRlZvUGFIK1NtS1hDRkIzcGJYSEh0UHQ0TzgwSGpyVjJ3RkpNQStCS0ZCVXkveW1zUmZIOGxhMDlPb2xicjBXYU1hSytVSEJ2MVhPZXJNWjRpWW9EOG8xSXJNM2dVPSJ9XX0=",
"type": "text"
},
{
"key": "content-type",
"value": "application/octet-stream",
"type": "text"
},
{
"key": "success_action_status",
"value": "200",
"type": "text"
},
{
"key": "success_action_redirect",
"value": "",
"type": "text"
},
{
"key": "x-amz-signature",
"value": "215f1dc22e1fe9954468b6f8336abd232560356dc779ab81cbd43895a197fd3b",
"type": "text"
},
{
"key": "x-amz-credential",
"value": "ASIATGVJZKM3NXVO5NSE/20181026/us-east-1/s3/aws4_request/",
"type": "text"
},
{
"key": "x-amz-algorithm",
"value": "AWS4-HMAC-SHA256",
"type": "text"
},
{
"key": "x-amz-date",
"value": "20181026T135235Z",
"type": "text"
},
{
"key": "x-amz-server-side-encryption",
"value": "AES256",
"type": "text"
},
{
"key": "x-amz-security-token",
"value": "FQoGZXIvYXdzEC4aDFyqr9RaOWank7pyGCL9AcpFEpLRO0flCjReIMKXo/bh88w1hDRA8yZrYekYDwPi3rfZcITUjsia0LbF/ll+WrPYl02nTKGc5cYZxA4/86RgxHpfKiQS2X1LjLspj5NU5Fh+TIt4x4TMEo7zQ7U8LJxJG5vQm2DXiguvJ0S/ORvRwCZR4FUM3tZPcAQFS6/ZSuM8NxcVn32ktOlKjf03JrKm7QhMjX9sFFVBPayk2PdBGxly36gVc89KFaEWcxLO1Sj/QMG9Vvsi/uhfCEFVoPaH+SmKXCFB3pbXHHtPt4O80HjrV2wFJMA+BKFBUy/ymsRfH8la09Oolbr0WaMaK+UHBv1XOerMZ4iYoD8o1IrM3gU=",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": []
}
]
},
"url": {
"raw": "https://dasprod-store.s3.amazonaws.com",
"protocol": "https",
"host": [
"dasprod-store",
"s3",
"amazonaws",
"com"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "Activities",
"item": [
{
"name": "Create activity",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"commandLine\": [\n \"$(engine.path)\\\\InventorCoreConsole.exe /i $(args[PartFile].path) /al $(appbundles[ThumbnailAppBundle].path)\"\n ],\n \"parameters\": {\n \"PartFile\": {\n \"verb\": \"get\",\n \"description\": \"IPT file or ZIP with assembly to process\"\n },\n \"OutputBmp\": {\n \"zip\": false,\n \"ondemand\": false,\n \"optional\": true,\n \"verb\": \"put\",\n \"description\": \"Generated thumbnail\",\n \"localName\": \"thumbnail.bmp\"\n }\n },\n \"engine\": \"Autodesk.Inventor+23\",\n \"appbundles\": [\"YhryNMLor4R1maFhY4zER8unpISoP5E4.ThumbnailAppBundle+prod\"],\n \"description\": \"Generate thumbnails for IPT files (Inventor 2019).\",\n \"id\": \"GenerateThumbnail\"\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/activities",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"activities"
]
}
},
"response": []
},
{
"name": "List all activities",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/activities",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"activities"
]
}
},
"response": []
},
{
"name": "Create activity alias",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"id\": \"prod\",\n\t\"version\": 1\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/activities/:id/aliases",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"activities",
":id",
"aliases"
],
"variable": [
{
"key": "id",
"value": "GenerateThumbnail",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "List activity aliases",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/activities/:id/aliases",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"activities",
":id",
"aliases"
],
"variable": [
{
"key": "id",
"value": "MyThumbnailGenerator",
"type": "string"
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "Work Items",
"item": [
{
"name": "Create work item",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"activityId\": \"YhryNMLor4R1maFhY4zER8unpISoP5E4.GenerateThumbnailV2+prod\",\n \"arguments\": {\n \"PartFile\": {\n \"url\": \"https://s3.eu-west-2.amazonaws.com/brozp/inventor.io/Clutch_Gear_20t.ipt\",\n \"zip\": false\n },\n \"OutputBmp\": {\n \"url\": \"https://petr-broz.s3.eu-west-2.amazonaws.com/inventor.io/foo.bmp?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJRVGPEZNETOIVE7A%2F20181026%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20181026T153916Z&X-Amz-Expires=3600&X-Amz-Signature=444cc7bb64ba7b4b807c21ae1eda696652bcc006fb0e51eb4ace793314769b64&X-Amz-SignedHeaders=host\",\n \"verb\": \"put\"\n }\n }\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/workitems",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"workitems"
]
}
},
"response": []
},
{
"name": "Get work item details",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/da/us-east/v3/workitems/:id",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"da",
"us-east",
"v3",
"workitems",
":id"
],
"variable": [
{
"key": "id",
"value": "fa1659c715134a9ba8058da21265185f",
"type": "string"
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{ACCESS_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "70ec96ec-689c-4622-90f0-d6d34a2f29b9",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "1c9e973b-3ee5-4d2a-a8f1-ce53fca23d0e",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "BIM 360",
"item": [
{
"name": "/project/v1/hubs",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/project/v1/hubs",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"project",
"v1",
"hubs"
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/project/v1/hubs/:hub/projects",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/project/v1/hubs/:hub/projects",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"project",
"v1",
"hubs",
":hub",
"projects"
],
"variable": [
{
"key": "hub",
"value": "b.c464631d-2a3e-4738-8e10-800a1152f7d6",
"type": "string"
}
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/project/v1/hubs/:hub/projects/:project/topFolders",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/project/v1/hubs/:hub/projects/:project/topFolders",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"project",
"v1",
"hubs",
":hub",
"projects",
":project",
"topFolders"
],
"variable": [
{
"key": "hub",
"value": "b.c464631d-2a3e-4738-8e10-800a1152f7d6",
"type": "string"
},
{
"key": "project",
"value": "b.332f0cb3-1980-4cc2-9679-984d34603203",
"type": "string"
}
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/data/v1/projects/:project/folders/:folder/contents",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/data/v1/projects/:project/folders/:folder/contents",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"data",
"v1",
"projects",
":project",
"folders",
":folder",
"contents"
],
"variable": [
{
"key": "project",
"value": "b.332f0cb3-1980-4cc2-9679-984d34603203",
"type": "string"
},
{
"key": "folder",
"value": "urn:adsk.wipprod:fs.folder:co.Q8e-5zI7Saup5HdsFUbxmA",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "/data/v1/projects/:project/items/:item/tip",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/data/v1/projects/:project/items/:item/tip",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"data",
"v1",
"projects",
":project",
"items",
":item",
"tip"
],
"variable": [
{
"key": "project",
"value": "b.332f0cb3-1980-4cc2-9679-984d34603203",
"type": "string"
},
{
"key": "item",
"value": "urn:adsk.wipprod:dm.lineage:EN3XOY8MTLmiUjzm3IQ5tw",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "/data/v1/projects/:project/storage",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/vnd.api+json",
"type": "text"
},
{
"key": "Accept",
"value": "application/vnd.api+json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"jsonapi\": { \"version\": \"1.0\" },\n \"data\": {\n \"type\": \"objects\",\n \"attributes\": {\n \"name\": \"test.rvt\"\n },\n \"relationships\": {\n \"target\": {\n \"data\": { \"type\": \"folders\", \"id\": \"urn:adsk.wipprod:fs.folder:co.zo9tiVUsSXSdHrtpmIVcJw\" }\n }\n }\n }\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/data/v1/projects/:project/storage",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"data",
"v1",
"projects",
":project",
"storage"
],
"variable": [
{
"key": "project",
"value": "a.cGVyc29uYWw6dWUyZGI1Y2JmIzIwMTgwODMwMTQ2MjI3MDgx",
"type": "string"
}
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/oss/v2/buckets/:bucket/objects/:object",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "file",
"file": {
"src": "{\n \"jsonapi\": { \"version\": \"1.0\" },\n \"data\": {\n \"type\": \"objects\",\n \"attributes\": {\n \"name\": \"basic.rvt\"\n },\n \"relationships\": {\n \"target\": {\n \"data\": { \"type\": \"folders\", \"id\": \"urn:adsk.wipprod:fs.folder:co.zo9tiVUsSXSdHrtpmIVcJw\" }\n }\n }\n }\n}"
}
},
"url": {
"raw": "{{FORGE_HOST}}/oss/v2/buckets/:bucket/objects/:object",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"oss",
"v2",
"buckets",
":bucket",
"objects",
":object"
],
"variable": [
{
"key": "bucket",
"value": "wip.dm.prod",
"type": "string"
},
{
"key": "object",
"value": "667a3065-93ec-4e58-a1c5-b6ddfa5bc344.rvt",
"type": "string"
}
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/data/v1/projects/:project/items",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/vnd.api+json",
"type": "text"
},
{
"key": "Accept",
"value": "application/vnd.api+json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"jsonapi\": { \"version\": \"1.0\" },\n \"data\": {\n \"type\": \"items\",\n \"attributes\": {\n \"displayName\": \"basic.rvt\",\n \"extension\": {\n \"type\": \"items:autodesk.bim360:File\",\n \"version\": \"1.0\"\n }\n },\n \"relationships\": {\n \"tip\": {\n \"data\": {\n \"type\": \"versions\", \"id\": \"1\"\n }\n },\n \"parent\": {\n \"data\": {\n \"type\": \"folders\",\n \"id\": \"urn:adsk.wipprod:fs.folder:co.zo9tiVUsSXSdHrtpmIVcJw\"\n }\n }\n }\n },\n \"included\": [\n {\n \"type\": \"versions\",\n \"id\": \"1\",\n \"attributes\": {\n \"name\": \"basic.rvt\",\n \"extension\": {\n \"type\": \"versions:autodesk.bim360:File\",\n \"version\": \"1.0\"\n }\n },\n \"relationships\": {\n \"storage\": {\n \"data\": {\n \"type\": \"objects\",\n \"id\": \"urn:adsk.objects:os.object:wip.dm.prod/ecd58956-743f-409e-a9b8-12bf29213563.rvt\"\n }\n }\n }\n }\n ]\n }"
},
"url": {
"raw": "{{FORGE_HOST}}/data/v1/projects/:project/items",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"data",
"v1",
"projects",
":project",
"items"
],
"variable": [
{
"key": "project",
"value": "a.cGVyc29uYWw6dWUyZGI1Y2JmIzIwMTgwODMwMTQ2MjI3MDgx",
"type": "string"
}
]
},
"description": "Lists all buckets."
},
"response": []
},
{
"name": "/hq/v1/accounts/:account/projects",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0.eyJjbGllbnRfaWQiOiJ5VDREdE8zYUZiQnJLUDFubEVxdm5iZEJ2TldzdHpKbCIsImV4cCI6MTU0MzkzNzgxOCwic2NvcGUiOlsiYWNjb3VudDpyZWFkIl0sImF1ZCI6Imh0dHBzOi8vYXV0b2Rlc2suY29tL2F1ZC9qd3RleHA2MCIsImp0aSI6InUyeHB1TjBEenloTGJJSmhUWmlJNThBWGJMN3JFMXE1SlNoTlhUSE00Z00yVHlYRHRGS05CMGF4dURHYm40azQifQ.vX7AC4Rgz0vAEu9SSX_nfCCcs7XoOdLQuqaRqG6JPjw",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/hq/v1/accounts/:account/projects",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"hq",
"v1",
"accounts",
":account",
"projects"
],
"variable": [
{
"key": "account",
"value": "{{BIM360_ACCOUNT_ID}}",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "/hq/v1/accounts/:account/projects/:project",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0.eyJjbGllbnRfaWQiOiJ5VDREdE8zYUZiQnJLUDFubEVxdm5iZEJ2TldzdHpKbCIsImV4cCI6MTU0MzkzNzgxOCwic2NvcGUiOlsiYWNjb3VudDpyZWFkIl0sImF1ZCI6Imh0dHBzOi8vYXV0b2Rlc2suY29tL2F1ZC9qd3RleHA2MCIsImp0aSI6InUyeHB1TjBEenloTGJJSmhUWmlJNThBWGJMN3JFMXE1SlNoTlhUSE00Z00yVHlYRHRGS05CMGF4dURHYm40azQifQ.vX7AC4Rgz0vAEu9SSX_nfCCcs7XoOdLQuqaRqG6JPjw",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/hq/v1/accounts/:account/projects/:project",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"hq",
"v1",
"accounts",
":account",
"projects",
":project"
],
"variable": [
{
"key": "account",
"value": "{{BIM360_ACCOUNT_ID}}",
"type": "string"
},
{
"key": "project",
"value": "332f0cb3-1980-4cc2-9679-984d34603203",
"type": "string"
}
]
}
},
"response": []
},
{
"name": "/issues/v1/containers/:container/quality-issues",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{FORGE_HOST}}/issues/v1/containers/:container/quality-issues",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"issues",
"v1",
"containers",
":container",
"quality-issues"
],
"variable": [
{
"key": "container",
"value": "48f0d895-40f4-4aab-bd63-6a040e980e96",
"type": "string"
}
]
}
},
"response": []
}
],
"auth": {
"type": "oauth2",
"oauth2": [
{
"key": "accessToken",
"value": "eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0.eyJ1c2VyaWQiOiJHNVBDSkczNVU5OEoiLCJleHAiOjE1NDgwNjYxNTIsInNjb3BlIjpbImRhdGE6Y3JlYXRlIiwiZGF0YTp3cml0ZSIsImRhdGE6cmVhZCIsImJ1Y2tldDpyZWFkIiwiYnVja2V0OmNyZWF0ZSIsImNvZGU6YWxsIiwiYWNjb3VudDpyZWFkIiwidmlld2FibGVzOnJlYWQiXSwiY2xpZW50X2lkIjoieVQ0RHRPM2FGYkJyS1AxbmxFcXZuYmRCdk5Xc3R6SmwiLCJncmFudF9pZCI6Im9oQjROaVp3bmpaWFN4bkVMb0t0M3pqemd1bTdpUTg2IiwiYXVkIjoiaHR0cHM6Ly9hdXRvZGVzay5jb20vYXVkL2p3dGV4cDYwIiwianRpIjoibVdIandXdjNzTFNLeUczTk1ZbnEwb3JYMlczWVZIeXhUZVFpenpCNkNkaE9LZ0U2dTVqcWhndVpUZjdjSUQwSiJ9._TfaRl_XLd2uCifdCPShkY3x7MbLWAF0LaSagKdFLDk",
"type": "string"
},
{
"key": "tokenType",
"value": "Bearer",
"type": "string"
},
{
"key": "addTokenTo",
"value": "header",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "1dd715cd-a130-48f6-ac26-7896cca6ecc0",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "54840a44-18a4-456f-b30b-fc885e8b124c",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Search Indexing",
"item": [
{
"name": "/indexing/v1",
"request": {
"auth": {
"type": "oauth1",
"oauth1": [
{
"key": "signatureMethod",
"value": "HMAC-SHA1",
"type": "string"
},
{
"key": "version",
"value": "1.0",
"type": "string"
},
{
"key": "addParamsToHeader",
"value": false,
"type": "boolean"
},
{
"key": "addEmptyParamsToSign",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"documents\": [\n {\n \"item\": {\n \"sourceId\": {\n \"sourceSystem\": \"exampleDataRoot\",\n \"id\": \"id200\",\n \"type\": \"fs.file\"\n },\n \"securityInfo\": {\n \"securityType\": \"open\"\n },\n \"sourceVersion\": \"1\",\n \"creator\": {\n \"userIdValue\": \"uid2\",\n \"userIdType\": \"adsk.oxygen\"\n },\n \"lastModifier\": {\n \"userIdValue\": \"uid3\",\n \"userIdType\": \"adsk.oxygen\"\n },\n \"dateCreated\": \"2012-01-01T12:31:12\",\n \"dateModified\": \"2012-02-02T13:15:15\",\n \"content\": {\n \"textContent\": \"the quick brown fox jumps over the lazy dogs\",\n \"name\": \"first example13 name\"\n }\n }\n }\n ]\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/indexing/v1",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"indexing",
"v1"
]
}
},
"response": []
},
{
"name": "/indexing/v1/status/:doc",
"request": {
"auth": {
"type": "oauth1",
"oauth1": [
{
"key": "signatureMethod",
"value": "HMAC-SHA1",
"type": "string"
},
{
"key": "version",
"value": "1.0",
"type": "string"
},
{
"key": "addParamsToHeader",
"value": false,
"type": "boolean"
},
{
"key": "addEmptyParamsToSign",
"value": false,
"type": "boolean"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"url": {
"raw": "{{FORGE_HOST}}/indexing/v1/status/:doc",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"indexing",
"v1",
"status",
":doc"
],
"variable": [
{
"key": "doc",
"value": "",
"type": "string"
}
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{ACCESS_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "657ae6de-2cb3-4426-bd38-4e886bc24bf4",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "2db87b9c-4dd5-4239-b638-a22a7718f9c5",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Schema",
"item": [
{
"name": "/schema/v1/namespaces",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/vnd.api+json",
"type": "text"
},
{
"key": "Accept",
"value": "application/vnd.api+json",
"type": "text"
}
],
"url": {
"raw": "{{FORGE_HOST}}/schema/v1/namespaces",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"schema",
"v1",
"namespaces"
]
}
},
"response": []
},
{
"name": "/schema/v1/namespaces",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/vnd.api+json",
"type": "text"
},
{
"key": "Accept",
"value": "application/vnd.api+json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"data\": {\n\t\t\"relationships\": {\n\t\t\t\"companies\": {\n\t\t\t\t\"data\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"type\": \"companies\",\n\t\t\t\t\t\t\"id\": \"autodesk\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"type\": \"namespaces\",\n\t\t\"attributes\": {\n\t\t\t\"name\": \"petrbrozns\"\n\t\t}\n\t}\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/schema/v1/namespaces",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"schema",
"v1",
"namespaces"
]
}
},
"response": []
},
{
"name": "/schema/v1/namespaces/:namespace",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/vnd.api+json",
"type": "text"
},
{
"key": "Accept",
"value": "application/vnd.api+json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"data\": {\n\t\t\"type\": \"namespaces\",\n\t\t\"attributes\": {\n\t\t\t\"id\": \"{{namespace}}\",\n \"permissions\": [{\n \"role\": \"NAMESPACE_ADMIN\",\n \"subjects\": {\n \"o2Users\": [\"oxygen_id_1\",\"oxygen_id_2\"]\n }\n }]\n }\n }\n}"
},
"url": {
"raw": "{{FORGE_HOST}}/schema/v1/namespaces/:namespace",
"host": [
"{{FORGE_HOST}}"
],
"path": [
"schema",
"v1",
"namespaces",
":namespace"
],
"variable": [
{
"key": "namespace",
"value": "petrbroz",
"type": "string"
}
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{ACCESS_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"id": "dca5716c-95ec-4319-8e0a-0319648f19a4",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "b93d3933-4316-449b-8c1c-27d7ac44f6ac",
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "664a99a6-4a7b-41d5-babe-41f24c6a34c9",
"type": "text/javascript",
"exec": [
"const token = pm.environment.get('ACCESS_TOKEN');",
"const expires = pm.environment.get('TOKEN_EXPIRES_AT');",
"",
"if (token && expires > (new Date()).getTime()) {",
" console.log('Found valid token.');",
"} else {",
" const options = {",
" url: pm.environment.get('FORGE_HOST') + '/authentication/v1/authenticate',",
" method: 'POST',",
" header: {",
" 'Accept': 'application/json',",
" 'Content-Type': 'application/x-www-form-urlencoded'",
" },",
" body: {",
" mode: 'urlencoded',",
" urlencoded: [",
" {",
" key: \"grant_type\",",
" value: \"client_credentials\",",
" disabled: false",
" },",
" {",
" key: \"client_id\",",
" value: pm.environment.get(\"FORGE_CLIENT_ID\"),",
" disabled: false",
" },",
" {",
" key: \"client_secret\",",
" value: pm.environment.get(\"FORGE_CLIENT_SECRET\"),",
" disabled: false",
" },",
" {",
" key: \"scope\",",
" value: pm.environment.get(\"FORGE_SCOPES\"),",
" disabled: false",
" }",
" ]",
" }",
" };",
" pm.sendRequest(options, function(err, res) {",
" if (err) {",
" console.error(err);",
" } else {",
" console.log('Updating token and expiration time.');",
" const resp = res.json();",
" console.log('Response', resp);",
" pm.environment.set('ACCESS_TOKEN', resp.access_token);",
" const expiry = new Date();",
" expiry.setSeconds(expiry.getSeconds() + resp.expires_in);",
" pm.environment.set('TOKEN_EXPIRES_AT', expiry.getTime());",
" }",
" });",
"}"
]
}
},
{
"listen": "test",
"script": {
"id": "ec293ff5-0c75-4c06-8832-ea8c4fcf12cf",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"id": "b6e566ed-ce2a-4be3-89c5-75f8d5ce91f3",
"key": "ACCESS_TOKEN",
"value": "",
"type": "string"
},
{
"id": "26b2d994-5002-47d0-9e3c-92930dabe28e",
"key": "TOKEN_EXPIRES_AT",
"value": "",
"type": "string"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment