All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.influxdb.client.service.DashboardsService Maven / Gradle / Ivy

package com.influxdb.client.service;

import retrofit2.Call;
import retrofit2.http.*;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;

import com.influxdb.client.domain.AddResourceMemberRequestBody;
import com.influxdb.client.domain.Cell;
import com.influxdb.client.domain.CellUpdate;
import com.influxdb.client.domain.CreateCell;
import com.influxdb.client.domain.CreateDashboardRequest;
import com.influxdb.client.domain.Dashboard;
import com.influxdb.client.domain.Dashboards;
import com.influxdb.client.domain.Error;
import com.influxdb.client.domain.LabelMapping;
import com.influxdb.client.domain.LabelResponse;
import com.influxdb.client.domain.LabelsResponse;
import com.influxdb.client.domain.PatchDashboardRequest;
import com.influxdb.client.domain.ResourceMember;
import com.influxdb.client.domain.ResourceMembers;
import com.influxdb.client.domain.ResourceOwner;
import com.influxdb.client.domain.ResourceOwners;
import com.influxdb.client.domain.View;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface DashboardsService {
  /**
   * Delete a dashboard
   * 
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Void>
   */
  @DELETE("api/v2/dashboards/{dashboardID}")
  Call deleteDashboardsID(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Delete a dashboard cell
   * 
   * @param dashboardID The ID of the dashboard to delete. (required)
   * @param cellID The ID of the cell to delete. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Void>
   */
  @DELETE("api/v2/dashboards/{dashboardID}/cells/{cellID}")
  Call deleteDashboardsIDCellsID(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Path("cellID") String cellID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Delete a label from a dashboard
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param labelID The ID of the label to delete. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Void>
   */
  @DELETE("api/v2/dashboards/{dashboardID}/labels/{labelID}")
  Call deleteDashboardsIDLabelsID(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Path("labelID") String labelID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Remove a member from a dashboard
   * 
   * @param userID The ID of the member to remove. (required)
   * @param dashboardID The dashboard ID. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Void>
   */
  @DELETE("api/v2/dashboards/{dashboardID}/members/{userID}")
  Call deleteDashboardsIDMembersID(
    @retrofit2.http.Path("userID") String userID, @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Remove an owner from a dashboard
   * 
   * @param userID The ID of the owner to remove. (required)
   * @param dashboardID The dashboard ID. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Void>
   */
  @DELETE("api/v2/dashboards/{dashboardID}/owners/{userID}")
  Call deleteDashboardsIDOwnersID(
    @retrofit2.http.Path("userID") String userID, @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * List all dashboards
   * 
   * @param zapTraceSpan OpenTracing span context (optional)
   * @param offset  (optional)
   * @param limit  (optional, default to 20)
   * @param descending  (optional, default to false)
   * @param owner A user identifier. Returns only dashboards where this user has the `owner` role. (optional)
   * @param sortBy The column to sort by. (optional)
   * @param id A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used. (optional, default to new ArrayList<>())
   * @param orgID The identifier of the organization. (optional)
   * @param org The name of the organization. (optional)
   * @return Call<Dashboards>
   */
  @GET("api/v2/dashboards")
  Call getDashboards(
    @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Query("offset") Integer offset, @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("descending") Boolean descending, @retrofit2.http.Query("owner") String owner, @retrofit2.http.Query("sortBy") String sortBy, @retrofit2.http.Query("id") List id, @retrofit2.http.Query("orgID") String orgID, @retrofit2.http.Query("org") String org
  );

  /**
   * Retrieve a Dashboard
   * 
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @param include Includes the cell view properties in the response if set to `properties` (optional)
   * @return Call<Dashboard>
   */
  @GET("api/v2/dashboards/{dashboardID}")
  Call getDashboardsID(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Query("include") String include
  );

  /**
   * Retrieve the view for a cell
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param cellID The cell ID. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<View>
   */
  @GET("api/v2/dashboards/{dashboardID}/cells/{cellID}/view")
  Call getDashboardsIDCellsIDView(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Path("cellID") String cellID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * List all labels for a dashboard
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<LabelsResponse>
   */
  @GET("api/v2/dashboards/{dashboardID}/labels")
  Call getDashboardsIDLabels(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * List all dashboard members
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<ResourceMembers>
   */
  @GET("api/v2/dashboards/{dashboardID}/members")
  Call getDashboardsIDMembers(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * List all dashboard owners
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<ResourceOwners>
   */
  @GET("api/v2/dashboards/{dashboardID}/owners")
  Call getDashboardsIDOwners(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Update a dashboard
   * 
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @param patchDashboardRequest  (optional)
   * @return Call<Dashboard>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @PATCH("api/v2/dashboards/{dashboardID}")
  Call patchDashboardsID(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Body PatchDashboardRequest patchDashboardRequest
  );

  /**
   * Update the non-positional information related to a cell
   * Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param cellID The ID of the cell to update. (required)
   * @param cellUpdate  (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Cell>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @PATCH("api/v2/dashboards/{dashboardID}/cells/{cellID}")
  Call patchDashboardsIDCellsID(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Path("cellID") String cellID, @retrofit2.http.Body CellUpdate cellUpdate, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Update the view for a cell
   * 
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param cellID The ID of the cell to update. (required)
   * @param view  (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<View>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @PATCH("api/v2/dashboards/{dashboardID}/cells/{cellID}/view")
  Call patchDashboardsIDCellsIDView(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Path("cellID") String cellID, @retrofit2.http.Body View view, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Create a dashboard
   * 
   * @param createDashboardRequest Dashboard to create (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Dashboard>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @POST("api/v2/dashboards")
  Call postDashboards(
    @retrofit2.http.Body CreateDashboardRequest createDashboardRequest, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Create a dashboard cell
   * 
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param createCell Cell that will be added (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Cell>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @POST("api/v2/dashboards/{dashboardID}/cells")
  Call postDashboardsIDCells(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Body CreateCell createCell, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Add a label to a dashboard
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param labelMapping Label to add (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<LabelResponse>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @POST("api/v2/dashboards/{dashboardID}/labels")
  Call postDashboardsIDLabels(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Body LabelMapping labelMapping, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Add a member to a dashboard
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param addResourceMemberRequestBody User to add as member (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<ResourceMember>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @POST("api/v2/dashboards/{dashboardID}/members")
  Call postDashboardsIDMembers(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Body AddResourceMemberRequestBody addResourceMemberRequestBody, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Add an owner to a dashboard
   * 
   * @param dashboardID The dashboard ID. (required)
   * @param addResourceMemberRequestBody User to add as owner (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<ResourceOwner>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @POST("api/v2/dashboards/{dashboardID}/owners")
  Call postDashboardsIDOwners(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Body AddResourceMemberRequestBody addResourceMemberRequestBody, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

  /**
   * Replace cells in a dashboard
   * Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
   * @param dashboardID The ID of the dashboard to update. (required)
   * @param cell  (required)
   * @param zapTraceSpan OpenTracing span context (optional)
   * @return Call<Dashboard>
   */
  @Headers({
    "Content-Type:application/json"
  })
  @PUT("api/v2/dashboards/{dashboardID}/cells")
  Call putDashboardsIDCells(
    @retrofit2.http.Path("dashboardID") String dashboardID, @retrofit2.http.Body List cell, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
  );

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy