Project leaders can add custom fields to issues in BIMcollab, for example, to record a discipline, a cost code or a building zone. This article explains how your application can read and write these fields with the Connection API.
💡 Tip: Visit our article Set up custom fields for Issue management to learn more
Before you begin
Custom fields are only available in the Connection API (version
bc_2.1). The generic BCF-API (version2.1) doesn't support them.You need an access token. See How to authenticate with the BIMcollab API.
You need the project ID. See Getting started with the Connection API.
You need a tool to send requests. Each step below shows two options:
Option A: Postman: the collection you created during authorization adds the access token to every request.
Option B: cURL: replace
<access-token>with your access token.
How custom fields work in the API
Custom fields are stored in two places:
The project extensions describe the fields: their number (index), name (label), whether they are required, and, for some fields, the list of allowed values.
Each issue stores the values of its custom fields, identified by the index.
The index connects the two. For example, index 11 in an issue refers to the field with index 11 in the extensions.
Project extensions Issue (topic)
"index": 11, "label": "Custom 1" ←→ "customfields": { "11": "1" }
Retrieve and update Issue custom fields
Follow the steps below to extract and update your Issues custom fields.
Step 1: Get the field definitions
Option A: Postman
Create a new GET request in your collection.
Paste the endpoint below in the URL field. Replace the placeholder with your project ID:
https://playground.bimcollab.com/bcf/bc_2.1/projects/<project-id>/extensions
Click Send.
Option B: cURL
curl -X GET "https://playground.bimcollab.com/bcf/bc_2.1/projects/<project-id>/extensions" \
-H "Authorization: Bearer <access-token>"
The fields list in the response describes each custom field:
"fields": [
{
"index": 11,
"field": "custom1",
"label": "Custom 1",
"mandatory": false,
"values": [
{ "internal_id": 0, "value": null, "label": "Not set", "is_active": true },
{ "internal_id": 1, "value": "1", "is_active": true },
{ "internal_id": 2, "value": "2", "is_active": true },
{ "internal_id": 3, "value": "3", "is_active": true }
]
}
]
Property | Meaning |
| The number that identifies the field in issues. |
| The internal name of the field. |
| The name of the field as users see it in BIMcollab. |
|
|
| The allowed values. Only fields with a fixed list of values have this property. |
Inside values:
value: the value you send and receive in issues.label: the text users see, when it is different from the value.is_active:falseif the value can no longer be selected.
Step 2: Read custom field values
Get an issue.
Option A: Postman
Create a new GET request in your collection.
Paste the endpoint below in the URL field. Replace the placeholders with your
<project-id>and<topic-guid>:
https://playground.bimcollab.com/bcf/bc_2.1/projects/<project-id>/topics/<topic-guid>
Click Send.
Option B: cURL
curl -X GET "https://playground.bimcollab.com/bcf/bc_2.1/projects/<project-id>/topics/<topic-guid>" \
-H "Authorization: Bearer <access-token>"
The customfields object in the response contains the values. Each key is a field index, and each value is the current value of that field:
"customfields": {
"11": "1",
"12": "A",
"13": "two",
"14": "three"
}To show the field names, match each index with the label from the extensions.
Step 3: Write custom field values
Example of creating an issue with custom fields. The request body below contains the issue and its custom field values:
{
"title": "Intersections check: beam inside wall",
"customfields": {
"11": "1",
"12": "A",
"13": "two",
"14": "three"
}
}
Option A: Postman
Create a new POST request in your collection.
Paste the endpoint below in the URL field. Replace the placeholder with your
<project-id>:
https://playground.bimcollab.com/bcf/bc_2.1/projects/<project-id>/topics
Go to the Body tab and select raw and JSON.
Paste the request body.
Click Send.
Option B: cURL
curl -X POST "https://playground.bimcollab.com/bcf/bc_2.1/projects/<project-id>/topics" \
-H "Authorization: Bearer <access-token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Intersections check: beam inside wall",
"customfields": {
"11": "1",
"12": "A",
"13": "two",
"14": "three"
}
}'
Keep these rules in mind:
For fields with a list of
values, send one of the listed values.Fill in every field where
mandatoryistrue.When you update an issue with
PUT, send the complete issue, including all custom fields. See Connection API behavior compared to the BCF-API standard.
Troubleshooting
Problem | Possible cause | Solution |
The response has no | You used version | Use |
A custom field value disappeared after an update. | The | Get the issue first and send it back complete. |
| A mandatory field is empty, or a value isn't in the list of allowed values. | Check |
