Hi,
I’m trying to register a new gateway through the v3 API. I’ve had success with registering/deleting devices, but the API for the gateways seems to be confusing me.
I have the usual headers with bearer token etc.
The raw data I’m sending is
{
“gateway”: {“ids”:
{
“gateway_id”: “eui-c0ee40ffffxxxxx”,
“eui”: “xxxxxxxxxxxxxxxx”
},
“name”: “test-gateway”,
“gateway_server_address”: “tenant_name.eu1.cloud.thethings.industries”,
“frequency_plan_id”: “AS_923”
}
}
The POST request is as follows
https://tenant_name.eu1.cloud.thethings.industries/api/v3/users/username@tenant_name/gateways
And the response I get back is as follows
{
“code”: 3,
“message”: “error:pkg/errors:validation (invalid collaborator
: embedded message failed validation)”,
“details”: [
{
“@type”: “type.googleapis.com/ttn.lorawan.v3.ErrorDetails”,
“namespace”: “pkg/errors”,
“name”: “validation”,
“message_format”: “invalid {field}
: {reason}”,
“attributes”: {
“field”: “collaborator”,
“name”: “CreateGatewayRequestValidationError”,
“reason”: “embedded message failed validation”
},
“correlation_id”: “e30da9e72fcf4f1a8e9a79266b26823c”,
“cause”: {
“namespace”: “pkg/errors”,
“name”: “validation”,
“message_format”: “invalid {field}
: {reason}”,
“attributes”: {
“field”: “user_ids”,
“name”: “OrganizationOrUserIdentifiersValidationError”,
“reason”: “embedded message failed validation”
},
“correlation_id”: “078e82453c7b468ca8ee2cd0a3718f41”,
“cause”: {
“namespace”: “pkg/errors”,
“name”: “validation”,
“message_format”: “invalid {field}
: {reason}”,
“attributes”: {
“field”: “user_id”,
“name”: “UserIdentifiersValidationError”,
“reason”: “value does not match regex pattern "^a-z0-9{1,}$"”
},
“correlation_id”: “43236594c2444191bfbeaca494c739e6”,
“code”: 3
},
“code”: 3
},
“code”: 3
}
]
}
Many thanks