Skip to the page
Social CrawlDocs

API routes and scopes

Updated
View as Markdown

Every route of the Social Crawl API with its method, path and the token scopes that may call it. Made from the controllers, so it matches the code.

On this page

The API is a NestJS application. This page lists all 141 routes. It is generated from the controllers by yarn workspace @social-crawl/docs routes, so a route that exists in the code is in this table.

Authentication#

Every route needs a bearer token (Authorization: Bearer <token>) unless the table says public. A token has a scope:

ScopeHow you get itLifetimeWhat it may do
webPOST /auth/login with the password7 daysEverything that lists web, which is every route without a Scopes decorator.
capturePOST /auth/extension-token (needs a web token)180 daysOnly the routes that list capture: saving a post, looking one up, and sending videos. It cannot read or delete a library.
restrictedPOST /auth/unlock with the second password12 hoursNot a login token. It is sent in the header x-restricted-token with a web token to see the restricted part.

A route with no @Scopes accepts web only. A wrong scope answers 403, a missing token 401.

The web app does not expose these routes to the browser directly. It keeps the token in an httpOnly cookie and forwards only an allowlist of routes through /api/.... See Architecture.

The temporary share links people open (/s/<secret>/...) are pages of the web app. They read the public routes /share/:token/... and /share-collection/:token/... below, which need no token because the secret in the address is the key. See Shares and downloads.

Bodies are JSON up to 20 MB. Cross-origin calls are allowed only from the origins in CORS_ORIGINS.

Attachments#

MethodPathScopesHandler
GET/bookmarks/:id/attachmentswebattachments.controller.ts list
GET/attachments/titlewebattachments.controller.ts title
POST/bookmarks/:id/attachments/postswebattachments.controller.ts posts
POST/bookmarks/:id/attachments/linkwebattachments.controller.ts link
POST/bookmarks/:id/attachments/filewebattachments.controller.ts file
GET/bookmarks/:id/attachments/:attachmentId/filewebattachments.controller.ts download
DELETE/bookmarks/:id/attachments/:attachmentIdwebattachments.controller.ts remove

Big videos: upload, join, convert#

MethodPathScopesHandler
GET/big-uploads/limitsweb, capturebig-uploads.controller.ts limits
GET/big-uploadsweb, capturebig-uploads.controller.ts list
POST/big-uploadsweb, capturebig-uploads.controller.ts start
POST/big-uploads/sweepweb, capturebig-uploads.controller.ts sweep
GET/big-uploads/:idweb, capturebig-uploads.controller.ts get
GET/big-uploads/:id/fileweb, capturebig-uploads.controller.ts file
GET/big-uploads/:id/oneweb, capturebig-uploads.controller.ts one
POST/big-uploads/:id/joinweb, capturebig-uploads.controller.ts join
DELETE/big-uploads/:id/joinweb, capturebig-uploads.controller.ts stopJoin
DELETE/big-uploads/:id/oneweb, capturebig-uploads.controller.ts removeOne
GET/big-uploads/:id/joinedweb, capturebig-uploads.controller.ts joined
POST/big-uploads/:id/parts/:n/pieces/:iweb, capturebig-uploads.controller.ts piece
POST/big-uploads/:id/parts/:n/abortweb, capturebig-uploads.controller.ts abortPart
POST/big-uploads/:id/finishweb, capturebig-uploads.controller.ts finish
POST/big-uploads/:id/linkweb, capturebig-uploads.controller.ts link
POST/big-uploads/:id/checkweb, capturebig-uploads.controller.ts startCheck
GET/big-uploads/:id/checkweb, capturebig-uploads.controller.ts checkJob
POST/big-uploads/:id/check/stopweb, capturebig-uploads.controller.ts stopCheck
DELETE/big-uploads/:idweb, capturebig-uploads.controller.ts remove
GET/big-uploads/:id/convertwebconvert.controller.ts status
POST/big-uploads/:id/convertwebconvert.controller.ts offer
POST/big-uploads/:id/convert/gowebconvert.controller.ts go
POST/big-uploads/:id/convert/ownwebconvert.controller.ts attachOwn
DELETE/big-uploads/:id/convertwebconvert.controller.ts stop
POST/big-uploads/:id/convert/remove-rawwebconvert.controller.ts removeRaw
GET/big-uploads/:id/convertingwebconvert.controller.ts live
GET/big-uploads/:id/convertedwebconvert.controller.ts copy
GET/convert-queuewebconvert.controller.ts queue

Capture: uploads and fetches by the extension#

MethodPathScopesHandler
POST/capture/fetchesweb, capturefetches.controller.ts start
GET/capture/fetches/:idweb, capturefetches.controller.ts get
POST/capture/uploadsweb, captureuploads.controller.ts create
POST/capture/uploads/:id/pieces/:indexweb, captureuploads.controller.ts append
POST/capture/uploads/:id/doneweb, captureuploads.controller.ts finish
DELETE/capture/uploads/:idweb, captureuploads.controller.ts release

Database copy and delete#

MethodPathScopesHandler
GET/settings/databasewebdatabase-migration.controller.ts status
POST/settings/database/checkwebdatabase-migration.controller.ts check
POST/settings/database/copywebdatabase-migration.controller.ts copy
POST/settings/database/cancelwebdatabase-migration.controller.ts cancel
GET/settings/database/oldwebold-database.controller.ts status
POST/settings/database/old/checkwebold-database.controller.ts check
POST/settings/database/old/deletewebold-database.controller.ts delete

Health#

MethodPathScopesHandler
GET/healthnone (public)health.controller.ts check

Layouts#

MethodPathScopesHandler
GET/layoutsweblayouts.controller.ts list
POST/layoutsweblayouts.controller.ts create
PUT/layouts/:idweblayouts.controller.ts update
DELETE/layouts/:idweblayouts.controller.ts remove

Posts (bookmarks)#

MethodPathScopesHandler
POST/posts/previewwebbookmarks.controller.ts preview
POST/bookmarkswebbookmarks.controller.ts create
POST/captureweb, capturebookmarks.controller.ts capture
GET/capture/lookupweb, capturebookmarks.controller.ts lookup
GET/bookmarkswebbookmarks.controller.ts list
GET/bookmarks/:idwebbookmarks.controller.ts get
PATCH/bookmarks/:idwebbookmarks.controller.ts update
DELETE/bookmarks/:id/media/:mediaIdwebbookmarks.controller.ts removeMedia
POST/bookmarks/:id/media/:mediaId/fileweb, capturebookmarks.controller.ts attachUpload
POST/bookmarks/:id/media/:mediaId/preparewebbookmarks.controller.ts prepareMedia
POST/bookmarks/:id/media/:mediaId/renditionswebbookmarks.controller.ts requestRendition
DELETE/bookmarks/:id/media/:mediaId/renditions/:heightwebbookmarks.controller.ts removeRendition
POST/bookmarks/:id/media/:mediaId/captionswebbookmarks.controller.ts addCaption
GET/settings/speechwebbookmarks.controller.ts speech
POST/bookmarks/:id/media/:mediaId/transcriptwebbookmarks.controller.ts requestTranscript
DELETE/bookmarks/:id/media/:mediaId/transcriptwebbookmarks.controller.ts removeTranscript
DELETE/bookmarks/:id/media/:mediaId/captionswebbookmarks.controller.ts removeCaption
GET/bookmarks/:id/media-jobswebbookmarks.controller.ts mediaJobsOf
DELETE/bookmarks/:idwebbookmarks.controller.ts remove
GET/bookmarks/:id/downloadwebbookmarks.controller.ts download
GET/bookmarks/:id/media/:mediaId/clipwebbookmarks.controller.ts clip
GET/bookmarks/:id/markdownwebbookmarks.controller.ts markdown
GET/bookmarks/:id/files/*pathwebbookmarks.controller.ts file
GET (stream)/eventswebevents.controller.ts stream
POST/auth/unlockwebrestricted.controller.ts unlock
GET/restrictedwebrestricted.controller.ts status
GET/restricted/bookmarkswebrestricted.controller.ts list
POST/restricted/bookmarks/:idwebrestricted.controller.ts restrict
DELETE/restricted/bookmarks/:idwebrestricted.controller.ts unrestrict
GET/restricted/ruleswebrestricted.controller.ts rules
POST/restricted/ruleswebrestricted.controller.ts addRule
DELETE/restricted/rules/:idwebrestricted.controller.ts removeRule
MethodPathScopesHandler
GET/yt-link/statuswebyt-link.controller.ts status
GET/yt-link/logwebyt-link.controller.ts log
POST/yt-link/probewebyt-link.controller.ts probe
POST/yt-link/doctorwebyt-link.controller.ts doctor
GET/yt-link/jobswebyt-link.controller.ts jobs
POST/yt-link/jobswebyt-link.controller.ts add
GET/yt-link/jobs/:idwebyt-link.controller.ts job
POST/yt-link/jobs/:id/cancelwebyt-link.controller.ts cancel
POST/yt-link/jobs/:id/retrywebyt-link.controller.ts retry
POST/yt-link/jobs/:id/discardwebyt-link.controller.ts discard
DELETE/yt-link/jobs/:idwebyt-link.controller.ts forget

Settings#

MethodPathScopesHandler
GET/settings/videowebsettings.controller.ts video
PUT/settings/videowebsettings.controller.ts saveVideo
MethodPathScopesHandler
POST/collection-shareswebcollection-shares.controller.ts create
GET/collection-shareswebcollection-shares.controller.ts list
POST/collection-shares/:shareId/extendwebcollection-shares.controller.ts extend
DELETE/collection-shares/:shareIdwebcollection-shares.controller.ts remove
GET/share-collection/:token/p/:n/files/*pathnone (public)collection-shares.controller.ts file
GET/share-collection/:token/p/:n/downloadnone (public)collection-shares.controller.ts downloadOne
GET/share-collection/:token/downloadnone (public)collection-shares.controller.ts downloadAll
GET/share-collection/:token/markdownnone (public)collection-shares.controller.ts markdown
GET/share-collection/:token/postsnone (public)collection-shares.controller.ts posts
POST/bookmarks/:id/shareswebshares.controller.ts create
GET/bookmarks/:id/shareswebshares.controller.ts list
POST/bookmarks/:id/shares/:shareId/extendwebshares.controller.ts extend
DELETE/bookmarks/:id/shares/:shareIdwebshares.controller.ts remove
GET/share/:tokennone (public)shares.controller.ts meta
GET/share/:token/files/*pathnone (public)shares.controller.ts file
GET/share/:token/downloadnone (public)shares.controller.ts download

Sign-in and tokens#

MethodPathScopesHandler
POST/auth/loginnone (public)auth.controller.ts login
POST/auth/extension-tokenwebauth.controller.ts extensionToken

The extension download#

MethodPathScopesHandler
GET/extension/downloadwebextension.controller.ts download

The lab (testing only)#

MethodPathScopesHandler
GET/lab/statusweb, capture (needs LabEnabled)lab.controller.ts status
POST/lab/probeweb, capture (needs LabEnabled)lab.controller.ts probe
POST/lab/generatedweb, capture (needs LabEnabled)lab.controller.ts generated
GET/lab/jobs/:idweb, capture (needs LabEnabled)lab.controller.ts job
POST/lab/jobs/:id/stopweb, capture (needs LabEnabled)lab.controller.ts stop
POST/lab/discardweb, capture (needs LabEnabled)lab.controller.ts discard
POST/lab/uploadsweb, capture (needs LabEnabled)lab.controller.ts create
GET/lab/uploads/:idweb, capture (needs LabEnabled)lab.controller.ts state
POST/lab/uploads/:id/parts/:n/pieces/:iweb, capture (needs LabEnabled)lab.controller.ts piece
POST/lab/uploads/:id/parts/:n/abortweb, capture (needs LabEnabled)lab.controller.ts abortPart
POST/lab/uploads/:id/finishweb, capture (needs LabEnabled)lab.controller.ts finish
POST/lab/uploads/:id/verifyweb, capture (needs LabEnabled)lab.controller.ts verify
DELETE/lab/uploads/:idweb, capture (needs LabEnabled)lab.controller.ts remove
POST/lab/sweepweb, capture (needs LabEnabled)lab.controller.ts sweep
DELETE/lab/allweb, capture (needs LabEnabled)lab.controller.ts removeAll

The queue#

MethodPathScopesHandler
GET/jobswebjobs.controller.ts list

WebDAV and storage places#

MethodPathScopesHandler
GET/settings/webdavwebwebdav.controller.ts view
PUT/settings/webdavwebwebdav.controller.ts save
POST/settings/webdav/testwebwebdav.controller.ts test
POST/bookmarks/:id/webdav/copywebwebdav.controller.ts copy
POST/bookmarks/:id/webdav/move-largewebwebdav.controller.ts moveLarge
GET/settings/storagewebwebdav.controller.ts names
GET/bookmarks/:id/storagewebwebdav.controller.ts location
POST/bookmarks/:id/storage/keepwebwebdav.controller.ts keep