SlimProjectsResource

Reads and updates Slim projects and their users.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.24+fa54770
public final class SlimProjectsResource

Reads and updates Slim projects and their users. Get it from SlimResource.projects().

Methods

child

public ChildProjectsResource child()

Returns the child-project routes.

Returns: the child-project routes

retrieve

public JsonNode retrieve(
        String projectId,
        RequestOptions options) throws IOException, InterruptedException

Reads a project (GET /v1/slim/project/{projectId}).

Parameters:

  • projectId: the project ID
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

update

public JsonNode update(
        String projectId,
        Object body,
        RequestOptions options) throws IOException, InterruptedException

Replaces a project (PUT /v1/slim/project/{projectId}).

Parameters:

  • projectId: the project ID
  • body: the updated project
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

users

public Page<JsonNode> users(
        String projectId,
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException

Lists a project's users (GET /v1/slim/project/{projectId}/users).

Parameters:

  • projectId: the project ID
  • query: query parameters, sent as given
  • options: per-request options, such as the timeout

Returns: the first page; iterating it loads the next pages

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

currentUsers

public Page<JsonNode> currentUsers(
        Map<String, ?> query,
        RequestOptions options) throws IOException, InterruptedException

Lists the current project's users (GET /v1/slim/project/users).

Parameters:

  • query: query parameters, sent as given
  • options: per-request options, such as the timeout

Returns: the first page; iterating it loads the next pages

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

deviceCounts

public JsonNode deviceCounts(
        String projectId,
        RequestOptions options) throws IOException, InterruptedException

Reads a project's device counts (GET /v1/slim/project/{projectId}/device-counts).

Parameters:

  • projectId: the project ID
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

patientCounts

public JsonNode patientCounts(
        String projectId,
        RequestOptions options) throws IOException, InterruptedException

Reads a project's patient counts (GET /v1/slim/project/{projectId}/patient-counts).

Parameters:

  • projectId: the project ID
  • options: per-request options, such as the timeout

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Last updated on

On this page