dnsimple / dnsimple-developer Goto Github PK
View Code? Open in Web Editor NEWThe DNSimple API Documentation.
Home Page: https://developer.dnsimple.com/
The DNSimple API Documentation.
Home Page: https://developer.dnsimple.com/
This appears to be used only when attempting to enable vanity codes but they're not enabled for the current plan. Code's not mentioned in https://developer.dnsimple.com/v2/#response-codes.
Something confusing related to this is that enabling vanity servers when plan doesn't support it returns 412 with this response:
{
"message": "Feature not enabled: vanity_name_servers"
}
But attempting to set regions on a record when plan doesn't support it returns 400 with this response:
{
"message": "Regions are not allowed for your plan.",
"errors": {}
}
The inconsistent error codes make it difficult to handle a "feature not enabled" response from the server. Sorry I know this isn't documentation related but not sure where it's best to bring it up. Having a different code from 400 (which I read as being invalid JSON input in the request body) would be useful.
https://github.com/dnsimple/dnsimple-developer/blob/master/content/v1/domains/records.markdown list "name" and "type" as parameters for GET /domains/:domain/records, but that does not make sense. Only ":domain" is required for listing records.
Documentation for POST
and PATCH
actions include a section to display an example of a JSON payload. We have to complete that section in several places:
This is a place to discuss the structure for API v2
In API v1, we have the following:
Categories that include nested operations that may need to live at their own level, but which do not in V1, include:
Gabriel
Now v2 is GA and the API is stable, it would be great to enhance the documentation a bit.
In many cases it's unclear whether a returned value could be null or not, and the type of data returned is not specified. It can be inferred from the example fixture, but they don't cover all cases - for example, on the Zone Records page you need to look at a couple of fixtures to know that priority
is expected to be either an integer or null.
JSON Schema seems like a logical way to document these and something than is both human and machine readable. While this could be specified for GET, POST and PATCH requests, I think it's most valuable for GET, since the inputs for POST and PATCH are already well defined in the documentation.
There are lots of ways to play with this, but at a minimum I'd want to see definitions for each of the possible return types (like a zone record, a domain, etc).
For a zone record, it would be something like:
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"oneOf":[
{
"properties":{
"type":{
"enum":[
"MX"
]
},
"priority":{
"type":"integer"
}
}
},
{
"properties":{
"type":{
"not":{
"enum":[
"MX"
]
}
},
"priority":{
"type":"null"
}
}
}
],
"properties":{
"type":{
"type":"string"
},
"priority":{
"type":[
"null",
"integer"
]
},
"id":{
"type":"integer"
},
"zone_id":{
"type":"string"
},
"parent_id":{
"type":[
"string",
"null"
]
},
"name":{
"type":"string"
},
"content":{
"type":"string"
},
"ttl":{
"type":"integer"
},
"regions":{
"type":"array",
"minItems":1,
"uniqueItems":true,
"oneOf":[
{
"items":{
"enum":[
"SV1",
"ORD",
"IAD",
"AMS",
"TKO"
]
}
},
{
"items":{
"enum":[
"global"
]
}
}
]
},
"system_record":{
"type":"boolean"
},
"created_at":{
"type":"string",
"format":"date-time"
},
"updated_at":{
"type":"string",
"format":"date-time"
}
}
}
A reasonably strict example for "List records for a zone" endpoint might look like this (this is valid), but doing this for every endpoint is a more tedious task that coming up with schemas for the objects themselves:
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"data":{
"type":"array",
"items":{
"$ref":"#/definitions/zone_record"
}
},
"pagination":{
"$ref":"#/definitions/pagination"
}
},
"definitions":{
"zone_record":{
"oneOf":[
{
"properties":{
"type":{
"enum":[
"MX"
]
},
"priority":{
"type":"integer"
}
}
},
{
"properties":{
"type":{
"not":{
"enum":[
"MX"
]
}
},
"priority":{
"type":"null"
}
}
}
],
"type":"object",
"properties":{
"type":{
"type":"string"
},
"priority":{
"type":[
"null",
"integer"
]
},
"id":{
"type":"integer"
},
"zone_id":{
"type":"string"
},
"parent_id":{
"type":[
"string",
"null"
]
},
"name":{
"type":"string"
},
"content":{
"type":"string"
},
"ttl":{
"type":"integer"
},
"regions":{
"type":"array",
"minItems":1,
"uniqueItems":true,
"oneOf":[
{
"items":{
"enum":[
"SV1",
"ORD",
"IAD",
"AMS",
"TKO"
]
}
},
{
"items":{
"enum":[
"global"
]
}
}
]
},
"system_record":{
"type":"boolean"
},
"created_at":{
"type":"string",
"format":"date-time"
},
"updated_at":{
"type":"string",
"format":"date-time"
}
}
},
"pagination":{
"type":"object",
"properties":{
"current_page":{
"type":"integer"
},
"per_page":{
"type":"integer"
},
"total_entries":{
"type":"integer"
},
"total_pages":{
"type":"integer"
}
}
}
}
}
The webhooks details page at the moment does not include examples from the different actors or the data that we send along with it.
User story:
As a customer and API integrator
I want to know how webhooks looks like and have all relevant information about webhook data at a single spot
In order to be sure what data to expect from a hook
The example return for https://dnsimple.com/domains doesn't match what the API returns. It's missing {} around the dicts.
Add support for https://developer.dnsimple.com/v2/domains/collaborators/
In https://developer.dnsimple.com/sandbox/#getting-started there is a steps that reads:
When asked to choose a plan choose
Skip this step and choose a plan later at the bottom
. If you want to test features that requires a valid subscription, including registering test domains, please refer to the Testing Subscriptions section.
This is not this way anymore, so it might be adjusted.
In mobile applications it is not possible to keep an OAuth client secret a secret, as it must be hardcoded into the application code. It is trivial to extract hard coded strings from a mobile application.
The draft DNSimple v2 OAuth documentation says "The client secret should not be shared." Given this is impossible for a mobile application, does the DNSimple OAuth implementation prevent supporting a mobile application? Or does the word "should" mean this is a recommendation that can be ignored for mobile apps?
Interested to know how the official iOS DNSimple app might change it's authentication flow for v2 as well.
Thanks!
The section http://developer.dnsimple.com/v1/#current-version is missing the expiration year for v0.
The legacy API (called v0) will no longer be available after June 30th. Please switch to API v1 as soon as possible. Read the versioned API announcement for more details.
Add the expiration year after June 30th.
Is this correct for purchasing / registering a domain?
I get the response of: {"message":"Validation failed"}
curl -H 'Authorization: Bearer '$apiv2token -H 'Accept: application/json' -H 'Content-Type: application/json' -X POST -d '{"registrant_id": 72624, "whois_privacy":false, "auto_renew": true, "premium_price": false,"extended_attributes":"com", "premium_price":null}' https://api.dnsimple.com/v2/$acctId/registrar/domains/mydomain.com/registrations
https://developer.dnsimple.com/v2/services/domains/#unapply
Store the PDF in this repo instead of via tweets.
https://twitter.com/CodeStars/status/845932130958032896
We need to document the various concepts that exist in DNSimple so that developers can understand what entities are available to them from our system.
We should release a new mini version (or major) for every single library version.
The API support CORS. CORS is used to allow AJAX cross-site requests and should be documented on the developer site.
JavaScript library references CORS: https://github.com/aetrion/dnsimple-js
The sandbox documentation at https://developer.dnsimple.com/sandbox/ is not clear on the purpose and value of the sandbox. This documentation needs to be updated to clarify why the sandbox is useful and how it should be used.
Hi,
I'm getting this error when using the API to check for domain availability:
SSL certificate problem: self signed certificate in certificate chain
How do I fix this?
Thanks
Followed the instructions documention for the vanity_name_servers
endpoint, and even by copying and pasting the sample code, the respone from the endpoint is:
{
"errors": [
"Feature not enabled"
]
}
If the feature is not yet enabled, it would be great to document that. If it is enabled, would be great to update the sample code. The response code is HTTP/1.1 400 Bad Request
.
Before the release, we should make sure that all the clients uses the same (and latest) version of the fixtures.
Ideally, we should have a task in each single repo that pulls the entire fixture folder and replaces the one in the client repo.
The current view we provide in the developer documentation is a good reference, however I would like to add an additional section that describes the various ways customers may use the API.
When sending an invalid request to create a new record, we might get an "errors" element in the JSON response:
{
"message": "Validation failed",
"errors": {
"record_type": [
"can't be blank",
"unsupported"
],
"name": [
"must be valid"
],
"content": [
"can't be blank"
]
}
}
The "errors" element isn't documented. Appears to be field level validation, but it's not clear which endpoints will return this, and the format isn't specified in the documentation.
Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
primary implementation: https://sass-lang.com/install
* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
sassc gem: https://github.com/sass/sassc-ruby#readme
* For more details, please refer to the Sass blog:
http://sass.logdown.com/posts/7081811
Simply adding a domain hosted with another registrar is not listed in the API docs โ That is, without registering/transferring a domain to Dnsimple.
Update the registrar methods to use the new URLs we decided to adopt before API v2 GA, and not the old one (singular routes).
See for reference:
Clients:
Bring from the support site:
Reading trough the Sandbox documentation I found the following statement:
This site is generally an exact duplicate of the production application [...]
it would be helpful to call the user to create a account, and make it clear that the data is not synced in any way. (That was at least my first impression)
Running rake test doesn't check all articles. We need to recursively iterate over the content folder. We currently use Dir["content/*"].each do |path|
on _test/content_test.rb
Related to dnsimple/dnsimple-support#529
Need sdks for several languages you don't have. Just want to recommend moving to swagger in case it's not been discussed yet.
I was not able to figure out what this API field actually is. Adding a description (and more meaningful examples as null
) would be helpful :)
Document the use of the domain token for authentication.
Currently the docs say:
Responding to Webhooks
To confirm receipt of a webhook, your server must respond with an HTTP 200 response. Any other response will be considered an error and may cause the event to be retried.
I think it would be more precise if a web hook is retried or not. may may be problematic ;)
The response of the register, transfer and renew commands was changed (to support async tasks). All the clients must be updated, and the developer referenced updated accordingly.
There is a method to add a subscription or get its details, but I miss one to get available plans to use. For example GET /plans
and GET /plans/:name
{ "name": "Platinum",
"price": 50,
"domains": 500,
"domain_price": 0.1 }
API documented in #142
It now includes a DNSimple driver.
According to RFC 6749 "state" is only used in authorization request and authorization response. However in the DNSimple implementation (in the sandbox at any rate) it's required at step 2 as a POST parameter. This isn't in compliance with the spec, and also isn't documented in the DNSimple docs.
Request for this to be implemented in the API:
the client will be able to negotiate an access token by sending a request authenticated using the basic auth and account username/password, along with the necessary OTP token (if the account is protected via 2FA).
Refer #49 (comment).
Doc says PUT /:account/domains/:domain/name_servers
but the curl sample uses POST
In https://github.com/aetrion/dnsimple-developer/blob/master/content/v2/domains/name-servers.markdown
http://developer.dnsimple.com/domains/certificates/#purchase-a-certificate
The documentation should include the wants_csr
param documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.