{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a goal relationship by adding a supporting resource to a given goal.\n\nReturns the newly created goal relationship record.","properties":{"path":{"type":"object","properties":{"goal_gid":{"type":"string","examples":["12345"],"description":"Globally unique identifier for the goal."}},"required":["goal_gid"],"additionalProperties":false},"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging."},"opt_fields":{"type":"array","items":{"type":"string","enum":["contribution_weight","resource_subtype","supported_goal","supported_goal.name","supported_goal.owner","supported_goal.owner.name","supporting_resource","supporting_resource.name","supporting_resource.resource_subtype"]},"examples":[["contribution_weight","resource_subtype","supported_goal","supported_goal.name","supported_goal.owner","supported_goal.owner.name","supporting_resource","supporting_resource.name","supporting_resource.resource_subtype"]],"description":"This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the [input/output options guide](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"data":{"$ref":"#/definitions/GoalAddSupportingRelationshipRequest"}}}},"required":["path","body"],"additionalProperties":false,"definitions":{"GoalAddSupportingRelationshipRequest":{"type":"object","required":["supporting_resource"],"properties":{"supporting_resource":{"description":"The gid of the supporting resource to add to the parent goal. Must be the gid of a goal, project, task, or portfolio.","type":"string","examples":["12345"]},"insert_before":{"description":"An id of a subgoal of this parent goal. The new subgoal will be added before the one specified here. `insert_before` and `insert_after` parameters cannot both be specified. Currently only supported when adding a subgoal.","type":"string","examples":["1331"]},"insert_after":{"description":"An id of a subgoal of this parent goal. The new subgoal will be added after the one specified here. `insert_before` and `insert_after` parameters cannot both be specified. Currently only supported when adding a subgoal.","type":"string","examples":["1331"]},"contribution_weight":{"description":"Defines how much the supporting goal’s progress contributes to the parent goal’s overall progress. When used with automatically calculated [Goal Metrics](/reference/creategoalmetric) (such as `progress_source = subgoal_progress`), this value must be greater than 0 for the subgoal to count toward the parent goal’s progress.\nAccepts a number between 0 and 1 (inclusive). Defaults to `0`.","type":"number","examples":[0]}}}}},"name":"Add a supporting goal relationship","id":"asana.addsupportingrelationship","example":{"path":{"goal_gid":"12345"},"body":{}},"maxRequests":1,"summary":false}}