v2.0
post
/ec-query-svc/rest/v2.0/studies/{studyId}/{mode}/queryCount
Returns selected lifecycle-state counts grouped by subject and event/instance in the supplied study and mode. Use this POST read operation for query counters rather than query records. Requires QueryGetAll, subject to caller visibility.
Request
Path Parameters
-
mode(required): string
Study mode. Allowed values: test (testing sandbox), training (training environment), and active (production).Example:
test -
studyId(required): string(uuid)
Study UUID: 32 hexadecimal characters or standard 36-character hyphenated UUID.Example:
A1B23C45D67E89F123456789ABCDEF12
Supported Media Types
- application/json
Root Schema : QueryCountPostDTO v2.0
Type:
objectTitle:
QueryCountPostDTO v2.0Query count request payload.
Show Source
-
states(required): array
states
Unique Items Required:
trueRequired non-empty set of case-sensitive lifecycle states. Only selected state counters are returned; totalQueries sums those selected counters. -
subjects(required): array
subjects
Required subject UUID list. Existing service validation accepts 1 to 100 subjects in the study. Counts remain limited by caller site access and hidden-item visibility.
Nested Schema : states
Type:
arrayUnique Items Required:
trueRequired non-empty set of case-sensitive lifecycle states. Only selected state counters are returned; totalQueries sums those selected counters.
Show Source
-
Array of:
string
Required non-empty set of case-sensitive lifecycle states. Only selected state counters are returned; totalQueries sums those selected counters.Example:
["Candidate","Opened","Answered"]
Example:
[
"Candidate",
"Opened",
"Answered"
]Nested Schema : subjects
Type:
arrayRequired subject UUID list. Existing service validation accepts 1 to 100 subjects in the study. Counts remain limited by caller site access and hidden-item visibility.
Show Source
-
Array of:
string(uuid)
Required subject UUID list. Existing service validation accepts 1 to 100 subjects in the study. Counts remain limited by caller site access and hidden-item visibility.
Example:
[
"762744769B0E4E40B6A74691179BC578"
]Examples
Back to Top
Response
Supported Media Types
- application/json
200 Response
Query counts returned successfully.
Root Schema : QueryCountResults v2.0
Type:
objectTitle:
QueryCountResults v2.0Query Count result payload
Show Source
-
errorData: string
Optional error payload when status is failed.Example:
null -
result: array
result
Query count detail rows
-
status: string
Operation status. Allowed values: success, failed.Example:
success -
version: string
Schema version of the response wrapper.Example:
2
Example:
{
"status":"success",
"version":"2",
"errorData":null,
"result":[
{
"subjectName":"TestSite1184",
"subjectId":"762744769B0E4E40B6A74691179BC578",
"eventId":"3B95322B15144E4397B30305EB33E871",
"eventInstanceNumber":null,
"candidate":0,
"opened":1,
"answered":0,
"deleted":0,
"closed":0,
"totalQueries":1
}
]
}Nested Schema : result
Type:
arrayQuery count detail rows
Show Source
-
Array of:
object QueryCountResults Entry v2.0
Title:
QueryCountResults Entry v2.0Query Count result payload entry
Nested Schema : QueryCountResults Entry v2.0
Type:
objectTitle:
QueryCountResults Entry v2.0Query Count result payload entry
Show Source
-
answered: integer
(int32)
Answered query count for the subject/event combinationExample:
0 -
candidate: integer
(int32)
Candidate query count for the subject/event combinationExample:
0 -
closed: integer
(int32)
Closed query count for the subject/event combinationExample:
0 -
deleted: integer
(int32)
Deleted query count for the subject/event combinationExample:
0 -
eventId: string
Event unique identifierExample:
3B95322B15144E4397B30305EB33E871 -
eventInstanceNumber: integer
(int32)
Event instance (repeat) numberExample:
1 -
opened: integer
(int32)
Open query count for the subject/event combinationExample:
1 -
subjectId: string
Subject unique identifierExample:
762744769B0E4E40B6A74691179BC578 -
subjectName: string
Subject display nameExample:
TestSite1184 -
totalQueries: integer
(int32)
Total queries for the provided state filtersExample:
1
Example:
{
"subjectName":"TestSite1184",
"subjectId":"762744769B0E4E40B6A74691179BC578",
"eventId":"3B95322B15144E4397B30305EB33E871",
"eventInstanceNumber":null,
"candidate":0,
"opened":1,
"answered":0,
"deleted":0,
"closed":0,
"totalQueries":1
}Examples
400 Response
Request validation failed due to missing, invalid, or inconsistent request data.
Root Schema : Response DTO
Type:
objectBase envelope returned by Query APIs. Use the status field to determine whether result or errorData is populated.
Show Source
-
errorData: object
Error details DTO
Standard structure used to describe errors returned by Query APIs.
-
result: object
result
Result payload returned when status equals success.
-
status: string
Read Only:
trueAllowed Values:[ "success", "failed" ]Overall execution status. Value is success when result is populated and failed when errorData is returned.Example:success -
version: string
Read Only:
trueSemantic version of the response envelope.Example:1
Nested Schema : Error details DTO
Type:
objectStandard structure used to describe errors returned by Query APIs.
Show Source
-
details: object
QueryRestErrorDetail
Read Only:
trueContext object returned when additional error metadata is available. -
errorCode: string
Read Only:
trueMachine-readable error code that identifies the failure.Example:QRY-5000 -
errorMessage: string
Read Only:
trueHuman-readable explanation describing why the request failed.Example:Unexpected server error.
Example:
{
"errorCode":"QRY-5000",
"errorMessage":"Unexpected server error.",
"details":{
"requestId":"3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a",
"supportCode":"QRY-5000",
"hint":"Retry request after verifying the study mode."
}
}Nested Schema : result
Type:
objectResult payload returned when status equals success.
Example:
{
"opened":3,
"answered":1,
"closed":2
}Nested Schema : QueryRestErrorDetail
Type:
objectRead Only:
trueContext object returned when additional error metadata is available.
Show Source
-
hint: string
Client-facing guidance that clarifies how to resolve or retry the request.Example:
Retry request after verifying the study mode. -
requestId: string
Unique identifier that can be supplied to Oracle Support when troubleshooting.Example:
3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a -
supportCode: string
Support or incident code associated with the error source.Example:
QRY-5000
Example:
{
"requestId":"3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a",
"supportCode":"QRY-5000",
"hint":"Retry request"
}Examples
404 Response
Not-found response. Empty count retrieval actually returns HTTP 204; the empty-array example illustrates the logical no-result payload, not a guaranteed HTTP 404 response.
Root Schema : QueryCountResults v2.0
Type:
objectTitle:
QueryCountResults v2.0Query Count result payload
Show Source
-
errorData: string
Optional error payload when status is failed.Example:
null -
result: array
result
Query count detail rows
-
status: string
Operation status. Allowed values: success, failed.Example:
success -
version: string
Schema version of the response wrapper.Example:
2
Example:
{
"status":"success",
"version":"2",
"errorData":null,
"result":[
{
"subjectName":"TestSite1184",
"subjectId":"762744769B0E4E40B6A74691179BC578",
"eventId":"3B95322B15144E4397B30305EB33E871",
"eventInstanceNumber":null,
"candidate":0,
"opened":1,
"answered":0,
"deleted":0,
"closed":0,
"totalQueries":1
}
]
}Nested Schema : result
Type:
arrayQuery count detail rows
Show Source
-
Array of:
object QueryCountResults Entry v2.0
Title:
QueryCountResults Entry v2.0Query Count result payload entry
Nested Schema : QueryCountResults Entry v2.0
Type:
objectTitle:
QueryCountResults Entry v2.0Query Count result payload entry
Show Source
-
answered: integer
(int32)
Answered query count for the subject/event combinationExample:
0 -
candidate: integer
(int32)
Candidate query count for the subject/event combinationExample:
0 -
closed: integer
(int32)
Closed query count for the subject/event combinationExample:
0 -
deleted: integer
(int32)
Deleted query count for the subject/event combinationExample:
0 -
eventId: string
Event unique identifierExample:
3B95322B15144E4397B30305EB33E871 -
eventInstanceNumber: integer
(int32)
Event instance (repeat) numberExample:
1 -
opened: integer
(int32)
Open query count for the subject/event combinationExample:
1 -
subjectId: string
Subject unique identifierExample:
762744769B0E4E40B6A74691179BC578 -
subjectName: string
Subject display nameExample:
TestSite1184 -
totalQueries: integer
(int32)
Total queries for the provided state filtersExample:
1
Example:
{
"subjectName":"TestSite1184",
"subjectId":"762744769B0E4E40B6A74691179BC578",
"eventId":"3B95322B15144E4397B30305EB33E871",
"eventInstanceNumber":null,
"candidate":0,
"opened":1,
"answered":0,
"deleted":0,
"closed":0,
"totalQueries":1
}Examples
500 Response
Returned when an unexpected error occurs while retrieving query counts.
Root Schema : Response DTO
Type:
objectBase envelope returned by Query APIs. Use the status field to determine whether result or errorData is populated.
Show Source
-
errorData: object
Error details DTO
Standard structure used to describe errors returned by Query APIs.
-
result: object
result
Result payload returned when status equals success.
-
status: string
Read Only:
trueAllowed Values:[ "success", "failed" ]Overall execution status. Value is success when result is populated and failed when errorData is returned.Example:success -
version: string
Read Only:
trueSemantic version of the response envelope.Example:1
Nested Schema : Error details DTO
Type:
objectStandard structure used to describe errors returned by Query APIs.
Show Source
-
details: object
QueryRestErrorDetail
Read Only:
trueContext object returned when additional error metadata is available. -
errorCode: string
Read Only:
trueMachine-readable error code that identifies the failure.Example:QRY-5000 -
errorMessage: string
Read Only:
trueHuman-readable explanation describing why the request failed.Example:Unexpected server error.
Example:
{
"errorCode":"QRY-5000",
"errorMessage":"Unexpected server error.",
"details":{
"requestId":"3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a",
"supportCode":"QRY-5000",
"hint":"Retry request after verifying the study mode."
}
}Nested Schema : result
Type:
objectResult payload returned when status equals success.
Example:
{
"opened":3,
"answered":1,
"closed":2
}Nested Schema : QueryRestErrorDetail
Type:
objectRead Only:
trueContext object returned when additional error metadata is available.
Show Source
-
hint: string
Client-facing guidance that clarifies how to resolve or retry the request.Example:
Retry request after verifying the study mode. -
requestId: string
Unique identifier that can be supplied to Oracle Support when troubleshooting.Example:
3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a -
supportCode: string
Support or incident code associated with the error source.Example:
QRY-5000
Example:
{
"requestId":"3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a",
"supportCode":"QRY-5000",
"hint":"Retry request"
}Examples