Request

Response

    Create Issues (new)

    This tutorial demonstrates how to create a BIM 360 issue for a project. The steps include retrieving the container ID for the project, and creating the issue. Each project is assigned a container that stores all the issues for the project. You need to use the Data Management API to retrieve the container ID for the project.

    There are two types of issues:

    • Issues that are associated with a project but not associated with a specific document.
    • Issues associated with a specific document (pushpin issues).

    Note: If you want to create issue with pushpin, please refer to Create Document-related (Pushpin) RFIs in Your App.

    Before You Begin

    Step 1: Find the Hub ID

    You first need to call GET hubs to find the hub ID for your BIM 360 account.

    Note that the BIM 360 account ID corresponds to a Data Management hub ID. To convert an account ID into a hub ID you need to add a “b." prefix. For example, an account ID of c8b0c73d-3ae9 translates to a hub ID of b.c8b0c73d-3ae9.

    Request

    curl -X GET -H "Authorization: Bearer nFRJxzCD8OOUr7hzBwbr06D76zAT" "https://developer.api.autodesk.com/project/v1/hubs"
    

    Response

    {
      "jsonapi": {
        "version": "1.0"
      },
      "links": {
        "self": {
          "href": "https://developer.api.autodesk.com/project/v1/hubs"
        }
      },
      "data": [
        {
          "type": "hubs",
          "id": "b.cGVyc29uYWw6cGUyOWNjZjMy",
          "attributes": {
            "name": "My First Account",
            "extension": {
              "type": "hubs:autodesk.bim360:Account",
              "version": "1.0",
              "schema": {
                "href": "https://developer.api.autodesk.com/schema/v1/versions/hubs:autodesk.bim360:Account-1.0"
              },
              "data": {}
            }
          }
        }
      ]
    }
    
    Show More

    In this example, assume that the project you want the container for is in My First Account hub.

    Step 2: Find the Container ID for the Project

    Each project is assigned a container that stores all the issues for the project. Use the BIM 360 hub ID that you retrieved in the previous step (b.cGVyc29uYWw6cGUyOWNjZjMy) to call GET hubs/:hub_id/projects, and retrieve a list of all the projects in the hub the user has access to. In this example, we have added a filter to only return details of a specific project (Demo Project).

    Request

    curl -X GET -H "Authorization: Bearer nFRJxzCD8OOUr7hzBwbr06D76zAT" "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects?filter%5Battributes.name%5D=Demo%20Project"
    

    Response

    {
      "jsonapi": {
        "version": "1.0"
      },
      "links": {
        "self": {
          "href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects"
        }
      },
      "data": [
        {
          "type": "projects",
          "id": "b.cGVyc29uYWw6cGUyOWNjZjMyI0QyMDE2MDUyNDEyOTI5NzY",
          "attributes": {
            "name": "My First Project",
            "extension": {
              "type": "projects:autodesk.core:Project",
              "version": "1.0",
              "schema": {
                "href": "https://developer.api.autodesk.com/schema/v1/versions/projects%3Aautodesk.core%3AProject-1.0"
              },
              "data": {}
            }
          },
          "links": {
            "self": {
              "href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects/b.57be304852e74856a61bf25acebc200f"
            }
          },
          "relationships": {
            "hub": {
              "data": {
                "type": "hubs",
                "id": "b.cGVyc29uYWw6cGUyOWNjZjMy"
              },
              "links": {
                "related": {
                  "href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy"
                }
              }
            },
            "rootFolder": {
              "data": {
                "type": "folders",
                "id": "urn:adsk.wipprod:fs.folder:co.uvDiLQ5DRYidDQ_EFW1OOg"
              },
              "meta": {
                "link": {
                  "href": "https://developer.api.autodesk.com/data/v1/projects/b.57be304852e74856a61bf25acebc200f/folders/urn%3Aadsk.wipprod%3Afs.folder%3Aco.uvDiLQ5DRYidDQ_EFW1OOg"
                }
              }
            },
            "topFolders": {
              "links": {
                "related": {
                  "href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects/b.57be304852e74856a61bf25acebc200f/topFolders"
                }
              }
            },
            "issues": {
              "data": {
                "type": "issueContainerId",
                "id": "be00f32e-c03c-4c7b-9ec4-d2614bf1980cfor"
              }
            }
          }
        }
      ]
    }
    
    Show More

    The response payload includes the container ID (data.relationships.issues.id).

    Step 3: Create the Issue

    Use the container ID (be00f32e-c03c-4c7b-9ec4-d2614bf1980c) to call POST issues.

    Note that to find the values for the issueSubtypeId attribute, you need to call GET issue-types.

    Request

    curl --location --request POST 'https://developer.api.autodesk.com/issues/v2/containers/6c8e8341-a4da-4959-a90d-e3b16c60ffd4/issues' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Bearer XZvCJNhdxESsBRIH28MfLf2hKL5O' \
        --data-raw '{
            "title": "test title",
            "issueSubtypeId": "a0a1b5a4-2c72-4bca-8de2-f2d0e2aa0e86",
            "description": "Check whether the pipe in room 3 is the correct size.",
            "status": "draft"
        }'
    
    Show More

    Response

    201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "id": "e39ae583-5f95-4c18-bf8b-0a829c808987",
      "containerId": "6c8e8341-a4da-4959-a90d-e3b16c60ffd4",
      "displayId": 11,
      "rootCauseId": null,
      "title": "test title",
      "description": "Check whether the pipe in room 3 is the correct size.",
      "issueTypeId": "a2b12543-e488-4578-bd4d-41212383ff5e",
      "issueSubtypeId": "a0a1b5a4-2c72-4bca-8de2-f2d0e2aa0e86",
      "status": "draft",
      "assignedTo": null,
      "assignedToType": null,
      "dueDate": null,
      "locationId": null,
      "locationDetails": null,
      "snapshotUrn": null,
      "linkedDocuments": [],
      "links": [],
      "ownerId": "...",
      "officialResponse": {
          "response": null,
          "respondedAt": null,
          "respondedBy": null
      },
      "permittedAttributes": [
          "title",
          "description",
          "issueTypeId",
          "issueSubtypeId",
          "status",
          "assignedTo",
          "assignedToType",
          "dueDate",
          "locationId",
          "locationDetails",
          "linkedDocuments",
          "links",
          "ownerId",
          "rootCauseId",
          "officialResponse",
          "customAttributes",
          "clientUpdatedAt",
          "snapshotUrn"
      ],
      "permittedActions": [
          "add_comment",
          "add_attachment",
          "assign_all",
          "clear_assignee"
      ],
      "commentCount": 0,
      "attachmentCount": 0,
      "openedBy": null,
      "openedAt": null,
      "closedBy": null,
      "closedAt": null,
      "createdBy": "...",
      "createdAt": "2022-10-18T10:29:11.057Z",
      "updatedBy": "...",
      "updatedAt": "2022-10-18T10:29:11.057Z",
      "issueTemplateId": null,
      "customAttributes": [],
      "permittedStatuses": [
          "draft",
          "open"
      ]
    }
    
    Show More

    Congratulations! You have created a BIM 360 issue.