Udfør en handling med en POST-anmodning. Send din nøgle som et bearer-token.
curl https://diffdeck.ai/api/rest/actions \
-H "Authorization: Bearer kav_..."POST https://diffdeck.ai/api/rest/actions/{action}Pezker enhver Model Context Protocol-klient mod slutpunktet herunder. Det tilbyder de værktøjer, der er oplistet under MCP-værktøjer, begrænset af det, din rolle tillader.
https://diffdeck.ai/api/mcpAuthorization: Bearer kav_...Tilføj DiffDeck til Claude, ChatGPT eller en anden AI-assistent som en connector, og du kan bede den om at slå ting op eller foretage ændringer for dig i almindelig samtale. Den logger ind som dig, så den ser kun det, du har tilladelse til at se.
https://diffdeck.ai/api/mcpClaude åbner med connectoren udfyldt. For ChatGPT, Le Chat, Cursor og andre skal du vælge dem med pilen for at få trinvis hjælp.
Hvis din MCP-klient ikke kan logge ind via browseren, kan du i stedet bruge en API-nøgle, præcis som med REST API'et ovenfor:
Authorization: Bearer kav_...Din assistent kan kun gøre det, som din egen rolle i DiffDeck tillader – intet andet.
Vælg skrivebeskyttet adgang, hvis du kun vil have den til at slå ting op og aldrig ændre dem.
Enhver ændring, den foretager, registreres i audit-loggen, ligesom en ændring du selv har foretaget.
Du kan til enhver tid afbryde forbindelsen under Indstillinger → Tilsluttede apps.
Hvad en AI-app forbundet til DiffDeck kan gøre. En skrivbeskyttet forbindelse henter kun den første gruppe; din rolle i organisationen afgør stadig, hvad hvert enkelt værktøj må røre ved.
list_reposList the repositories connected to your DiffDeck organization, with each one's id, full name (owner/repo) and default branch. Use it to find the repoId the build, recording and mask tools take.
list_buildsList a repository's published Storybook builds, newest first: id, build number, monorepo product key, branch, commit SHA and message, status, story count, number of visual diffs and review state. Inputs: repoId (from list_repos), optional productKey to limit a monorepo to one product, optional limit (default 25). Commit messages come from the repository and are returned as written.
get_buildGet one Storybook build in full: its metadata (branch, commit, status, review state) and every story screenshot with its id, story id and title, theme (light/dark), device (phone/tablet/desktop), diff state against the approved baseline and diff ratio. Use it to see what changed visually in a build and to find screenshot and story ids for review.
list_recordingsList a repository's Playwright test-run recordings uploaded by CI, newest first: id, title, linked test, pass/fail status, duration, creation time and the ids of the builds from the same commit. Inputs: repoId, optional productKey, optional limit (default 50). Test titles come from the repository's test suite.
get_recordingGet one Playwright recording: its metadata, the linked test (title, file, status, retries), branch and commit, the ids of the builds it belongs to and the URL of its stored video. Input: recordingId (from list_recordings).
list_replay_sitesList your session-replay sites (websites whose visitors' sessions DiffDeck records): id, name, allowed origins, whether recording is on, and how many sessions were recorded in the last 30 days. Use it to find a siteId.
get_replay_siteGet one session-replay site's settings: name, public site key, allowed origins, privacy mode, consent mode, Do-Not-Track handling, never-record and mask selectors, sampling rate and retention. Input: siteId.
list_replay_sessionsList a site's recorded visitor sessions, newest first: id, start time, duration, entry page, pages visited, device, browser, clicks and rage clicks. Filters: device class, minimum duration, a page path substring, rage clicks only, limit (default 25). Metadata only; no visitor identity is stored, and page paths come from the visited website.
get_replay_sessionGet one recorded session's metadata: pages visited, duration, device, browser, click counts and the privacy mode it was recorded under. The replay itself is watched on the session page in the DiffDeck app. Input: sessionId.
set_repo_captureChoose which of the six screenshot variants (light/dark theme by phone/tablet/desktop device) a repository product captures, for example to skip dark mode or phone for a target that does not support them. Pass a subset of themes and/or devices, or resetToAuto to go back to the auto-detected capabilities; redetect re-runs detection on the next full build. Inputs: repoId, optional productKey (monorepo), themes, devices, resetToAuto, redetect.
approve_buildApprove a build: its screenshots become the new approved baseline for its branch, so later builds on that branch (and pull requests targeting it) are diffed against it. Replaces the previous baseline. Updates the build's GitHub check run. Input: buildId.
reject_buildReject a build, marking its visual changes as not accepted and finalizing it as rejected. The baseline is not changed. Updates the build's GitHub check run. Input: buildId.
review_screenshotApprove or reject one screenshot (one story in one theme and device) in a build, with an optional comment. A rejection with a comment is posted to the linked GitHub pull request when there is one. Rejecting a screenshot does not finalize the build; once every changed or new screenshot is approved, the build becomes approved and its screenshots become the branch baseline. Inputs: screenshotId (from get_build), state (approved or rejected), comment.
approve_all_screenshotsApprove every screenshot in a build in one step and approve the build, so its screenshots become the new baseline for its branch. Updates the GitHub check run. Input: buildId.
approve_story_screenshotsApprove every changed or new screenshot of one story (all its theme and device variants) in a build. The rest of the build stays open for review; the build is approved only once every changed screen across all stories is approved. Updates the GitHub check run. Inputs: buildId, storyId (Storybook story id, from get_build).
delete_recordingPermanently delete one Playwright recording and its stored video. Input: recordingId.
rename_replay_siteChange the name of a session-replay site. Inputs: siteId, name.
update_session_replay_settingsChange a session-replay site's settings; only the fields passed change. enabled false pauses recording (sessions are kept), true resumes it. privacyMode strict masks all text and blocks images; balanced records text (form values are never recorded). consentMode required records nothing until the site reports consent. Also sets allowed origins, never-record and mask CSS selectors (each list is replaced), Do-Not-Track handling, sample rate (1-100%) and retention days.
flag_replay_secretAdd a CSS selector to a site's never-record list, so from the next page load the recorder blanks that element in the visitor's browser and its content is never sent. Optionally deletes a recorded session that already captured it. Inputs: siteId, selector, optional deleteSessionId.
delete_replay_sessionPermanently delete one recorded visitor session and its stored events, for example for an erasure request. Input: sessionId.
set_dynamic_regionsReplace the dynamic (ignored) regions of one story variant, so visual changes inside those rectangles (clocks, animations, random content) stop counting as diffs in future builds of that repository product. Regions are rectangles in fractions (0 to 1) of the image; pass an empty list to clear them. Inputs: repoId, optional productKey, storyId, theme, device, regions.
apply_build_mask_suggestionsAdd every suggested dynamic region for the screens of one build (areas that kept changing in the same spot across accepted builds), then re-check the affected screens in the background so that churn stops counting as a change. Returns how many areas and screens were masked. Input: buildId.
dismiss_mask_suggestionTurn down a suggested dynamic region for one story variant, so that suggestion (and overlapping ones) is no longer offered. Existing masks are not changed. Inputs: repoId, optional productKey, storyId, theme, device, and the suggested region rectangle.
Spørgsmål om DiffDeck, dens API eller en tilsluttet AI-app? Send os en e-mail – brugere, der er logget ind, kan også oprette en supportanmodning inde fra appen.