Class NodeInfoEndpoint

java.lang.Object
org.aktin.broker.rest.NodeInfoEndpoint

@Path("/broker/node/")
public class NodeInfoEndpoint
extends Object
  • Constructor Details

    • NodeInfoEndpoint

      public NodeInfoEndpoint()
  • Method Details

    • allNodes

      @GET @Produces("application/xml") public javax.ws.rs.core.Response allNodes()
      Retrieve a list of registered nodes with the broker.
      Returns:
      JSON list of nodes
    • getNodeInfo

      @GET @Path("{id}") @Produces("application/xml") public Node getNodeInfo​(@PathParam("id") int nodeId)
      Retrieve information about a single node.
      Parameters:
      nodeId - node id
      Returns:
      status 200 with node info or status 404 if not found.
    • getNodeResource

      @GET @Path("{node}/{resource}") public javax.ws.rs.core.Response getNodeResource​(@PathParam("node") int nodeId, @PathParam("resource") String resourceId) throws SQLException
      Retrieve a named resource uploaded previously by the specified node.

      Last modified and eTag headers will be set. The eTag is calculated url-safe-base64(sha-256(data)).

      Parameters:
      nodeId - node id
      resourceId - resource id
      Returns:
      status 200 with node info or status 404 if not found.
      Throws:
      SQLException - sql error