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
  • Study mode. Allowed values: test (testing sandbox), training (training environment), and active (production).
    Example:
    test
  • Study UUID: 32 hexadecimal characters or standard 36-character hyphenated UUID.
    Example:
    A1B23C45D67E89F123456789ABCDEF12
Supported Media Types
Request Body - application/json ()
Root Schema : QueryCountPostDTO v2.0
Type: object
Title: QueryCountPostDTO v2.0
Query count request payload.
Show Source
  • states
    Unique Items Required: true
    Required non-empty set of case-sensitive lifecycle states. Only selected state counters are returned; totalQueries sums those selected counters.
  • 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: array
Unique Items Required: true
Required non-empty set of case-sensitive lifecycle states. Only selected state counters are returned; totalQueries sums those selected counters.
Show Source
  • 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: array
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.
Show Source
  • 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

200 Response

Query counts returned successfully.
Body ()
Root Schema : QueryCountResults v2.0
Type: object
Title: QueryCountResults v2.0
Query Count result payload
Show Source
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: array
Query count detail rows
Show Source
Nested Schema : QueryCountResults Entry v2.0
Type: object
Title: QueryCountResults Entry v2.0
Query Count result payload entry
Show Source
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.
Body ()
Root Schema : Response DTO
Type: object
Base envelope returned by Query APIs. Use the status field to determine whether result or errorData is populated.
Show Source
Nested Schema : Error details DTO
Type: object
Standard structure used to describe errors returned by Query APIs.
Show Source
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: object
Result payload returned when status equals success.
Example:
{
    "opened":3,
    "answered":1,
    "closed":2
}
Nested Schema : QueryRestErrorDetail
Type: object
Read Only: true
Context object returned when additional error metadata is available.
Show Source
  • Client-facing guidance that clarifies how to resolve or retry the request.
    Example: Retry request after verifying the study mode.
  • Unique identifier that can be supplied to Oracle Support when troubleshooting.
    Example: 3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a
  • 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.
Body ()
Root Schema : QueryCountResults v2.0
Type: object
Title: QueryCountResults v2.0
Query Count result payload
Show Source
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: array
Query count detail rows
Show Source
Nested Schema : QueryCountResults Entry v2.0
Type: object
Title: QueryCountResults Entry v2.0
Query Count result payload entry
Show Source
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.
Body ()
Root Schema : Response DTO
Type: object
Base envelope returned by Query APIs. Use the status field to determine whether result or errorData is populated.
Show Source
Nested Schema : Error details DTO
Type: object
Standard structure used to describe errors returned by Query APIs.
Show Source
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: object
Result payload returned when status equals success.
Example:
{
    "opened":3,
    "answered":1,
    "closed":2
}
Nested Schema : QueryRestErrorDetail
Type: object
Read Only: true
Context object returned when additional error metadata is available.
Show Source
  • Client-facing guidance that clarifies how to resolve or retry the request.
    Example: Retry request after verifying the study mode.
  • Unique identifier that can be supplied to Oracle Support when troubleshooting.
    Example: 3b3b8f31-87a3-4dd2-8b9d-21d0c93ef27a
  • 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

Back to Top