Skip to content
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

Improve the example payload from Netlify for creating a new instance #18

Open
keiko713 opened this issue Jul 5, 2019 · 2 comments
Open

Comments

@keiko713
Copy link

keiko713 commented Jul 5, 2019

https://github.com/netlify/addons#payload-from-netlify-1 this example payload from Netlify is the following:

{
  // Unique ID generated by Netlify
  uuid: '2e65dd70-523d-48d8-8826-a93229d7ec01',
  account: '5902622bcf321c7359e97e52',
  config: {
    site_url: 'https://calling-site-from-netlify.netlify.com',
    jwt: {
      secret: 'xyz-netlify-secret'
    },
    // User defined configuration values
    config: {
      name: 'woooooo'
    },
    // Netlify Site id
    site_id: '2e65dd70-523d-48d8-8826-a93229d7ec01',
    // Your service ID slug
    service_id: 'express-example',
    service_instance: {
      config: { name: 'woooooo' }
    },
    // If your add-on needs to trigger site rebuilds we will send a build hook
    incoming_hook_url: 'https://api.netlify.com/build_hooks/123xyz'
  }
}

this is unclear what is actually coming and what is just an example. in fact, by default, we don't pass most of them.

also, it's worth to mention that uuid is actually site_id of the netlify, that'd be a useful information for some providers.

cc/ @rybit

@rybit
Copy link
Member

rybit commented Jul 5, 2019

I think that the uuid should be tied to the instance itself (e.g. it's oid) and then we add site_id right next to the account.

@keiko713
Copy link
Author

keiko713 commented Jul 6, 2019

I'm +1 fo making site_id for the top level of POST payload (e.g. uuid, account_id, site_id are guaranteed to be there), but I'd like to be careful about the uuid being the different value as some existing addons might be relying on that being a site_id and/or uuid type (oid is not uuid type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants