Custom table record links

Create a custom table record link associated with a product

Changed on

Resources that can be linked to records from a custom table (called custom objects in the API) can be manipulated in a bulk ID-list format. To use custom table record links you must first add a many-to-many custom field definition to the resource. When you pass the IDs of custom table records to link to the feature, the existing list of links will be replaced.

Examples of linking custom objects to resources with a many-to-many customer field:

  • Products
  • Releases
  • Features
  • Ideas
  • Initiatives
  • Goals
  • Organizations

Custom tables are an Enterprise+ exclusive feature.

put/products/{id}

Request

  • Base URL
    https://company.aha.io/api/v1
  • Auth
    • OAuth 2
      Authorization codehttps://{account-domain}.aha.io/oauth/authorize
      Token URLhttps://{account-domain}.aha.io/oauth/token
    • or HTTP bearer
    • or API key in cookie session
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

idstring required

Id identifier

Request body

Example request

{
  "requirement": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Successful operation

Example response

{
  "product": {
    "id": "131414752",
    "reference_prefix": "PRJ1",
    "name": "Two Products",
    "product_line": false,
    "product_line_type": null,
    "created_at": "2019-01-01T00:00:00.000Z",
    "updated_at": "2019-01-01T00:00:00.000Z",
    "description": {
      "id": "21164619",
      "body": "",
      "notable_id": "131414752",
      "notable_type": "Project",
      "editor_version": 1,
      "created_at": "2019-01-01T00:00:00.000Z",
      "updated_at": "2019-01-01T00:00:00.000Z",
      "attachments": []
    },
    "url": "https://company.aha.io/projects/PRJ1",
    "resource": "https://company.aha.io/projects/PRJ1",
    "children": [],
    "custom_fields": [
      {
        "id": 33687638,
        "key": "release_count",
        "name": "Release count",
        "updatedAt": "2019-01-01T00:00:00Z",
        "type": "equation_sheet",
        "value": {
          "values": {
            "6809377296730243716": {
              "value": 6,
              "name": "Release count",
              "display_value": "6.0",
              "raw_display_value": "6.0"
            }
          }
        }
      }
    ],
    "screen_definition_ids": {
      "Approval": 475481209,
      "Competitor": 826556567,
      "Epic": 908690576,
      "Feature": 19837977,
      "Ideas::Idea": 405267877,
      "Ideas::IdeaPortal": 790680888,
      "Initiative": 838774462,
      "Page": 26499634,
      "Project": 524951996,
      "Release": 647403809,
      "Requirement": 687341318,
      "StrategicImperative": 117022249
    },
    "screen_definitions": [
      {
        "id": 19837977,
        "screenable_type": "Feature",
        "name": "Screen Definition 6",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 839883647,
            "key": "custom_scorecard_definition",
            "position": 3,
            "name": "Some custom scorecard definition",
            "type": "CustomFieldDefinitions::ScorecardField",
            "api_type": "scorecard",
            "can_be_required_on_form": true
          },
          {
            "required": false,
            "id": 182007396,
            "key": "custom_table",
            "position": 7,
            "name": "Custom Table",
            "type": "CustomFieldDefinitions::LinkMasterDetail",
            "api_type": "array",
            "can_be_required_on_form": true
          },
          {
            "required": false,
            "id": 20549131,
            "key": "customer",
            "position": 2,
            "name": "Customer",
            "type": "CustomFieldDefinitions::SelectEditable",
            "api_type": "string",
            "can_be_required_on_form": true,
            "configuration_display": null,
            "options": [
              {
                "id": 106870231,
                "label": "cust1"
              },
              {
                "id": 525853807,
                "label": "cust2"
              },
              {
                "id": 676386040,
                "label": "cust3"
              }
            ]
          },
          {
            "required": false,
            "id": 141558949,
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "can_be_required_on_form": true
          },
          {
            "required": false,
            "id": 384804762,
            "key": "product_managers",
            "position": 7,
            "name": "Product Managers",
            "type": "CustomFieldDefinitions::Records::UsersField",
            "api_type": "array",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 26499634,
        "screenable_type": "Page",
        "name": "Screen Definition 7",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 529933329,
            "key": "review_date",
            "position": 1,
            "name": "Review date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 117022249,
        "screenable_type": "StrategicImperative",
        "name": "Screen Definition 13",
        "custom_field_definitions": []
      },
      {
        "id": 405267877,
        "screenable_type": "Ideas::Idea",
        "name": "Screen Definition 5",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 711072024,
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 475481209,
        "screenable_type": "Task",
        "name": "Approvals custom layout",
        "custom_field_definitions": []
      },
      {
        "id": 524951996,
        "screenable_type": "Project",
        "name": "Screen Definition 1",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 807801664,
            "key": "name",
            "position": 1,
            "name": "Name",
            "type": "CustomFieldDefinitions::TextField",
            "api_type": "string",
            "can_be_required_on_form": true
          },
          {
            "required": false,
            "id": 221120583,
            "key": "website",
            "position": 2,
            "name": "Website",
            "type": "CustomFieldDefinitions::UrlField",
            "api_type": "url",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 647403809,
        "screenable_type": "Release",
        "name": "Screen Definition 8",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 3228193,
            "key": "release_custom_date",
            "position": 1,
            "name": "Release custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 687341318,
        "screenable_type": "Requirement",
        "name": "Screen Definition 11",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 85990596,
            "key": "priority",
            "position": 3,
            "name": "Priority",
            "type": "CustomFieldDefinitions::SelectConstant",
            "api_type": "string",
            "can_be_required_on_form": true,
            "configuration_display": null,
            "options": [
              {
                "id": 135354995,
                "label": "P4"
              },
              {
                "id": 376819668,
                "label": "P3"
              },
              {
                "id": 561184585,
                "label": "P2"
              },
              {
                "id": 947629821,
                "label": "P1"
              },
              {
                "id": 1058433764,
                "label": "P5"
              }
            ]
          },
          {
            "required": false,
            "id": 867049992,
            "key": "requested_by",
            "position": 2,
            "name": "Requested By",
            "type": "CustomFieldDefinitions::TextField",
            "api_type": "string",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 790680888,
        "screenable_type": "Ideas::IdeaPortal",
        "name": "Screen Definition 4",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 807801664,
            "key": "name",
            "position": 1,
            "name": "Name",
            "type": "CustomFieldDefinitions::TextField",
            "api_type": "string",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 826556567,
        "screenable_type": "Competitor",
        "name": "Screen Definition 3",
        "custom_field_definitions": []
      },
      {
        "id": 838774462,
        "screenable_type": "Initiative",
        "name": "Screen Definition 12",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 250383571,
            "key": "customers",
            "position": 1,
            "name": "Customers",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "can_be_required_on_form": true
          },
          {
            "required": false,
            "id": 688549069,
            "key": "initiative_custom_date",
            "position": 3,
            "name": "Initiative custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "can_be_required_on_form": true
          }
        ]
      },
      {
        "id": 908690576,
        "screenable_type": "Epic",
        "name": "Screen Definition 7",
        "custom_field_definitions": [
          {
            "required": false,
            "id": 919440521,
            "key": "epic_custom_date",
            "position": 1,
            "name": "Epic custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "can_be_required_on_form": true
          }
        ]
      }
    ],
    "has_ideas": true,
    "has_master_features": false,
    "has_epics": false,
    "release_workflow": {
      "workflow_type": "release",
      "id": 717623509,
      "name": "Account product release workflow",
      "statusable_type": "Release"
    },
    "feature_workflow": {
      "workflow_type": "feature",
      "id": 499195972,
      "name": "Account product feature workflow",
      "statusable_type": "Feature"
    },
    "initiative_workflow": {
      "workflow_type": "initiative",
      "id": 61191651,
      "name": "Account initiative workflow",
      "statusable_type": "Initiative"
    },
    "epic_workflow": {
      "workflow_type": "epic",
      "id": 499195972,
      "name": "Account product feature workflow",
      "statusable_type": "Feature"
    },
    "idea_workflow": {
      "workflow_type": "idea",
      "id": 80245244,
      "name": "Account product idea workflow",
      "statusable_type": "Idea"
    },
    "strategic_imperative_workflow": {
      "workflow_type": "strategic_imperative",
      "id": 883066232,
      "name": "Account goal workflow",
      "statusable_type": "StrategicImperative"
    },
    "page_workflow": {
      "workflow_type": "page",
      "id": 934299270,
      "name": "Account document workflow",
      "statusable_type": "Page"
    },
    "requirement_workflow": {
      "workflow_type": "requirement",
      "id": 499195972,
      "name": "Account product feature workflow",
      "statusable_type": "Feature"
    },
    "key_result_workflow": {
      "workflow_type": "key_result",
      "id": 1024772447,
      "name": "Account product key result workflow",
      "statusable_type": "KeyResult"
    },
    "capacity_planning_enabled": false,
    "default_capacity_units": 10,
    "enhanced_capacity_planning_enabled": false,
    "workspace_type": "product_workspace",
    "color": "#40bfbe"
  }
}

Changes