---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Get Hook Environment Link

Get a hook-environment link.


# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "HookEnvironmentLink": {
        "description": "Represents the link between a hook and an environment.",
        "properties": {
          "attributes": {
            "properties": {
              "events": {
                "description": "The list of events the hook is enabled for.",
                "items": {
                  "enum": [
                    "pre-init",
                    "pre-plan",
                    "post-plan",
                    "pre-apply",
                    "post-apply"
                  ],
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "events"
            ],
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "properties": {
              "self": {
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "relationships": {
            "properties": {
              "environment": {
                "description": "The environment associated with this link.",
                "properties": {
                  "data": {
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "environments",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "hook": {
                "description": "The hook associated with this link.",
                "properties": {
                  "data": {
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "hooks",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "vcs-provider": {
                "description": "The VCS provider associated with the hook.",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "vcs-providers",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "vcs-revision": {
                "description": "The Git commit information when the hook was fetched from VCS.",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "vcs-revisions",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              }
            },
            "required": [
              "hook",
              "environment"
            ],
            "type": "object"
          },
          "type": {
            "enum": [
              "hook-environment-links"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "attributes",
          "relationships"
        ],
        "type": "object"
      },
      "HookEnvironmentLinkDocument": {
        "description": "JSON:API Document.\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/HookEnvironmentLink"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/hook-environment-links/{hook_environment_link}": {
      "get": {
        "description": "Get a hook-environment link.\n",
        "operationId": "get_hook_environment_link",
        "parameters": [
          {
            "in": "path",
            "name": "hook_environment_link",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The comma-separated list of relationship paths.",
            "explode": false,
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "hook",
                  "vcs-provider",
                  "vcs-revision"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned.",
            "explode": true,
            "in": "query",
            "name": "fields",
            "required": false,
            "schema": {
              "properties": {
                "hook-environment-links": {
                  "description": "The comma-separated list of fields to return in response for HookEnvironmentLink resource.",
                  "type": "string"
                },
                "hooks": {
                  "description": "The comma-separated list of fields to return in response for Hook resource.",
                  "type": "string"
                },
                "vcs-providers": {
                  "description": "The comma-separated list of fields to return in response for VcsProvider resource.",
                  "type": "string"
                },
                "vcs-revisions": {
                  "description": "The comma-separated list of fields to return in response for VcsRevision resource.",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "style": "deepObject"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "$ref": "#/components/schemas/HookEnvironmentLinkDocument"
                }
              }
            },
            "description": "Successfully retrieved link."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Get Hook Environment Link",
        "tags": [
          "hook-environment-links"
        ],
        "x-resource": "HookEnvironmentLink",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [List Hook Environment Links](https://docs.scalr.io/scalr/reference/list_hook_environment_links.md)
* [Create Hook Environment Link](https://docs.scalr.io/scalr/reference/create_hook_environment_link.md)
* [Delete Hook Environment Link](https://docs.scalr.io/scalr/reference/delete_hook_environment_link.md)
* [Update Hook Environment Link](https://docs.scalr.io/scalr/reference/update_hook_environment_link.md)