---
schema_version: "1"
id: 61327abf9fba1d15e9305a7878f62584f2fb5d99cbb46cc97c9fcd1bfb30c0de
title: HttpGet Annotation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_classes_annotation_http_get.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_http_get.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 943ab7d003f28733a258cca5904f230fd2a416b74ac1053b5e36783d7171164e
---
# HttpGet Annotation

The @HttpGet annotation is used at the method level and enables you to expose an Apex method as a REST resource. This method is called when an HTTP GET request is sent, and returns the specified resource.

These are some considerations when using this annotation:

- To use this annotation, your Apex method must be defined as global static.
- Methods annotated with @HttpGet are also called if the HTTP request uses the HEAD request method.