Giter VIP home page Giter VIP logo

dnsimple-developer's People

Contributors

3flex avatar aeden avatar ags4no avatar dallasread avatar dependabot[bot] avatar depfu[bot] avatar dje avatar doctoraw avatar dperrymorrow avatar duduribeiro avatar dxtimer avatar ecomba avatar fvdm avatar ggalmazor avatar gilesbowkett avatar jacegu avatar jcaudle avatar jodosha avatar juankuquintana avatar kntsoriano avatar lokst avatar looby avatar martinisoft avatar olemchls avatar onlyhavecans avatar san983 avatar sbastn avatar tdurk93 avatar tfarina avatar weppos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnsimple-developer's Issues

Document 412 status code in "Response Codes" section

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.

Define side bar structure for API v2

This is a place to discuss the structure for API v2

In API v1, we have the following:

  • Overview
    • Authentication
  • Domains
    • Records
    • Sharing
    • Email Forwards
    • Zones
  • Registration
    • Prices
    • Auto Renewal
    • WHOIS Privacy
    • Extended Attributes
  • Name Servers
    • Vanity Name Servers
  • SSL Certificates
  • Contacts
  • Services
    • Domain Services
  • Templates
    • Records
    • Domain Templates
  • Users
  • Subscriptions

Categories that include nested operations that may need to live at their own level, but which do not in V1, include:

  • Domains defines operations for domain CRUD as well as reset domain token and push a domain.
  • Registration defines operations for register, transfer, renew, transfer out and check domain availability.
  • Name Servers defines both operations on domain name servers as well as operations to register and de-register name servers at the registry.
  • Domain Services covers applied and available services, as well as applying and unapplying a service
  • Domain Templates covers applying a template

Request: JSON Schema for API v2

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"
        }
      }
    }
  }
}

Include webhook data examples

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

OAuth client secret cannot be kept secret on mobile applications

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!

register / purchase domain w/ curl

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

Document domain model

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.

SSL Certificate Problem

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

vanity_name_servers endpoint not enabled

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.

Publish use cases

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.

Document error responses

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

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

Match style of the support site

Bring from the support site:

  • A label that identifies the site as "developer".
  • Typography: font-stack, styles.
  • Colors
  • Categories list on the left.
  • High-res logo.

Clarify sandbox data separation

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)

Publish API via swagger?

Need sdks for several languages you don't have. Just want to recommend moving to swagger in case it's not been discussed yet.

Clarify web hook reliability

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 ;)

List available plans

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 }

OAuth: DNSimple requires undocumented "state" parameter in token request

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.

v2: Authentication for non-web apps

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.