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:

Field

Type

Required

Description

serviceName

String

Yes

Display name of the Secure Agent service to start or stop.

serviceName

String

Yes

Action 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.

agentId

String

Yes

The 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:

State

Description

NEED_RUNNING

The start process has been initiated.

NEED_STOP

The stop process has been initiated.

DEPLOYING

The service is being provisioned.

DEPLOYED

The service is deployed and will be running soon.

UNKNOWN

Status 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.

ERROR

The service is in a error state.

STARTING

The service is starting up.

RUNNING

The service is running and ready to accept jobs.

RESTARTING

The service is restarting and will be running soon.

STOPPING

The service is shutting down.

USER_STOPPED

The 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."
}