I have issues attached to 2D views of Revit 2022 document and I want to retrieve metadata properties for those views, however I can't figure out how to retrieve the view GUID.
Here is my workflow:
From issue Id I retrieve the issue payload using GET issues/:id:. Here is a fragment of the payload attributes:
"attributes": {
"created_at": "2022-06-30T02:34:49.796Z",
"synced_at": "2022-06-30T02:34:49.884Z",
"updated_at": "2022-07-21T16:58:03.553Z",
"close_version": null,
"closed_at": null,
"closed_by": null,
"created_by": "YCPJREYYBJSE",
"opened_at": "2022-06-30T02:34:49.796Z",
"opened_by": "YCPJREYYBJSE",
"updated_by": "YCPJREYYBJSE",
"starting_version": 1,
"title": "Revit 2022 Sheet issue",
"description": null,
"location_description": null,
"markup_metadata": null,
"tags": null,
"target_urn": "urn:adsk.wipprod:dm.lineage:Gkv5194oQLOx8IEPaJUBmA",
"target_urn_page": null,
"collection_urn": null,
"due_date": "2022-06-29T00:00:00.000Z",
"identifier": 215,
"status": "open",
"assigned_to": "YCPJREYYBJSE",
"assigned_to_type": "user",
"answer": null,
"answered_at": null,
"answered_by": null,
"pushpin_attributes": {
"type": "TwoDRasterPushpin",
"location": {
"x": 19.692577166381,
"y": 17.61800469485458,
"z": 0
},
"object_id": null,
"viewer_state": null,
"created_at": "2022-06-30T02:34:49.938Z",
"created_by": "YCPJREYYBJSE",
"created_doc_version": null,
"external_id": null,
"attributes_version": 1
},
"snapshot_urn": "urn:adsk.objects:os.object:ng-issues-prod-2df67853-df3f-493c-a09c-d1aee3aa439c/a2e0343e-1072-4bf8-a12e-ed1aa6a8ea64",
"owner": "YCPJREYYBJSE",
"issue_type_id": null,
"issue_type": null,
"issue_sub_type": null,
"root_cause_id": "8338ce72-cc83-49d7-90ca-93a3dd3d6ac7",
"root_cause": "CONSTRUCTABILITY",
"quality_urns": null,
"permitted_statuses": [
..
],
"permitted_attributes": [
...
],
...
"sheet_metadata": {
"is3D": false,
"sheetGuid": "7a052135-c2ef-4a49-a628-ba9211dc7aae-0005787e",
"sheetName": "A102 - Unnamed"
},
From target_urn
I retrieve the item, then get tip version, then using the version URN I invoke the GET {urn}/metadata, but only 3D views seem to be returned. I definitely have 2d views in my document and I also don't see the last 2 views (Existing & New construction)
{
"data": {
"type": "metadata",
"metadata": [
{
"name": "{3D}",
"role": "3d",
"guid": "00631597-d254-2fc6-351a-eedbc994fa89"
},
{
"name": "3D View 1",
"role": "3d",
"guid": "e829f661-e982-5fec-b3f2-e87bcd1e1d6e"
},
{
"name": "3D View 2",
"role": "3d",
"guid": "4b44f8df-ff26-2a7b-3703-1d2c4b9970d9"
},
{
"name": "3D View 3",
"role": "3d",
"guid": "9e5f8bac-b41e-f96f-2e2e-08eab35309b8"
},
{
"name": "Existing",
"role": "3d",
"guid": "c87a030e-38d5-af19-6e99-bc734b4e91c2",
"isMasterView": true
},
{
"name": "New Construction",
"role": "3d",
"guid": "db161bd1-7870-2fee-bcd6-7a8d4606f079",
So what am I missing?
I would also expect to retrieve the field attributes.sheet_metadata.sheetGuid
(in that case "7a052135-c2ef-4a49-a628-ba9211dc7aae-0005787e") in the views list but obviously it isn't there. So what is the meaning of that field. I tried to use it while invoking the GET {urn}/metadata/{guid}/properties endpoint but it's returning a 404 error... all in all a set of very frustrating and confusing API's.