Interface AgentResource


@Path("agent") public interface AgentResource
This resource is for Agent specific tasks like import and discovery; normal asset/attribute CRUD operations should still use AssetResource.
  • Method Details

    • doProtocolInstanceDiscovery

      @GET @Path("instanceDiscovery/{agentType}") @Produces("application/json") @RolesAllowed("read:assets") Agent<?,?,?>[] doProtocolInstanceDiscovery(@BeanParam RequestParams requestParams, @QueryParam("parentId") String parentId, @PathParam("agentType") String agentType, @QueryParam("realm") String realm)
      Do protocol instance (Agent) discovery for the specified agent type AgentDescriptor; the associated Protocol must implement ProtocolInstanceDiscovery otherwise an empty set of results will be returned. The Asset parent where the Agent will be added should be specified so the backend can determine if the Agent is being created on an Edge gateway instance or on this local instance.
      Returns:
      A list of Agents that can be created to create a connection to the discovered instance(s).
    • doProtocolAssetDiscovery

      @GET @Path("assetDiscovery/{agentId}") @Consumes("application/json") @Produces("application/json") AssetTreeNode[] doProtocolAssetDiscovery(@BeanParam RequestParams requestParams, @PathParam("agentId") String agentId, @QueryParam("realm") String realm)
      Do Asset discovery for the specified Agent; the associated Protocol must implement ProtocolAssetDiscovery otherwise an empty set of results will be returned.

      Currently this request will automatically add the found Assets to the system as children of the specified Agent as well as returning them in the response.

    • doProtocolAssetImport

      @POST @Path("assetImport/{agentId}") @Consumes("application/json") @Produces("application/json") AssetTreeNode[] doProtocolAssetImport(@BeanParam RequestParams requestParams, @PathParam("agentId") String agentId, @QueryParam("realm") String realm, FileInfo fileInfo)
      Do Asset import for the specified Agent using the supplied FileInfo; the associated Protocol must implement ProtocolAssetImport otherwise an empty set of results will be returned.

      Currently this request will automatically add the found Assets to the system as children of the specified Agent as well as returning them in the response. NOTE: The FileInfo must be a file that the protocol understands.