Custom Object Links API


Resources that can be linked to objects from a Custom Table can manipulate them in a bulk id-list format. To use Custom Objects Links you must first add a Many-to-Many custom field definition to the resource. When you pass the IDs of custom object 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:

Custom Tables are an Enterprise+ exclusive feature.

PUT /api/v1/products/:id

Link custom object records to a product

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the product to be edited

PUT /api/v1/products/PRJ1

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1" -d '{"product":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "product": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "product": {
    "id": "131414752",
    "reference_prefix": "PRJ1",
    "name": "Project 1",
    "product_line": false,
    "created_at": "2017-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:08.780Z",
    "description": {
      "id": "21164619",
      "body": "",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/projects/PRJ1",
    "resource": "http://account1.example.org/projects/PRJ1",
    "children": [

    ],
    "custom_fields": [

    ],
    "screen_definitions": [
      {
        "id": 524951996,
        "screenable_type": "Project",
        "name": "Screen Definition 1",
        "custom_field_definitions": [
          {
            "key": "name",
            "position": 1,
            "name": "Name",
            "type": "CustomFieldDefinitions::TextField",
            "api_type": "string",
            "options": [

            ]
          },
          {
            "key": "website",
            "position": 2,
            "name": "Website",
            "type": "CustomFieldDefinitions::UrlField",
            "api_type": "url",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 826556567,
        "screenable_type": "Competitor",
        "name": "Screen Definition 3",
        "custom_field_definitions": [

        ]
      },
      {
        "id": 647403809,
        "screenable_type": "Release",
        "name": "Screen Definition 8",
        "custom_field_definitions": [
          {
            "key": "release_custom_date",
            "position": 1,
            "name": "Release custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 405267877,
        "screenable_type": "Ideas::Idea",
        "name": "Screen Definition 5",
        "custom_field_definitions": [
          {
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "options": [
              {
                "id": 1059223798,
                "label": "Acme Corp"
              }
            ]
          }
        ]
      },
      {
        "id": 19837977,
        "screenable_type": "Feature",
        "name": "Screen Definition 6",
        "custom_field_definitions": [
          {
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 908690576,
        "screenable_type": "Epic",
        "name": "Screen Definition 7",
        "custom_field_definitions": [
          {
            "key": "master_feature_custom_date",
            "position": 1,
            "name": "Master feature custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "options": [

            ]
          }
        ]
      }
    ],
    "custom_object_links": [

    ],
    "has_ideas": true,
    "has_master_features": false,
    "release_workflow": {
      "id": 717623509,
      "name": "Default release workflow"
    },
    "feature_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    },
    "idea_workflow": {
      "id": 80245244,
      "name": "Default idea workflow"
    },
    "strategic_imperative_workflow": {
      "id": 883066232,
      "name": "Default goal workflow"
    },
    "initiative_workflow": {
      "id": 61191651,
      "name": "Default initiative workflow"
    },
    "epic_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    }
  }
}

PUT /api/v1/releases/:id

Link custom object records to a release

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the release to be edited

PUT /api/v1/releases/PRJ1-R-1

Example CURL command

curl "https://secure.aha.io/api/v1/releases/PRJ1-R-1" -d '{"release":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "release": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "release": {
    "id": "278327321",
    "product_id": "131414752",
    "reference_num": "PRJ1-R-1",
    "name": "Release 1",
    "start_date": "2017-12-11",
    "release_date": "2017-12-11",
    "external_release_date": "2017-12-11",
    "external_release_date_description": "Dec 11, 2017",
    "external_date_resolution": "exact",
    "released": false,
    "parking_lot": false,
    "created_at": "2017-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:00.000Z",
    "position": null,
    "theme": {
      "id": "522610666",
      "body": "Theme of the release",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/releases/PRJ1-R-1",
    "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
    "integration_fields": [
      {
        "id": "68217473",
        "name": "id",
        "value": "777",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-12-04T23:30:00.000Z"
      }
    ],
    "custom_fields": [
      {
        "key": "note",
        "name": "Note",
        "id": "432637490",
        "body": "<p>sample text</p>",
        "created_at": "2017-12-04T23:30:00.000Z",
        "attachments": [

        ],
        "value": "<p>sample text</p>",
        "type": "note"
      },
      {
        "key": "text_field",
        "name": "TextField",
        "value": "Acme Corp",
        "type": "string"
      }
    ],
    "custom_object_links": [

    ],
    "comments_count": 1,
    "workflow_status": {
      "id": "738862546",
      "name": "New",
      "complete": false
    },
    "owner": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-12-04T23:30:00.000Z",
      "updated_at": "2017-12-04T23:30:00.000Z"
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    "created_by_user": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-12-04T23:30:00.000Z",
      "updated_at": "2017-12-04T23:30:00.000Z"
    }
  }
}

PUT /api/v1/features/:id

Link custom object records to a feature

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the feature to be edited

PUT /api/v1/features/PRJ1-1

Example CURL command

curl "https://secure.aha.io/api/v1/features/PRJ1-1" -d '{"feature":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "feature": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "feature": {
    "id": "1007868956",
    "name": "Feature 1",
    "reference_num": "PRJ1-1",
    "position": 1,
    "score": 0,
    "created_at": "2017-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:09.472Z",
    "start_date": null,
    "due_date": null,
    "workflow_kind": {
      "id": "98484309",
      "name": "New"
    },
    "workflow_status": {
      "id": "934242751",
      "name": "New",
      "complete": false
    },
    "description": {
      "id": "793547626",
      "body": "Body of note 1",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [
        {
          "id": "724655692",
          "download_url": "http://account1.lvh.me/attachments/724655692/token/2f893a16ed9cf87f21a24c368109ccdb0b0af5d1e23699b9b66727f764e83852.download?size=original",
          "created_at": "2017-12-04T23:30:00.000Z",
          "file_size": 123,
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt"
        }
      ]
    },
    "attachments": [

    ],
    "integration_fields": [
      {
        "id": "728894778",
        "name": "key",
        "value": "JRA-123",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-12-04T23:30:00.000Z"
      },
      {
        "id": "846945422",
        "name": "id",
        "value": "435",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-12-04T23:30:00.000Z"
      }
    ],
    "url": "http://account1.example.org/features/PRJ1-1",
    "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
    "release": {
      "id": "278327321",
      "reference_num": "PRJ1-R-1",
      "name": "Release 1",
      "start_date": "2017-12-11",
      "release_date": "2017-12-11",
      "parking_lot": false,
      "created_at": "2017-12-04T23:30:00.000Z",
      "integration_fields": [
        {
          "id": "68217473",
          "name": "id",
          "value": "777",
          "integration_id": 204584239,
          "service_name": "jira",
          "created_at": "2017-12-04T23:30:00.000Z"
        }
      ],
      "url": "http://account1.example.org/releases/PRJ1-R-1",
      "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
      "owner": {
        "id": "16338845",
        "name": "John Smith",
        "email": "john.smith@account1.com",
        "created_at": "2017-12-04T23:30:00.000Z",
        "updated_at": "2017-12-04T23:30:00.000Z"
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-12-04T23:30:00.000Z"
      }
    },
    "master_feature": {
      "id": "999605892",
      "reference_num": "PRJ1-E-1",
      "name": "Epic 1",
      "created_at": "2017-12-04T23:30:00.000Z",
      "url": "http://account1.example.org/epics/PRJ1-E-1",
      "resource": "http://account1.example.org/api/v1/master_features/PRJ1-E-1"
    },
    "created_by_user": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-12-04T23:30:00.000Z",
      "updated_at": "2017-12-04T23:30:00.000Z"
    },
    "assigned_to_user": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-12-04T23:30:00.000Z",
      "updated_at": "2017-12-04T23:30:00.000Z",
      "default_assignee": false
    },
    "requirements": [
      {
        "id": "483368544",
        "name": "Body of requirement 1",
        "reference_num": "PRJ1-1-1",
        "position": 1,
        "created_at": "2017-12-04T23:30:00.000Z",
        "updated_at": "2017-12-04T23:30:00.000Z",
        "release_id": 278327321,
        "workflow_status": {
          "id": "934242751",
          "name": "New",
          "complete": false
        },
        "url": "http://account1.example.org/requirements/PRJ1-1-1",
        "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1",
        "description": {
          "id": "910541534",
          "body": "Body of requirement 1",
          "created_at": "2017-12-04T23:30:00.000Z",
          "attachments": [

          ]
        },
        "feature": {
          "id": "1007868956",
          "reference_num": "PRJ1-1",
          "name": "Feature 1",
          "created_at": "2017-12-04T23:30:00.000Z",
          "url": "http://account1.example.org/features/PRJ1-1",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
        },
        "assigned_to_user": {
          "id": "689956296",
          "name": "Henry Humpty",
          "email": "henry.humpty@account1.com",
          "created_at": "2017-12-04T23:30:00.000Z",
          "updated_at": "2017-12-04T23:30:00.000Z",
          "default_assignee": true
        },
        "created_by_user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "mary.humpty@account1.com",
          "created_at": "2017-12-04T23:30:00.000Z",
          "updated_at": "2017-12-04T23:30:00.000Z"
        },
        "attachments": [

        ],
        "custom_fields": [
          {
            "key": "expected_completion_date",
            "name": "Expected completion date",
            "value": null,
            "type": "date"
          }
        ],
        "integration_fields": [

        ],
        "comments_count": 0
      }
    ],
    "initiative": {
      "id": "423077122",
      "name": "Initiative 1",
      "url": "http://account1.example.org/initiatives/423077122",
      "resource": "http://account1.example.org/api/v1/initiatives/423077122",
      "created_at": "2017-12-04T23:30:00.000Z",
      "description": {
        "id": "1007208146",
        "body": "Description of project1_initiative1",
        "created_at": "2017-12-04T23:30:00.000Z",
        "attachments": [

        ]
      },
      "integration_fields": [

      ]
    },
    "goals": [
      {
        "id": "602095703",
        "name": "Goal 1",
        "url": "http://account1.example.org/strategic_imperatives/602095703",
        "resource": "http://account1.example.org/api/v1/goals/602095703",
        "created_at": "2017-12-04T23:30:00.000Z",
        "description": {
          "id": "258744266",
          "body": "Description of project1_strategic_imperative1",
          "created_at": "2017-12-04T23:30:00.000Z",
          "attachments": [

          ]
        }
      }
    ],
    "comments_count": 1,
    "score_facts": [

    ],
    "tags": [
      "Engineering",
      "Infrastructure"
    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "custom_object_links": [
      {
        "key": "customers",
        "name": "Customers",
        "record_type": "CustomObjectRecord",
        "record_ids": [
          640362830
        ]
      }
    ],
    "feature_links": [
      {
        "link_type": "Depends on",
        "link_type_id": 20,
        "created_at": "2017-12-04T23:30:00.000Z",
        "parent_record": {
          "id": "1007868956",
          "reference_num": "PRJ1-1",
          "name": "Feature 1",
          "created_at": "2017-12-04T23:30:00.000Z",
          "url": "http://account1.example.org/features/PRJ1-1",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
        },
        "child_record": {
          "id": "622562724",
          "reference_num": "PRJ1-2",
          "name": "Another Feature",
          "created_at": "2017-12-04T23:30:00.000Z",
          "url": "http://account1.example.org/features/PRJ1-2",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-2"
        }
      }
    ]
  }
}

PUT /api/v1/ideas/:id

Link custom object records to an idea

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the idea to be edited

PUT /api/v1/ideas/PRJ1-I-1

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1" -d '{"idea":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea": {
    "id": "58056975",
    "name": "Idea 1",
    "reference_num": "PRJ1-I-1",
    "score": 15,
    "created_at": "2017-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:09.987Z",
    "product_id": "131414752",
    "votes": 0,
    "workflow_status": {
      "id": "3259216",
      "name": "New",
      "complete": false
    },
    "description": {
      "id": "103757394",
      "body": "Description of idea 1",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

      ]
    },
    "visibility": "Visible to anyone",
    "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
    "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1",
    "product": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-12-04T23:30:00.000Z",
      "updated_at": "2017-12-04T23:30:09.998Z"
    },
    "assigned_to_user": null,
    "comments_count": 0,
    "endorsements_count": 1,
    "score_facts": [
      {
        "id": "244026645",
        "value": 10,
        "name": "Effort"
      },
      {
        "id": "394452137",
        "value": 5,
        "name": "Benefit"
      }
    ],
    "tags": [
      "Infrastructure"
    ],
    "categories": [
      {
        "id": "972845454",
        "name": "Hard disk drive",
        "parent_id": 552935478,
        "created_at": "2017-12-04T23:30:00.000Z"
      }
    ],
    "custom_fields": [
      {
        "key": "custom_scorecard_definition",
        "name": "Some custom scorecard definition",
        "value": 11,
        "type": "scorecard",
        "score_facts": [
          {
            "id": "84642379",
            "value": 10,
            "name": "Effort"
          }
        ]
      },
      {
        "key": "component",
        "name": "Component",
        "value": "web",
        "type": "array"
      }
    ],
    "custom_object_links": [

    ]
  }
}

PUT /api/v1/initiatives/:id

Link custom object records to an initiative

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the initiative to be edited

PUT /api/v1/initiatives/423077122

Example CURL command

curl "https://secure.aha.io/api/v1/initiatives/423077122" -d '{"initiative":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "initiative": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "initiative": {
    "id": "423077122",
    "name": "Initiative 1",
    "status": "not_started",
    "effort": 10,
    "value": 70,
    "presented": true,
    "start_date": "2017-11-04",
    "end_date": "2017-12-18",
    "position": 1,
    "created_at": "2017-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:00.000Z",
    "url": "http://account1.example.org/initiatives/423077122",
    "resource": "http://account1.example.org/api/v1/initiatives/423077122",
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    "workflow_status": {
      "id": "53968949",
      "name": "Not Started",
      "complete": false
    },
    "description": {
      "id": "1007208146",
      "body": "Description of project1_initiative1",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

      ]
    },
    "attachments": [

    ],
    "comments_count": 1,
    "goals": [

    ],
    "features": [
      {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2017-12-04T23:30:00.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    ],
    "releases": [
      {
        "id": "278327321",
        "reference_num": "PRJ1-R-1",
        "name": "Release 1",
        "start_date": "2017-12-11",
        "release_date": "2017-12-11",
        "parking_lot": false,
        "created_at": "2017-12-04T23:30:00.000Z",
        "integration_fields": [
          {
            "id": "68217473",
            "name": "id",
            "value": "777",
            "integration_id": 204584239,
            "service_name": "jira",
            "created_at": "2017-12-04T23:30:00.000Z"
          }
        ],
        "url": "http://account1.example.org/releases/PRJ1-R-1",
        "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
        "owner": {
          "id": "16338845",
          "name": "John Smith",
          "email": "john.smith@account1.com",
          "created_at": "2017-12-04T23:30:00.000Z",
          "updated_at": "2017-12-04T23:30:00.000Z"
        },
        "project": {
          "id": "131414752",
          "reference_prefix": "PRJ1",
          "name": "Project 1",
          "product_line": false,
          "created_at": "2017-12-04T23:30:00.000Z"
        }
      },
      {
        "id": "161456549",
        "reference_num": "PRJ1-R-2",
        "name": "Release 2",
        "start_date": "2017-11-04",
        "release_date": "2017-12-11",
        "parking_lot": false,
        "created_at": "2017-12-04T23:30:00.000Z",
        "integration_fields": [

        ],
        "url": "http://account1.example.org/releases/PRJ1-R-2",
        "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-2",
        "owner": {
          "id": "16338845",
          "name": "John Smith",
          "email": "john.smith@account1.com",
          "created_at": "2017-12-04T23:30:00.000Z",
          "updated_at": "2017-12-04T23:30:00.000Z"
        },
        "project": {
          "id": "131414752",
          "reference_prefix": "PRJ1",
          "name": "Project 1",
          "product_line": false,
          "created_at": "2017-12-04T23:30:00.000Z"
        }
      }
    ],
    "integration_fields": [

    ],
    "custom_fields": [

    ],
    "custom_object_links": [

    ]
  }
}

PUT /api/v1/goals/:id

Link custom object records to a goal

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the goal to be edited

PUT /api/v1/goals/602095703

Example CURL command

curl "https://secure.aha.io/api/v1/goals/602095703" -d '{"goal":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "goal": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "goal": {
    "id": "602095703",
    "name": "Goal 1",
    "effort": 10,
    "value": 70,
    "position": 1,
    "created_at": "2017-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:00.000Z",
    "url": "http://account1.example.org/strategic_imperatives/602095703",
    "resource": "http://account1.example.org/strategic_imperatives/602095703",
    "description": {
      "id": "258744266",
      "body": "Description of project1_strategic_imperative1",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

      ]
    },
    "success_metric": {
      "name": "Metric 1",
      "description": {
        "id": "132688270",
        "body": "Description of project1_strategic_imperative1_strategic_imperative_metric",
        "created_at": "2017-12-04T23:30:00.000Z",
        "attachments": [

        ]
      },
      "workflow_status": {
        "id": "1009437757",
        "name": "In progress",
        "complete": false
      }
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    "initiatives": [

    ],
    "comments_count": 1,
    "features": [
      {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2017-12-04T23:30:00.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    ],
    "releases": [

    ],
    "custom_fields": [

    ],
    "custom_object_links": [

    ]
  }
}

PUT /api/v1/custom_object_records/:id

Link custom table records to another custom table record

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID of the custom object record to be updated

PUT /api/v1/custom_object_records/640362830

Example CURL command

curl "https://secure.aha.io/api/v1/custom_object_records/640362830" -d '{"custom_object_record":{"custom_object_links":{"custom_table_name_submitters":[136661093]}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "custom_object_record": {
    "custom_object_links": {
      "custom_table_name_submitters": [
        136661093
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "custom_object_record": {
    "id": "640362830",
    "key": "customers",
    "custom_fields": [
      {
        "key": "name",
        "name": "Name",
        "value": "Acme Corp",
        "type": "string"
      },
      {
        "key": "website",
        "name": "Website",
        "value": "www.acme.com",
        "type": "url"
      }
    ],
    "custom_object_links": [
      {
        "key": "custom_table_name",
        "name": "Custom Table Linked Records",
        "record_type": "CustomObjectRecord",
        "record_ids": [
          1059223798
        ]
      },
      {
        "key": "custom_table_name_submitters",
        "name": "Custom Table Linked Submitters",
        "record_type": "CustomObjectRecord",
        "record_ids": [
          136661093
        ]
      }
    ]
  }
}

Overview

API Resources