Create an agent for the Network Connector.
Requirements
- Have authorization with access and read and write permissions to the System resource, granted by the administrator in A2A.
Method and endpoint
POST /api/system/nc/agent
Request parameters
The following parameters must be sent in the request body:
Parameter |
Type |
Required |
Description |
name |
string |
Yes |
Name of the Network Connector Agent to be created. |
Agent name restrictions
- Maximum: 255 characters
- Allowed characters: a-z, A-Z, 0-9,
-
, _
, +
, =
, #
, @
, $
, [
, ]
, (
, )
, {
, }
- Note: The name must be unique, and there cannot be another active agent with the same name.
Request Example
{
"name": "agent-example"
}
cURL
curl -X POST "https://{URL}/api/system/nc/agent" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name": "agent-example"}'
Status code
201 CREATED
Response
{
"response": {
"status": 201,
"error": false,
"error_code": 0,
"message": "Agent created successfully."
},
"agent": {
"id": "1",
"name": "Default",
"port": "30000",
"fingerprint": "Zk9YalVUVDRaeWh2b0FKb29uWmhESk44VVdqcEZkSE1qSUZKMkREUjlOdz06Um1kSlUyWlRSbkYwVEZCb2ExUjNRenAzUkhkellXMVJhMWQyWldad1NXSnI="
}
}
Response fields
Field |
Type |
Description |
agent |
object |
Created Agent data. |
agent.id |
int |
Unique identification code of the Agent automatically generated by Segura. |
agent.name |
string |
Name of the connector/agent. |
agent.port |
string |
Port number automatically generated by the system to connect the Agent to the instance. |
agent.fingerprint |
string |
Unique hash automatically generated by the system to connect the Agent to the port. Note: Sensitive information. If the Enable sensitive information encryption option is enabled, this information will be protected. To view it, download the decryption key. Learn more in First steps with A2A APIs. |
Possible errors
Code |
Message |
Cause |
400 |
Invalid agent name |
The sent name does not meet the defined restrictions. |
403 |
Lack of permission |
The user does not have the appropriate permissions to create an Agent. |