Chilkat Online Tools

VBScript / Cognite API v1 / List available outputs

Back to Collection Items

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

set http = CreateObject("Chilkat_9_5_0.Http")

http.SetRequestHeader "api-key","{{api-key}}"

set sbResponseBody = CreateObject("Chilkat_9_5_0.StringBuilder")
success = http.QuickGetSb("https://domain.com/api/v1/projects/{{project}}/3d/models/:modelId/revisions/:revisionId/outputs",sbResponseBody)
If (success = 0) Then
    outFile.WriteLine(http.LastErrorText)
    WScript.Quit
End If

outFile.WriteLine("Response status code = " & http.LastStatus)
outFile.WriteLine(sbResponseBody.GetAsString())

outFile.Close

Curl Command

curl -X GET
	-H "api-key: {{api-key}}"
https://domain.com/api/v1/projects/{{project}}/3d/models/:modelId/revisions/:revisionId/outputs?

Postman Collection Item JSON

{
  "id": "list3dModelOutputs",
  "name": "List available outputs",
  "request": {
    "url": {
      "host": "{{baseUrl}}",
      "path": [
        "api",
        "v1",
        "projects",
        "{{project}}",
        "3d",
        "models",
        ":modelId",
        "revisions",
        ":revisionId",
        "outputs"
      ],
      "query": [
        {
          "key": "format",
          "description": "Format identifier, e.g. 'ept-pointcloud' (point cloud). Well known formats are: \n'ept-pointcloud' (point cloud data), 'reveal-directory' (output supported by Reveal), \n'nodes-json' (a JSON dump of all nodes in the file) and 'preview-glb' (a GLTF preview\nof the 3D model). In addition, 'all-outputs' can be provided to return all outputs. Note\nthat many of the outputs are internal, where the format might change without any warning.\n",
          "disabled": true
        }
      ],
      "variable": [
        {
          "key": "modelId",
          "description": "Model ID.",
          "disabled": true,
          "type": "number"
        },
        {
          "key": "revisionId",
          "description": "Revision ID.",
          "disabled": true,
          "type": "number"
        }
      ]
    },
    "method": "GET",
    "header": [
      {
        "key": "api-key",
        "value": "{{api-key}}",
        "description": "An admin can create API keys in the Cognite console."
      }
    ],
    "description": "Retrieve a list of available outputs for a processed 3D model. An output can be a format that can be consumed by a viewer (e.g. Reveal) or import in external tools. Each of the outputs will have an associated version which is used to identify the version of output format (not the revision of the processed output). Note that the structure of the outputs will vary and is not covered here."
  }
}