{"openapi":"3.1.0","info":{"title":"CodeRook public API","version":"1","description":"Read public CodeRook projects without signing in, and serve an app's updates from a public project. Each project states its owner's wishes about AI use; a project that refuses automated downloads answers 403 and says so. Guide: https://coderook.com/docs#public-api","contact":{"name":"CodeRook","url":"https://coderook.com/contact"}},"servers":[{"url":"https://api.coderook.com/v1/public"}],"externalDocs":{"url":"https://coderook.com/docs","description":"How CodeRook works"},"tags":[{"name":"projects","description":"Public projects and their versions."},{"name":"app updates","description":"Serving an app's updates from a public project. Name releases like 1.2.3 and attach the installers; electron-updater's generic provider reads the feed directly.","externalDocs":{"url":"https://coderook.com/docs#app-updates"}}],"paths":{"/projects":{"get":{"tags":["projects"],"summary":"Public projects, newest first","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search words."}],"responses":{"200":{"description":"Projects.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}":{"get":{"tags":["projects"],"summary":"One project","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."}],"responses":{"200":{"description":"The project.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions":{"get":{"tags":["projects"],"summary":"The versions it offers","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."}],"responses":{"200":{"description":"Versions, newest first.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/activity":{"get":{"tags":["projects"],"summary":"Saves per week, for the last six months","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."}],"responses":{"200":{"description":"Weekly counts.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/files":{"get":{"tags":["projects"],"summary":"Every file in a version, with sizes and SHA-256","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."}],"responses":{"200":{"description":"Files.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/file":{"get":{"tags":["projects"],"summary":"One file's contents","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."},{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"The file's path in the project."}],"responses":{"200":{"description":"The file."},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/readme":{"get":{"tags":["projects"],"summary":"The version's README","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."}],"responses":{"200":{"description":"The README.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/archive":{"get":{"tags":["projects"],"summary":"The whole version as a zip","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."}],"responses":{"200":{"description":"application/zip"},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/attachments":{"get":{"tags":["projects","app updates"],"summary":"Files attached to a version, such as installers","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."}],"responses":{"200":{"description":"Attachments, each with size and digest.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/attachments/{id}":{"get":{"tags":["projects","app updates"],"summary":"Download one attachment","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The file."},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/versions/{version}/last-changes":{"get":{"tags":["projects"],"summary":"Which version last changed each entry of a folder","description":"The file list's \"Last change\" column: for every entry directly inside `path` (the project's root when empty), the newest published version that changed it, with its message and date. `orEarlier` is true when the walk back stopped first.","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"A version number (42), a release name (1.2.3), a version id, or `latest`."},{"name":"path","in":"query","required":false,"schema":{"type":"string"},"description":"A folder in the project; empty for the root."}],"responses":{"200":{"description":"Entries by name.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/releases":{"get":{"tags":["app updates"],"summary":"Every release the project offers, newest first, with its downloads","description":"Each release's name, notes and date, whether its source can be browsed (`sourcePublic`) or only its downloads, and every attached file with its size, SHA-256 and download address. A release whose downloads were made public on their own is listed here although its version's files are not.","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."}],"responses":{"200":{"description":"Releases with their files.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/releases/latest":{"get":{"tags":["app updates"],"summary":"The newest named release and every file on it","description":"For an app deciding whether to update: the release's version and notes, and each attached file with its size, SHA-256 and download address.","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."}],"responses":{"200":{"description":"The release and its files.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/updates":{"get":{"tags":["app updates"],"summary":"Which update feeds the project can serve, or why it cannot yet","description":"Give `/projects/{owner}/{slug}/updates` to electron-updater's generic provider as its url. `problem` says what to fix when the newest release cannot be served (a name that is not like 1.2.3, or nothing attached).","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."}],"responses":{"200":{"description":"Feed status and the feed files available.","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/projects/{owner}/{slug}/updates/{file}":{"get":{"tags":["app updates"],"summary":"An electron-updater feed, or a file on the newest release","description":"`latest.yml`, `latest-mac.yml` and `latest-linux.yml` are the feed, with each installer's size and SHA-512. Any other name redirects to that file's download; a name that is not there is 404, which an updater reads as no differential update.","parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string"},"description":"The owner's username."},{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The project's short name."},{"name":"file","in":"path","required":true,"schema":{"type":"string"},"example":"latest.yml"}],"responses":{"200":{"description":"The feed.","content":{"text/yaml":{"schema":{"type":"string"}}}},"302":{"description":"A file on the newest release, sent on to its download."},"403":{"description":"The project's owner has asked that automated tools not download it.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public project, version or file. A private project answers this way too.","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"The newest release cannot be served: its name is not like 1.2.3, or it has nothing attached.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/profiles/{username}":{"get":{"tags":["projects"],"summary":"A public profile","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The profile.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No such public profile.","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}