capabilities method

Future<HttpBody> capabilities(
  1. String name, {
  2. String? $fields,
})

Gets the FHIR capability statement (STU3, R4), or the conformance statement in the DSTU2 case for the store, which contains a description of functionality supported by the server.

Implements the FHIR standard capabilities interaction (STU3, R4), or the conformance interaction in the DSTU2 case. On success, the response body contains a JSON-encoded representation of a CapabilityStatement resource.

Request parameters:

name - Required. Name of the FHIR store to retrieve the capabilities for. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/datasets/\[^/\]+/fhirStores/\[^/\]+$.

$fields - Selector specifying which fields to include in a partial response.

Completes with a HttpBody.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<HttpBody> capabilities(
  core.String name, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/fhir/metadata';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return HttpBody.fromJson(response_ as core.Map<core.String, core.dynamic>);
}