curl --request GET \
--url https://www.closient.com/epcis/api/2.0/queries/{query_name}/events \
--header 'X-API-Key: <api-key>'import requests
url = "https://www.closient.com/epcis/api/2.0/queries/{query_name}/events"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://www.closient.com/epcis/api/2.0/queries/{query_name}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.closient.com/epcis/api/2.0/queries/{query_name}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/epcis/api/2.0/queries/{query_name}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.closient.com/epcis/api/2.0/queries/{query_name}/events")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/epcis/api/2.0/queries/{query_name}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"epcisBody": {
"queryResults": {
"queryName": "myQuery",
"resultsBody": {
"eventList": [
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"/01/00012345678906/21/SERIAL001"
],
"eventID": "urn:uuid:f47ac10b-58cc-4372-a567-0e02b2c3d479",
"eventTime": "2026-08-25T03:40:00+00:00",
"eventTimeZoneOffset": "+00:00",
"recordTime": "2026-08-25T03:40:05+00:00",
"type": "ObjectEvent"
}
]
}
}
},
"type": "EPCISQueryDocument"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Run a named query
The events a named query selects, as a JSON-LD EPCISQueryDocument whose queryResults carry the queryName and resultsBody.eventList (GS1 EPCIS 2.0 REST binding, GET /queries/{queryName}/events). Same order and pagination as GET /events: newest first; while more remain, Link (rel="next") names the next page. The WebSocket subscription mode of this endpoint (stream or a schedule) is not supported and is refused with 400. 404 if your organization has no query of that name.
curl --request GET \
--url https://www.closient.com/epcis/api/2.0/queries/{query_name}/events \
--header 'X-API-Key: <api-key>'import requests
url = "https://www.closient.com/epcis/api/2.0/queries/{query_name}/events"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://www.closient.com/epcis/api/2.0/queries/{query_name}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.closient.com/epcis/api/2.0/queries/{query_name}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/epcis/api/2.0/queries/{query_name}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.closient.com/epcis/api/2.0/queries/{query_name}/events")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/epcis/api/2.0/queries/{query_name}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"epcisBody": {
"queryResults": {
"queryName": "myQuery",
"resultsBody": {
"eventList": [
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": [
"/01/00012345678906/21/SERIAL001"
],
"eventID": "urn:uuid:f47ac10b-58cc-4372-a567-0e02b2c3d479",
"eventTime": "2026-08-25T03:40:00+00:00",
"eventTimeZoneOffset": "+00:00",
"recordTime": "2026-08-25T03:40:05+00:00",
"type": "ObjectEvent"
}
]
}
}
},
"type": "EPCISQueryDocument"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Path Parameters
The name the query was created with (POST /queries).
Query Parameters
Maximum number of events to return per page (1-100, default 30). When more remain, the response carries a Link header with rel="next".
1 <= x <= 100Cursor for the next page. The Link header's next-page URL already carries it; opaque to the client — do not construct or modify.
^[^\x00]{0,}$Response
OK
200 response body for GET /queries/{queryName}/events: a JSON-LD EPCISQueryDocument.
Shaped as the standard's epcisQueryDocument: queryResults.queryName names the
query and queryResults.resultsBody.eventList holds the events.
JSON-LD context; the EPCIS 2.0 context.
Always EPCISQueryDocument.
Envelope holding queryResults.
Show child attributes
Show child attributes
{
"queryResults": {
"queryName": "myQuery",
"resultsBody": {
"eventList": [
{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"action": "ADD",
"bizStep": "commissioning",
"disposition": "active",
"epcList": ["/01/00012345678906/21/SERIAL001"],
"eventID": "urn:uuid:f47ac10b-58cc-4372-a567-0e02b2c3d479",
"eventTime": "2026-08-25T03:40:00+00:00",
"eventTimeZoneOffset": "+00:00",
"recordTime": "2026-08-25T03:40:05+00:00",
"type": "ObjectEvent"
}
]
}
}
}