-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Lua record usage with the API. #9310
Comments
@libesz were you able to figure out what the API wants here? I've tried sending in: {
"name": "lua.exxampled.com",
"type": "LUA",
"ttl": 3600,
"changetype": "REPLACE",
"records": [{
"content": "A \\"\'1.2.3.4\'\\"",
"disabled": false
}]
} And a bunch of other variants without any luck. I went into the DB backing my local pdns server and created the above record with SQL. When I query with {
"comments": [],
"name": "lua.exxampled.com.",
"records": [{
"content": "A \\"\'1.2.3.4\'\\"",
"disabled": false
}],
"ttl": 3600,
"type": "LUA"
} which seems to match up afaict. No matter what I do I end up getting a 422:
|
I've tried the other way around, by creating a Lua record through an open-source solution like Unfortunately, the API responds with |
What does the server log report in this case? |
It's been long enough that I don't really remember. I definitely wasn't hitting 500 errors though. My end conclusion was that the lua support in API wasn't particularly polished. Wonder if Poweradmin is using it. If so maybe it's worth looking at what it's doing. |
Short description
I could not find Lua record usage description with the API explained in the documentation. I could figure out based on the generic SQL examples that the record type should be
LUA
instead of i.e.A
and then the content should contain the record type, followed by the quoted script. However the record format in general is briefly explained, this is not straightforward. I would suggest to add this to the API docs here and here.Environment
The text was updated successfully, but these errors were encountered: