Please be aware there is a known issue with images on the Community. We are working to resolve this issue as quickly as possible. We apologize for the inconvenience. If you need urgent help in the meantime, please reach out to technical support or your Threekit representative.

How to get global attribute values

Comments

1 comment

  • William  Thompson
    William Thompson

    Hi Lester, 

    You can use the Asset Import & Export APIs to get/update global attributes and their values. A successful GET (export single asset) request will return an object similar to the following:

    {
      "id": "9b730242-b4a4-4dff-b9f2-f2e2c51c2e9e",
      "name": "Lounge",
      "type": "item",
      "as": null,
      "createdAt": "2021-11-30T21:13:47.121Z",
      "updatedAt": "2022-06-15T18:22:29.288Z",
      "deletedAt": null,
    "createdBy": "42389532-cdc8-4c2f-bb64-57ff68042196",
    "orgId": "a4e19e04-30e4-4360-bba5-4f27f25419d0",
      "metadata": [],
      "tags": [
        "Couch"
      ],
    "keywords": [],
    "proxyId": "13cb99a0-344d-4a35-ae7f-a802d3a6bf47",
      "parentFolderId": "catalog",
      "publishedAt": "2022-06-09T15:57:02.938Z",
      "defaultStageId": "981dcc5d-a3b1-4554-afbc-b27e8edfcbb7",
    "defaultCompositeId": "f6820d3e-ca9a-4cb1-a064-378d987b9666",
      "deletedBy": null,
    "updatedBy": "42389532-cdc8-4c2f-bb64-57ff68042196",
      "proxyType": null,
    "effects": null,
      "fileSize": 9605142,
      "rules": [],
      "attributes": [
        {
          "id": "11bf9665-e016-451c-96b8-e4575a388479",
          "type": "Global",
          "name": "Global",
          "defaultValue": {
            "assetId": "a6ed8d63-01b7-4e83-85f6-2dd1cfda0127",
            "configuration": "",
            "type": "item"
          },
          "proxy": {
            "id": "11bf9665-e016-451c-96b8-e4575a388479",
            "type": "Asset",
            "name": "Color",
            "blacklist": [],
            "assetType": "material",
            "values": [
              "#leather",
              "#fabric"
            ],
            "defaultValue": {
              "configuration": ""
            }
          }
      },
      ],
      "forms": [],
      "script": "",
      "asset": {
        "assetId": "126fa517-2d69-4a38-915a-0149db13737c",
        "configuration": "",
        "type": "model"
      }
    }
    0

Please sign in to leave a comment.

Powered by Zendesk