HPZone_request_raw: Performs a HPZone request with the given parameters.

HPZone_request_rawR Documentation

Performs a HPZone request with the given parameters.

Description

Note that there are several helper functions that make the use of the API a lot simpler; specifically [HPZone_request()], [HPZone_request_paginated()]. This should only be used as a last resort; if manual GraphQL queries are required, [HPZone_request_query()] is highly advised instead.

Usage

HPZone_request_raw(body, scope = API_env$scope_standard)

Arguments

body

A GraphQL query to send to the HPZone API, including all necessary bracketing and JSON-elements.

scope

The desired scope; either standard or extended.

Value

An object containing the requested data points. This can be in different forms, depending on the request.

See Also

[HPZone_request()], [HPZone_request_paginated()], [HPZone_request_query()]

Examples

# Note the difference between the raw and convenience functions.
# These lines are equal:
## Not run: 
HPZone_request("cases", c("Case_creation_date", "Case_number"),
               where=c("Case_creation_date", ">=", "2025-01-01"))
HPZone_request_query(paste0('cases(where: { ',
                      'Case_creation_date: { gte: "2025-01-01" }',
                      '})',
                      '{ items { Case_creation_date, Case_number } }')
                    )
HPZone_request_raw(paste0('{"query": "{ cases(where: {',
                            'Case_creation_date: { gte: \\"2025-01-01\\" }',
                          '})',
                          '{ items { Case_creation_date, Case_number } }',
                          '}"}'))

## End(Not run)

HPZoneAPI documentation built on April 9, 2026, 5:09 p.m.