Communitygithub.com

AppFolio Upgrade & Migration

Migriere zwischen AppFolio API-Versionen und behandle Endpunkt-Änderungen.

Was ist AppFolio Upgrade & Migration?

Diese Fähigkeit automatisiert die Migration zwischen AppFolio API-Versionen für Property-Management-Integrationen. Sie erkennt die aktuell verwendete API-Version, identifiziert veraltete Endpunkte und Felder, wendet Schema-Transformationsfunktionen auf Property- und Tenant-Objekte an und aktualisiert Endpunkt-URLs. Falls die neue Version fehlschlägt, wird automatisch auf die vorherige Version zurückgesetzt. Die Fähigkeit unterstützt Entwicklerteams, die auf AppFolio Stack APIs aufbauen, CI/CD-Pipelines integrieren und einen reibungslosen Übergang zwischen API-Versionen ohne manuelle Eingriffe sicherstellen möchten. Sie funktioniert durch Versionserkennung, Schema-Migration und Rollback-Strategien, die die Ausfallzeiten minimieren.

Funktioniert mit✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/plugins/saas-packs/appfolio-pack/skills/appfolio-upgrade-migration

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht AppFolio Upgrade & Migration?

Übersicht

AppFolio Property-Management-Integrationen basieren auf versionierten REST-API-Endpunkten, die sich mit der Plattform weiterentwickeln. Upgrades können Felder in Property- und Tenant-Objekten umbenennen, Paginierungsmodelle ändern, Work-Order-Endpunkte als veraltet markieren und den Basic-Auth-Ablauf verändern. Diese Fähigkeit erkennt Ihre aktuelle API-Version, ordnet veraltete Antwortstrukturen Ersetzungen zu und führt automatisch einen Rollback durch, wenn die neue Version fehlschlägt.

Voraussetzungen

  • Aktuelles API-Versionspräfix dokumentiert (z.B. /api/v1/)
  • Zugriff auf das AppFolio API-Änderungsprotokoll und die Release-Notes
  • Staging-Umgebung mit Test-Property- und Tenant-Daten
  • Client-ID und Secret in Umgebungsvariablen gespeichert
  • Vorhandene Integrationstestsuite, die Kernendpunkte abdeckt

Anleitung

  1. Führen Sie die Versionserkennung aus, um Ihre aktive API-Version mit der neuesten zu vergleichen.
  2. Überprüfen Sie das AppFolio-Änderungsprotokoll auf Breaking Changes zwischen den beiden Versionen.
  3. Wenden Sie Schema-Migrationstransformationen auf Property- und Tenant-Antwortobjekte an.
  4. Aktualisieren Sie die Endpunkt-URLs vom alten auf das neue Versionspräfix.
  5. Wechseln Sie bei Bedarf von Offset- zu Cursor-basierter Paginierung, sofern von der neuen Version gefordert.
  6. Führen Sie die Smoke-Testsuite gegen Staging aus, um zu überprüfen, ob alle Endpunkte antworten.
  7. Stellen Sie mit aktivierter Rollback-Strategie in der Produktion bereit.
  8. Überwachen Sie die Fehlerlogs auf 410/401-Antworten, die auf fehlende Migrationsschritte hinweisen.

Ausgabe

Nach einer erfolgreichen Migration erzeugt die Fähigkeit:

  • Ein VersionInfo-Objekt, das die aktuelle, neueste und veralteten Versionen bestätigt
  • Transformierte Property- und Tenant-Objekte, die dem neuen Schema entsprechen
  • Smoke-Testergebnisse für Property-, Tenant-, Work-Order- und Buchhaltungsendpunkte
  • Rollback-Logeinträge, falls ein Endpunkt auf die vorherige Version zurückgefallen ist

Versionserkennung

interface VersionInfo { current: string; latest: string; deprecated: string[]; }

async function detectApiVersion(baseUrl: string, headers: Record<string, string>): Promise<VersionInfo> {
  const res = await fetch(`${baseUrl}/api/status`, { headers });
  const body = await res.json();
  const current = res.headers.get("X-AppFolio-Api-Version") ?? body.api_version;
  const deprecated: string[] = body.deprecated_versions ?? [];
  if (deprecated.includes(current)) {
    console.warn(`Version ${current} ist veraltet. Migrieren Sie zu ${body.latest_version}.`);
  }
  return { current, latest: body.latest_version, deprecated };
}

Schema-Migration

interface LegacyProperty { address_line1: string; unit_count: number; mgr_id: string; }
interface CurrentProperty { street_address: string; total_units: number; manager_id: string; }

function migrateProperty(old: LegacyProperty): CurrentProperty {
  return { street_address: old.address_line1, total_units: old.unit_count, manager_id: old.mgr_id };
}

interface LegacyTenant { lease_end: string; balance_due: number; }
interface CurrentTenant { lease_expiry_date: string; outstanding_balance: number; }

function migrateTenant(old: LegacyTenant): CurrentTenant {
  return { lease_expiry_date: old.lease_end, outstanding_balance: old.balance_due };
}

Rollback-Strategie

async function versionAwareRequest(
  baseUrl: string, path: string, headers: Record<string, string>,
  targetVersion: string, fallbackVersion: string
): Promise<any> {
  const res = await fetch(`${baseUrl}/api/${targetVersion}${path}`, { headers });
  if (res.status === 410 || res.status === 404) {
    console.warn(`${targetVersion} abgelehnt; Rückfall auf ${fallbackVersion}`);
    const fallback = await fetch(`${baseUrl}/api/${fallbackVersion}${path}`, { headers });
    if (!fallback.ok) throw new Error(`Rückfall fehlgeschlagen: ${fallback.status}`);
    return fallback.json();
  }
  if (!res.ok) throw new Error(`Anfrage fehlgeschlagen: ${res.status}`);
  return res.json();
}

Beispiele

// Version erkennen und bei Bedarf migrieren
const info = await detectApiVersion("https://acme.appfolio.com", authHeaders);
if (info.deprecated.includes(info.current)) {
  const oldProps = await fetchLegacyProperties();
  const migrated = oldProps.map(migrateProperty);
  await smokeTestEndpoints("https://acme.appfolio.com", authHeaders);
}

Fehlerbehandlung

MigrationsproblemSymptomLösung
Veraltetes Versionspräfix410 Gone bei jeder AnfrageBasis-URL auf neuestes Versionspräfix aktualisieren
Umbenannte Property-Felderundefined-Werte in der Property-SynchronisationmigrateProperty-Transformation anwenden
Entfernter Paginierungs-OffsetLeere Ergebnismengen nach Seite einsAuf Cursor-basierte Paginierung umstellen
Abgelehnter Auth-Header401 Unauthorized nach UpgradeClient-Secret neu generieren, Umgebungsvariablen aktualisieren
Webhook-Envelope-ÄnderungEvent-Handler-ParsefehlerPayload-Parser für neuen Envelope aktualisieren

Ressourcen

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page for positioning, plan a conversion-optimized page layout, or design a launch page. Examples: "landing page for product launch", "conversion-optimized layout for SaaS

jeremylongshore/tons-of-skills-marketplace

Use when asked to design growth-optimized landing pages, activation funnel layouts, or experiment-friendly page structures. Examples: "growth-optimized landing", "activation funnel layout", "A/B testable page

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page, design page layout for conversion, or plan landing page information architecture. Examples: "landing page structure for SaaS", "conversion-optimized layout

jeremylongshore/tons-of-skills-marketplace

Generate polished demo videos from a single prompt. Use when the user asks to create a demo video, product walkthrough, feature showcase, or animated presentation. Trigger with "make a demo video", "create a product video", "demo walkthrough", or "feature showcase video".

jeremylongshore/tons-of-skills-marketplace

Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".

jeremylongshore/tons-of-skills-marketplace

Runs the full release workflow for the current project. Commits any uncommitted changes, pushes to remote, creates and merges a PR if on a feature branch, determines the next semver version from conventional commits, creates an annotated git tag and GitHub release with generated notes, cleans up merged branches, and returns to a clean main. Use when the user says promote, ship, release, commit and push, tag and release, or get back to main.

jeremylongshore/tons-of-skills-marketplace

Agent skill at plugins/productivity/content-multiplier/skills/channel-formats/SKILL.md

jeremylongshore/tons-of-skills-marketplace

Operate an evidence-backed editorial queue, balance topic and format coverage, schedule approved drafts, and reconcile backlog state with the publishing system. Use when choosing or scheduling the next blog work. Trigger with "show the editorial calendar" or "pick the next topic".

jeremylongshore/tons-of-skills-marketplace

Configure CI/CD pipeline for AppFolio property management integrations. Trigger: "appfolio CI".

jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common AppFolio API integration errors. Trigger: "appfolio error".

jeremylongshore/tons-of-skills-marketplace

Build property management dashboard with AppFolio API data. Trigger: "appfolio property dashboard".

jeremylongshore/tons-of-skills-marketplace

Automate tenant management and lease operations with AppFolio. Trigger: "appfolio tenant management".

jeremylongshore/tons-of-skills-marketplace

Collect AppFolio API debug evidence for support tickets. Trigger: "appfolio debug".

jeremylongshore/tons-of-skills-marketplace

Deploy AppFolio integration service to cloud infrastructure. Trigger: "deploy appfolio".

jeremylongshore/tons-of-skills-marketplace

Query AppFolio properties, units, and tenants via REST API. Trigger: "appfolio hello world".

jeremylongshore/tons-of-skills-marketplace

Configure AppFolio Stack API authentication with OAuth 2.0. Use when setting up property management API access, registering as an AppFolio Stack partner, or configuring client credentials for API calls. Trigger: "install appfolio", "setup appfolio", "appfolio auth", "appfolio API key".

jeremylongshore/tons-of-skills-marketplace

Set up local development for AppFolio property management API integration. Trigger: "appfolio local dev".

jeremylongshore/tons-of-skills-marketplace

Production readiness checklist for AppFolio integrations. Trigger: "appfolio production checklist".

jeremylongshore/tons-of-skills-marketplace

Handle AppFolio API rate limits with throttling and backoff. Trigger: "appfolio rate limit".

jeremylongshore/tons-of-skills-marketplace

Reference architecture for AppFolio property management integration. Trigger: "appfolio architecture".

Verwandte Skills