public class AgentsClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
AgentsClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Constructor and Description |
---|
AgentsClient(AgentsClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static AgentsClient.ClientBuilder |
builder() |
Agent |
createAgent(AgentInput agent)
Creates a new agent.
|
Agent |
createAgentWithRSA(String entityId,
String agentName)
Creates a new agent with RSA Security profile.
|
Agent |
createAgentWithSharedSecret(String entityId,
String agentName)
Creates a new agent with SHARED_SECRET Security profile.
|
void |
deleteAgent(String agentId,
String ifMatch)
Deletes the agent for the given agent id.
|
AgentsList |
filterAgentsByAgentId(String filteredId)
Get agents whose id equals to the input id.
|
AgentsList |
filterAgentsByIdContains(String contains)
Get agents whose id contains the input string.
|
AgentsList |
filterAgentsByIdEndsWith(String endsWith)
Get agents whose id ends with the input string.
|
AgentsList |
filterAgentsByIdIn(String... agentIds)
Get agents whose id matches with list of input ids.
|
AgentsList |
filterAgentsByIdStartsWith(String startsWith)
Get agents whose id starts with the input string.
|
AgentsList |
filterAgentsByName(String filteredName)
Get agents with name equals to the input name.
|
AgentsList |
filterAgentsByNameContains(String contains)
Get agents whose name contains with the input string.
|
AgentsList |
filterAgentsByNameEndsWith(String endsWith)
Get agents whose name ends with the input string.
|
AgentsList |
filterAgentsByNameIn(String... agentNames)
Get agents list whose name matches the input list of names.
|
AgentsList |
filterAgentsByNameInDescendingOrder(String filteredName)
Get agents whose name matches the input.
|
AgentsList |
filterAgentsByNameStartsWith(String startsWith)
Get agents whose name starts with the input string.
|
Agent |
getAgentByID(String agentId)
Gets the agent for the given agent id.
|
OnlineStatus |
getAgentOnlineStatus(String agentId)
Gets online status of the agent.
|
AgentsList |
getAllAgents(String filter,
Integer size,
Integer page,
String sort)
Get agents for the given filter input.
|
AgentsList |
sortAgentsByEntityId()
Get agents list sorted by entity id.
|
AgentsList |
sortAgentsByEntityIdDescendening()
Get agents list sorted by descending order of entity id.
|
AgentsList |
sortAgentsById()
Get agents list sorted by id.
|
AgentsList |
sortAgentsByIdDescendening()
Get agents list sorted by descending order of id.
|
AgentsList |
sortAgentsByName()
Get agents list sorted by name.
|
AgentsList |
sortAgentsByNameDescendening()
Get agents list sorted by descending order of name.
|
AgentsList |
sortAgentsBySecurityProfile()
Get agents list sorted by security profile.
|
AgentsList |
sortAgentsBySecurityProfileDescendening()
Get agents list sorted by descending order of security profile.
|
Agent |
updateAgent(String agentId,
AgentUpdate agent,
String ifMatch)
Updates the agent for the given agent id with given parameters.
|
public AgentsClient(AgentsClient.ClientBuilder builder)
public static AgentsClient.ClientBuilder builder()
public AgentsList getAllAgents(String filter, Integer size, Integer page, String sort) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
filter
- JSON based filter.size
- The maximum number of elements in a page.page
- The (0-based) index of page.sort
- The order of returned elements. Multiple fields could be used
separated by commas (e.g. ''field1,field2'').
Descending order could be requested by appending
'',desc'' at the end of parameter.(e.g.
''field1,field2,desc'')'MindsphereException
- if an error occurs while attempting to invoke the
APIpublic void deleteAgent(String agentId, String ifMatch) throws MindsphereException
204 - No Content
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
412 - Precondition Failed
0 - unexpected error
agentId
- Unique identifier of the agent.ifMatch
- ETag number of resource.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Agent getAgentByID(String agentId) throws MindsphereException
200 - OK
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
0 - unexpected error
agentId
- Unique identifier of the agent.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Agent updateAgent(String agentId, AgentUpdate agent, String ifMatch) throws MindsphereException
200 - OK
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
409 - Resource is already available.
412 - Precondition Failed
0 - unexpected error
agentId
- Unique identifier of the agent.agent
- Agent update dto to update agent.ifMatch
- ETag number of resource.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic OnlineStatus getAgentOnlineStatus(String agentId) throws MindsphereException
200 - OK
400 - Bad Request
401 - Unauthorized
403 - Forbidden
404 - Not Found
0 - unexpected error
agentId
- Unique identifier of the agent.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Agent createAgent(AgentInput agent) throws MindsphereException
201 - Created
400 - Bad Request
401 - Unauthorized
403 - Forbidden
409 - Resource is already available.
0 - unexpected error
agent
- Object describing new agent resource.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Agent createAgentWithSharedSecret(String entityId, String agentName) throws MindsphereException
201 - Created
400 - Bad Request
401 - Unauthorized
403 - Forbidden
409 - Resource is already available.
0 - unexpected error
entityId
- entityId of the asset.agentName
- Name of the agent.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic Agent createAgentWithRSA(String entityId, String agentName) throws MindsphereException
201 - Created
400 - Bad Request
401 - Unauthorized
403 - Forbidden
409 - Resource is already available.
0 - unexpected error
entityId
- entityId of the asset.agentName
- Name of the agent.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByName(String filteredName) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
filteredName
- JSON based filter.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByNameStartsWith(String startsWith) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
startsWith
- string with which name starts.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByNameEndsWith(String endsWith) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
endsWith
- string with which name ends.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByNameContains(String contains) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
contains
- string which is a part of nameMindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByIdIn(String... agentIds) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
agentIds
- list of ids to searchMindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByAgentId(String filteredId) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
filteredId
- input id to filter.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByIdStartsWith(String startsWith) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
startsWith
- id those starts with this stringMindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByIdEndsWith(String endsWith) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
endsWith
- Agents whose id ends with this string.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByIdContains(String contains) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
contains
- Agents whose id contains this stringMindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByNameInDescendingOrder(String filteredName) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
filteredName
- name to filter.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsById() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsByIdDescendening() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsByName() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsByNameDescendening() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsByEntityId() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsByEntityIdDescendening() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsBySecurityProfile() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList sortAgentsBySecurityProfileDescendening() throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AgentsList filterAgentsByNameIn(String... agentNames) throws MindsphereException
200 - Array of agents
400 - Bad Request
401 - Unauthorized
403 - Forbidden
0 - unexpected error
agentNames
- agents whose name matches to this input list.MindsphereException
- if an error occurs while attempting to invoke the
API