# Event - admin - INTERFACE
Version: 2025-01

## Description
Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the
addition of a product.

### Access Scopes



## Fields
* [action](/docs/api/admin/2025-01/scalars/String): String! - The action that occured.
* [appTitle](/docs/api/admin/2025-01/scalars/String): String - The name of the app that created the event.
* [attributeToApp](/docs/api/admin/2025-01/scalars/Boolean): Boolean! - Whether the event was created by an app.
* [attributeToUser](/docs/api/admin/2025-01/scalars/Boolean): Boolean! - Whether the event was caused by an admin user.
* [createdAt](/docs/api/admin/2025-01/scalars/DateTime): DateTime! - The date and time when the event was created.
* [criticalAlert](/docs/api/admin/2025-01/scalars/Boolean): Boolean! - Whether the event is critical.
* [id](/docs/api/admin/2025-01/scalars/ID): ID! - A globally-unique ID.
* [message](/docs/api/admin/2025-01/scalars/FormattedString): FormattedString! - Human readable text that describes the event.

## Connections



## Types implemented in
* [BasicEvent](/docs/api/admin/2025-01/objects/BasicEvent)
* [CommentEvent](/docs/api/admin/2025-01/objects/CommentEvent)


## Examples
### Retrieve the first basic-event
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { event(id: \\\"gid://shopify/BasicEvent/422690323\\\") { id message ... on BasicEvent { action subjectType subject { __typename } } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query {\n    event(id: \"gid://shopify/BasicEvent/422690323\") {\n      id\n      message\n      ... on BasicEvent {\n        action\n        subjectType\n        subject {\n          __typename\n        }\n      }\n    }\n  }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query {\n    event(id: \"gid://shopify/BasicEvent/422690323\") {\n      id\n      message\n      ... on BasicEvent {\n        action\n        subjectType\n        subject {\n          __typename\n        }\n      }\n    }\n  }\nQUERY\n\nresponse = client.query(query: query)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query {\n    event(id: \"gid://shopify/BasicEvent/422690323\") {\n      id\n      message\n      ... on BasicEvent {\n        action\n        subjectType\n        subject {\n          __typename\n        }\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n  event(id: \"gid://shopify/BasicEvent/422690323\") {\n    id\n    message\n    ... on BasicEvent {\n      action\n      subjectType\n      subject {\n        __typename\n      }\n    }\n  }\n}"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "event": {
      "id": "gid://shopify/BasicEvent/422690323",
      "message": "bob bobsen included a product on Online Store: <a href=\"https://admin.myshopify.io/store/snowdevil/admin/products/440089423\">IPod Nano - 8GB</a>.",
      "action": "published",
      "subjectType": "PRODUCT",
      "subject": {
        "__typename": "Product"
      }
    }
  }
}

### Retrieves a single event
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query EventShow($id: ID!) { event(id: $id) { id action createdAt message ... on BasicEvent { arguments subjectId subjectType additionalContent } } }\",\n \"variables\": {\n    \"id\": \"gid://shopify/BasicEvent/267851118\"\n  }\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: {\n    \"query\": `query EventShow($id: ID!) {\n      event(id: $id) {\n        id\n        action\n        createdAt\n        message\n        ... on BasicEvent {\n          arguments\n          subjectId\n          subjectType\n          additionalContent\n        }\n      }\n    }`,\n    \"variables\": {\n      \"id\": \"gid://shopify/BasicEvent/267851118\"\n    },\n  },\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query EventShow($id: ID!) {\n    event(id: $id) {\n      id\n      action\n      createdAt\n      message\n      ... on BasicEvent {\n        arguments\n        subjectId\n        subjectType\n        additionalContent\n      }\n    }\n  }\nQUERY\n\nvariables = {\n  \"id\": \"gid://shopify/BasicEvent/267851118\"\n}\n\nresponse = client.query(query: query, variables: variables)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query EventShow($id: ID!) {\n    event(id: $id) {\n      id\n      action\n      createdAt\n      message\n      ... on BasicEvent {\n        arguments\n        subjectId\n        subjectType\n        additionalContent\n      }\n    }\n  }`,\n  {\n    variables: {\n      \"id\": \"gid://shopify/BasicEvent/267851118\"\n    },\n  },\n);\n\nconst data = await response.json();\n"
Graphql query: "query EventShow($id: ID!) {\n  event(id: $id) {\n    id\n    action\n    createdAt\n    message\n    ... on BasicEvent {\n      arguments\n      subjectId\n      subjectType\n      additionalContent\n    }\n  }\n}"
#### Graphql Input
{
  "id": "gid://shopify/BasicEvent/267851118"
}
#### Graphql Response
{
  "data": {
    "event": {
      "id": "gid://shopify/BasicEvent/267851118",
      "action": "unpublished",
      "createdAt": "2006-06-09T12:00:00Z",
      "message": "",
      "arguments": [],
      "subjectId": "gid://shopify/Product/630255015",
      "subjectType": "PRODUCT",
      "additionalContent": "null"
    }
  }
}