Deploy a Website (v1)
Deploy a website. Files is a map of file paths to file contents. Configuration is optional and contains additional information about the deployment.
Request Body
application/json
The files to deploy, a map of file paths to file contents, e.g. { "index.js": {"content": "your main", "encoding": "utf-8"}, "file2.js": {"content": "your helper" } }
Do not include node modules in this bundle, they will not work. Instead, includes a package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock, the node modules for the project will be installed from that lock file, or use the node_modules field in the configuration to specify the node modules to install.
Response Body
application/json
application/json
curl -X POST "https://api.freestyle.sh/web/v1/deploy" \ -H "Content-Type: application/json" \ -d '{ "files": { "index.js": { "content": "import http from \'node:http\';\\n// import { resolver } from \'./file2.js\';\\n\\nconsole.log(\'starting server\');\\n\\nconst server = http.createServer(async(req, res) => {\\n // wait 5 seconds before responding\\n // await new Promise((resolve) => setTimeout(resolve, 5000));\\n res.writeHead(200, { \'Content-Type\': \'text/plain\' });\\n res.end(\'Welcome to New York its been waiting for you\');\\n});\\n\\nserver.listen(3000, () => {\\n console.log(\'Server is running at http://localhost:3000\');\\n});" } } }'{
"deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"domains": [
"string"
],
"entrypoint": "string"
}{
"message": "string"
}Delete a Git identity
Delete a Git identity. This will revoke all permissions granted to this identity. **DEPRECATED:** Git identities have been promoted to global Freestyle identities used for provisioning resources scoped to customers. Please use the `/identity/v1/*` API instead.
Get the permission of an identity on a repository
Get the permission of an identity on a repository. This will return the access level of the identity on the repository. **DEPRECATED:** Git identities have been promoted to global Freestyle identities used for provisioning resources scoped to customers. Please use the `/identity/v1/*` API instead.