Create or update endpoint
Create a new endpoint or replace the configuration of an existing one by external ID.
Create a new endpoint, or update an existing one. The first call for a given externalId creates the endpoint. Later calls replace its configuration (capabilities, subscriptions, and endpoint type).
Agrirouter OAuth2 authentication for QA environment.
In: header
Scope: endpoints:manage
Path Parameters
Application-defined external ID of the endpoint. SHOULD be formatted as a
URN as defined by RFC 8141 (e.g. urn:my-app:endpoint:42). The urn:
prefix itself is optional for backwards compatibility, but the value must
always contain a namespace identifier and a namespace-specific string
separated by a colon. The URN namespace identifier and namespace-specific
string allow applications to scope their endpoint IDs in a stable,
globally unique way.
^([uU][rR][nN]:)?[a-zA-Z0-9][a-zA-Z0-9-]{0,31}:[a-zA-Z0-9()+,\-.:=@;$_!*%/?#]+$3 <= length <= 255Header Parameters
The farmer's tenant ID in relation to which communication is done.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.agrirouter.com/endpoints/string" \ -H "x-agrirouter-tenant-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "application_id": "48ac72d0-a829-4896-a067-dcb1c2b0f30c", "software_version_id": "bf49a8b1-ef30-484c-a74f-431a9921fa41", "capabilities": [ { "message_type": "iso:11783:-10:taskdata:zip", "direction": "SEND" } ], "subscriptions": [ { "message_type": "iso:11783:-10:taskdata:zip" } ], "endpoint_type": "cloud_software" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"external_id": "string",
"application_id": "48ac72d0-a829-4896-a067-dcb1c2b0f30c",
"software_version_id": "bf49a8b1-ef30-484c-a74f-431a9921fa41",
"endpoint_type": "cloud_software",
"tenant_id": "string",
"capabilities": [
{
"message_type": "iso:11783:-10:taskdata:zip",
"direction": "SEND"
}
],
"allow_delete_by_user": false,
"connections_uri": "http://example.com",
"owner_endpoint_external_id": "string"
}{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"external_id": "string",
"application_id": "48ac72d0-a829-4896-a067-dcb1c2b0f30c",
"software_version_id": "bf49a8b1-ef30-484c-a74f-431a9921fa41",
"endpoint_type": "cloud_software",
"tenant_id": "string",
"capabilities": [
{
"message_type": "iso:11783:-10:taskdata:zip",
"direction": "SEND"
}
],
"allow_delete_by_user": false,
"connections_uri": "http://example.com",
"owner_endpoint_external_id": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}Owner (parent) endpoint
An endpoint can be given an owner (parent) endpoint by setting the optional owner_endpoint_external_id field to the external ID of another endpoint. This models a parent–child relationship between two endpoints — for example a platform endpoint that owns the machine endpoints it manages.
The referenced owner endpoint must belong to the same tenant and the same application as the endpoint being created or updated. If it does not — or if the external ID cannot be resolved — the request is rejected with 400.
Because PUT replaces the endpoint's full configuration, the owner is treated like any other attribute: send owner_endpoint_external_id on every request that should keep the owner, and omit it to leave the endpoint without an owner (which also clears a previously set owner).
Endpoint state is propagated asynchronously, so an owner endpoint that was just created may not be resolvable immediately. The gateway retries resolution for a few seconds before giving up. If the request still fails with 400, retry it once the owner endpoint has been created.
Deleting an owner endpoint also deletes all endpoints it owns. See Delete endpoint and the endpoint lifecycle.