Agentservice

Use this resource to stop or start a Secure Agent service.

After you send a POST request to start or stop a Secure Agent service, you can check the status of the service using the REST API V2 agent resourc

POST request

To stop or start a Secure Agent service, use the following URI:

public/core/v3/agent/service

Include the following fields in the request:

FieldTypeRequiredDescription
serviceNameStringYesDisplay name of the Secure Agent service to start or stop.
serviceNameStringYesAction to perform on the Secure Agent service. Include one of the following values:
start. Start the latest version of the Secure Agent service.
stop. Stop all versions of the Secure Agent service.
agentIdStringYesThe ID of the agent on which the Secure Agent service is located.
To find the ID, send a lookup POST request that includes the agent path

POST response

If the request is successful, the response includes one of the following states for the service:

StateDescription
NEED_RUNNINGThe start process has been initiated.
NEED_STOPThe stop process has been initiated.
DEPLOYINGThe service is being provisioned.
DEPLOYEDThe service is deployed and will be running soon.
UNKNOWNStatus is unknown. Check the status using the REST API version 2 agent resource.
To find the status, send a lookup POST request that includes the agent path.
ERRORThe service is in a error state.
STARTINGThe service is starting up.
RUNNINGThe service is running and ready to accept jobs.
RESTARTINGThe service is restarting and will be running soon.
STOPPINGThe service is shutting down.
USER_STOPPEDThe service has been stopped by a user.

POST request example

To start a Secure Agent service, you might send a request similar to the following example:

POST <baseApiUrl>/public/core/v3/agent/service
Content-Type: application/json
Accept: application/json
INFA-SESSION-ID: <sessionId>
{
    "serviceName":"Data Integration",
    "serviceAction":"start",
    "agentId":"kiphQJoRWWJfaC3enJ1smP"
}

POST response example

If a request is successful, you might receive a response similar to the following example:

{
    "serviceState":"STARTING",
    "message":"Successfully initiated start action. Note that only the latest version of the service will be started. Send a GET request to  /v2/agent/details API to check the updated status of the service."
}