I’m following along with this tutorial to deploy a basic API
After I create the site I get the id from the response and do a POST request to
https://api.netlify.com/api/v1/sites/:site_id/deploys
with site_id being the id from the previous response.
my body contains:
{
"files":{
"index.html":"bbc833bfbb64ec792f262d940fe27ebaebae01a4",
"first.html": "c5045de396718f8bed7d275a5db66889f8ba8fcb",
"second.html": "60a485665b50c25c0ac83b23417ac588421c6bb6",
"third.html": "9b780b93bf552555404bc5b13951fa568a005904"
}
}
this is what I get as a response:
{
"id": "5fb42dc5579f7a191c8945db",
"site_id": "8640475d-9f19-4d34-b47f-5a0a19351f5f",
"build_id": null,
"state": "new",
"name": "tender-lalande-6e744f",
"url": "http://tender-lalande-6e744f.netlify.app",
"ssl_url": "https://tender-lalande-6e744f.netlify.app",
"admin_url": "https://app.netlify.com/sites/tender-lalande-6e744f",
"deploy_url": "http://5fb42dc5579f7a191c8945db--tender-lalande-6e744f.netlify.app",
"deploy_ssl_url": "https://5fb42dc5579f7a191c8945db--tender-lalande-6e744f.netlify.app",
"created_at": "2020-11-17T20:08:37.230Z",
"updated_at": "2020-11-17T20:08:37.285Z",
"user_id": "5f472bba5c2911c32b69b797",
"error_message": null,
"required": [],
"required_functions": null,
"commit_ref": null,
"review_id": null,
"branch": null,
"commit_url": null,
"skipped": null,
"locked": null,
"log_access_attributes": {
"type": "firebase",
"url": "https://netlify-builds4.firebaseio.com/deploys/5fb42dc5579f7a191c8945db/log",
"endpoint": "https://netlify-builds4.firebaseio.com",
"path": "/deploys/5fb42dc5579f7a191c8945db/log",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2IjowLCJpYXQiOjE2MDU2NDM3MTcsImQiOnsidWlkIjoiIn19.HQ5v-JTK12J4hf6U3S4YK8_WyEy1QQn1S6ab35PFcS0"
},
"title": null,
"review_url": null,
"published_at": null,
"context": "production",
"deploy_time": null,
"available_functions": [],
"screenshot_url": null,
"site_capabilities": {
"title": "Netlify Team Free",
"asset_acceleration": true,
"form_processing": true,
"cdn_propagation": "partial",
"build_node_pool": "buildbot-external-ssd",
"domain_aliases": true,
"secure_site": false,
"prerendering": true,
"proxying": true,
"ssl": "custom",
"rate_cents": 0,
"yearly_rate_cents": 0,
"ipv6_domain": "cdn.makerloop.com",
"branch_deploy": true,
"managed_dns": true,
"geo_ip": true,
"split_testing": true,
"id": "nf_team_dev",
"cdn_tier": "reg"
},
"committer": null,
"skipped_log": null,
"manual_deploy": true,
"file_tracking_optimization": true,
"plugin_state": "none",
"has_edge_handlers": false
}
shouldn’t the state have a value of “uploading” and the required key have a list of the shasums that need to be uploaded?
if I try to continue on and do a PUT request with a file in it I get back
{
"code": 401,
"message": "Access Denied: deploy must be in , not new"
}
I’m not sure what I’m doing wrong all the docs I read seem to not have any help on this.