Skip to content

A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.

26.0 KB
Raw Blame

Dataverse Offline API Recipes

Web API request patterns for every mutation /setup-offline-profile + /enable-tables-offline issues. Source of truth for body shapes; the skills reference this rather than embedding JSON inline.

All calls use scripts/dataverse-request.js from the plugin root unless otherwise noted. The wrapper handles auth (az token), 401 token refresh, 429 back-off, and 5xx transient retries automatically — never wrap with manual retry.

Field semantics are in offline-profile-schema.md. This doc is just the how — the wire format.

Before any example, apply app-working-directory.md and reuse the caller's absolute working_dir, selected <envUrl> and <tenantId>, exact resource identities, phase, and approved scope. Missing or conflicting context returns NEEDS_CONTEXT; never borrow the launch app or an ambient tenant. Every discovery, mutation, verification, and recovery request uses that same root and explicit tenant. These recipes do not grant approval or override planning mode; membership, deletion, and broader publication need their own applicable approval.

When a recovery reads an internal add/edit helper, use the scoped helper handoffs: forward the current owner, absolute root, environment/tenant/profile identity, phase, and the exact approved repair. Include --working-dir '<working_dir>' and the selected profile/table arguments; abbreviated commands below are not permission to drop context or to reuse approval for a different operation.


§1 — Per-table prerequisites (PUT EntityMetadata)

Use case: Step 4 of /enable-tables-offline. Flip IsAvailableOffline + ChangeTrackingEnabled on a table's EntityDefinition.

Why not dataverse-request.js: the PUT needs the MSCRM.MergeLabels: true header to preserve display labels, and the generic script does not accept arbitrary headers. Use the purpose-built helper instead:

Use the tenant resolved for the approved environment as <tenantId>; the explicit argument also binds token refresh and fails closed if that tenant is unavailable. Do not substitute an ambient tenant.

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/update-entity-offline-flags.js" <envUrl> \
  --table <table_logical_name> \
  --offline true \
  --tracking true \
  --tenant-id "<tenantId>"

The helper internally:

  1. GETs EntityDefinitions(LogicalName='<table>')?$select=MetadataId,SchemaName,IsAvailableOffline,ChangeTrackingEnabled,IsCustomizable,OwnershipType
  2. If both flags already match the request → returns { "status": 200, "noop": true }
  3. If IsCustomizable.Value=false → returns { "status": 200, "skipped": "uncustomizable" }
  4. Otherwise PUTs to EntityDefinitions(LogicalName='<table>') with:
    • Headers: Content-Type: application/json, MSCRM.MergeLabels: true
    • Body: MetadataId + LogicalName + SchemaName + the two flags
    • Returns { "status": 204, "before": {...}, "after": {...} } on 204

⚠️ Concurrency rule. Metadata writes serialize via the Dataverse metadata lock. Call the helper once per table, sequentially. Do not parallelize — the second concurrent call returns 429 / MetadataLockHeldException.

After all PUTs land, publish customizations once at the end of Step 5 (see §2 below).


§2 — Publish customizations

Use case: End of /enable-tables-offline Step 5 (after EntityMetadata PUTs), end of /setup-offline-profile Step 8 (after profile creation).

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "PublishXml" --tenant-id "<tenantId>" --body '{
    "ParameterXml": "<importexportxml><entities><entity><table></entity></entities></importexportxml>"
  }'

Expected: 204 No Content. Build the entity list from only the approved tables actually changed by prerequisite PUTs. For profile publication use §9 instead. PublishAllXml publishes every pending customization in the environment and requires separate explicit approval; a table/profile-scoped request is not consent.

If publish fails (rare — usually a transient server lock):

  • The PUT changes are still committed in the metadata DB
  • Maker portal won't show them until the next publish
  • Surface as DONE_WITH_CONCERNS: publish failed, retry with /enable-tables-offline once env is idle

§3 — Create profile shell

Use case: /setup-offline-profile Step 5.

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "mobileofflineprofiles" \
  --tenant-id "<tenantId>" \
  --body '{
    "name": "<App Name> Offline Profile",
    "description": "Auto-generated by mobile-app plugin. Tables: ..."
  }' \
  --include-headers

Required: --include-headers so the response includes OData-EntityId. The created mobileofflineprofileid is the last GUID segment of that header.

Expected: 204 No Content with body { ... } plus headers["odata-entityid"]: "https://orgX.crm.dynamics.com/api/data/v9.2/mobileofflineprofiles(<guid>)". Parse the GUID and capture for subsequent calls.


§4 — Create profile item (per table)

Use case: /setup-offline-profile Step 6. Issue one POST per table in the profile, sequentially.

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "mobileofflineprofileitems" \
  --tenant-id "<tenantId>" \
  --body '{
    "name": "<Table Display Name>",
    "[email protected]": "/mobileofflineprofiles(<profileId>)",
    "selectedentitytypecode": "<table-logicalname>",
    "recorddistributioncriteria": <0|1|2>,
    "recordsownedbyme": false,
    "recordsownedbymyteam": false,
    "recordsownedbymybusinessunit": false,
    "getrelatedentityrecords": true,
    "syncintervalinminutes": 10
  }' \
  --include-headers

Notes:

  • [email protected] is the navigation property syntax (not a raw column write). The navigation name comes from the entity relationship MobileOfflineProfile_MobileOfflineProfileItem documented on the entity reference.
  • For recorddistributioncriteria=2 (Organization rows), at least one of the three recordsownedby* flags must be true. The skill enforces this at Gate 2.
  • getrelatedentityrecords MUST be true for mobileofflineprofileitemassociation rows to take effect at sync time. Default it; don't expose to the user in v0.
  • syncintervalinminutes is clamped server-side to [5, 1440].
  • selectedcolumns is NOT set here — added in §6 PATCH after Gate 3 (so the user can edit the column list independently).

Expected: 204 with OData-EntityId → capture mobileofflineprofileitemid.

⚠️ Sequential. Profile items don't hold the metadata lock, but their validation pass reads neighboring items mid-POST. Parallel POSTs occasionally return 412 PreconditionFailed. Issue one at a time.


§5 — Resolve relationships for associations

Use case: Prep step before §6 — the architect proposes relationships by schema name (e.g. Account_Tasks); the API needs the relationship's MetadataId GUID. That's it. We do NOT need to resolve selectedrelationshipsschema — empirical 2026-05-24 capture from maker portal proved that field is NOT REQUIRED in the POST body; the server fills it in (despite the entity metadata listing it as SystemRequired).

Two queries cover both directions of N:1 / 1:N from a parent table:

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "EntityDefinitions(LogicalName='<table>')/ManyToOneRelationships?\$select=MetadataId,SchemaName,ReferencingEntity,ReferencedEntity" \
  --tenant-id "<tenantId>"

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "EntityDefinitions(LogicalName='<table>')/OneToManyRelationships?\$select=MetadataId,SchemaName,ReferencingEntity,ReferencedEntity" \
  --tenant-id "<tenantId>"

Match by SchemaName === <relationship name from architect>. Capture:

  • MetadataId → use as relationshipid in §6
  • SchemaName → use as both name AND relationshipdisplayname in §6 (the maker portal sets them identically)

Cache the lookup per parent table — re-querying for each association adds significant latency.

File/Image columns (the "Images (0/1)" tree in maker portal Image 5)

File and Image columns participate in offline sync as relationships from the parent table to the image attribute. Discover via:

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "EntityDefinitions(LogicalName='<table>')/Attributes?\$filter=AttributeType eq 'Image' or AttributeType eq 'File'&\$select=MetadataId,LogicalName,SchemaName,AttributeType" \
  --tenant-id "<tenantId>"

Each result is added as an association exactly like a relationship — MetadataId → relationshipid, SchemaName → name / relationshipdisplayname.

Listing existing associations on a profile (idempotency / edit-mode)

The maker portal queries via FetchXML (joins through the parent profile item to filter by profile):

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "mobileofflineprofileitemassociations?fetchXml=<URL-ENCODED-FETCH>" --tenant-id "<tenantId>"

FetchXML (un-encoded) — replace <profileId> with the target mobileofflineprofileid:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="mobileofflineprofileitemassociation">
    <attribute name="mobileofflineprofileitemassociationid" />
    <attribute name="mobileofflineprofileitemid" />
    <attribute name="name" />
    <attribute name="profileitemassociationentityfilter" />
    <attribute name="relationshipid" />
    <attribute name="relationshipname" />
    <link-entity name="mobileofflineprofileitem" from="mobileofflineprofileitemid" to="mobileofflineprofileitemid" link-type="inner">
      <filter type="and">
        <condition attribute="regardingobjectid" operator="eq" value="<profileId>" />
      </filter>
    </link-entity>
  </entity>
</fetch>

Returns the existing associations across all items in the profile. Use this for idempotency (skip POSTing duplicates) and for /edit-offline-profile discovery.


§6 — Create profile item association

Use case: /setup-offline-profile Step 7a, or /add-table-to-offline-profile after adding a new table. Issue one POST per (parent-item, relationship) pair — best inside a $batch changeset so a partial failure rolls back all of them (see §6a below).

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "mobileofflineprofileitemassociations" \
  --tenant-id "<tenantId>" \
  --body '{
    "name": "<relationship-schema-name>",
    "relationshipdisplayname": "<relationship-schema-name>",
    "relationshipid": "<MetadataId-from-§5>",
    "[email protected]": "/mobileofflineprofileitems(<parentItemId>)"
  }' \
  --include-headers

Critical empirical findings (2026-05-24, maker portal capture):

  • DO NOT set selectedrelationshipsschema. The entity metadata lists it as SystemRequired Picklist, but the maker portal omits it and the server fills it in. Including it with any value (0, null, integer) gets rejected with "Accepted Values: ".
  • DO NOT set relationshipname. Same pattern — the server computes the display value (e.g. "Regarding (Account)") from the relationship's metadata and writes it server-side. Including a value gets ignored or worse.
  • name and relationshipdisplayname are both set to the relationship's SchemaName (e.g. "Account_Tasks") — the maker portal sets them identically.
  • The maker portal additionally sends "@data.type": "9867" — this is the EntityTypeCode (OTC) for mobileofflineprofileitemassociation. Likely a hint that's ignored by Dataverse; omitting it works.

Expected: 201 Created (when used inside $batch with Prefer: return=representation) or 204 (standalone POST), with OData-EntityId header → capture mobileofflineprofileitemassociationid.

Idempotency note. Re-POSTing an existing (item, relationship) pair returns 409 Conflict. The wrapper's looksLikeDuplicate rescue in dataverse-request.js treats this as success. Safe to retry.

§6a — Batched changeset POST (recommended)

The maker portal batches multiple association POSTs + the new-item POST into a single OData $batch changeset, so a single failure rolls back the whole batch. This is the production-quality pattern. Recipe:

POST /api/data/v9.0/$batch
Content-Type: multipart/mixed; boundary=batch_<random>

--batch_<random>
Content-Type: multipart/mixed; boundary=changeset_<random>

--changeset_<random>
Content-Type: application/http
Content-Transfer-Encoding: binary

POST mobileofflineprofileitemassociations HTTP/1.1
Content-ID: 1
Content-Type: application/json; charset=utf-8
Prefer: return=representation, odata.include-annotations="*"

{"name":"Account_Tasks","relationshipdisplayname":"Account_Tasks","relationshipid":"d4c7f132-...","[email protected]":"/mobileofflineprofileitems(<parentItemId>)"}

--changeset_<random>
Content-Type: application/http
Content-Transfer-Encoding: binary

POST mobileofflineprofileitemassociations HTTP/1.1
Content-ID: 2
…

--changeset_<random>--

--batch_<random>--

dataverse-request.js does NOT currently support $batch. v0.2 should add a --batch <ops-json> mode to the helper. Until then, the skill POSTs associations sequentially (works correctly, just slower than the maker portal).

§6b — Server-side validation: circular relationships

Empirical 2026-05-24: when the publish step runs, Dataverse validates the profile's relationship graph for cycles. If A → B → A exists via the included relationships, publish returns 400 with:

"code": "0x80071141",
"message": "The profile '<name>' could not be published because it contains a circular relationship.
            Please review and remove one of the following relationships: 'account => task => account'."

The skill should:

  1. Pre-publish: build the relationship graph from the architect's proposal and detect cycles via DFS. If found, surface to the user at Gate 3 (NOT at publish).
  2. Post-publish: if 0x80071141 returned despite pre-check, parse the account => task => account path from the error message and remove ONE of the offending associations (user prompt at this point).

§7 — PATCH selectedcolumns + syncintervalinminutes on items

Use case: /setup-offline-profile Step 7b. After Gate 3 captures user-confirmed column lists and sync frequency edits, PATCH each item.

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> PATCH \
  "mobileofflineprofileitems(<itemId>)" \
  --tenant-id "<tenantId>" \
  --body '{
    "selectedcolumns": "{\"Columns\":[\"cr123_title\",\"cr123_body\",\"modifiedon\",\"statecode\"]}",
    "syncintervalinminutes": 10
  }'

Notes:

  • selectedcolumns is a stringified JSON — the outer field is the memo text, the inner JSON is parsed by the runtime. Escape inner quotes when constructing the body.
  • Always include the system columns (modifiedon, createdon, statecode, statuscode, primary id, primary name) in the column list — omitting them may cause sync issues. The architect's "always-include" set handles this.
  • If syncintervalinminutes wasn't edited at Gate 3 (still the default 10), you can omit it from the PATCH.

Expected: 204 No Content.


§8 — Validate profile [REMOVED IN v0.1]

⚠️ Recipe shape rejected by the server. Empirical 2026-05-17: the Validate action documented in the WebAPI reference does NOT accept the {Query: {@odata.type, Query}} envelope. Server returns 400: "The parameter 'Query' in the request payload is not a valid parameter for the operation 'Validate'.". The correct request shape is undocumented. v0.1 skips Validate entirely. Profile publishes correctly without it; isvalidated=false is the only side-effect and does not block runtime sync per empirical confirmation.


§9 — Publish profile (post-creation) — use targeted PublishXml

Recommended (the maker portal's pattern, empirical 2026-05-24): targeted PublishXml — publishes ONLY the specific profile, not the entire org's customizations. Avoids the rate-limit storms PublishAllXml triggers on shared envs.

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "PublishXml" --tenant-id "<tenantId>" --body '{
    "ParameterXml": "<publish><mobileofflineprofiles><mobileofflineprofile><profileId></mobileofflineprofile></mobileofflineprofiles></publish>"
  }'

Replace <profileId> with the actual GUID (no braces, no quotes — raw GUID inline in the XML).

Expected: 204 No Content. The maker portal makes this call inside a $batch changeset (along with any pending item/association mutations); standalone POST works fine for our usage.

Fallback — PublishAllXml: only after the owner separately approves publishing all pending environment customizations. A targeted publish failure or rate limit does not grant broader approval. Keep the same root, tenant, and selected profile on the fallback and its readback:

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "PublishAllXml" --tenant-id "<tenantId>" --body '{}'

Handle publish errors:

Status / error Meaning Action
204 Published Continue
400 / 0x80071141 "circular relationship" Profile's association graph contains a cycle (e.g., account => task => account) Parse the path from the error message, remove ONE association (prompt user at this point), re-attempt publish
400 / 0x80071140 "no relationships are specified" for a Related-only table A profile item has recorddistributioncriteria=0 (Related rows only) but no mobileofflineprofileitemassociation rows targeting it. Without those, the runtime would sync zero rows. Empirical 2026-05-24: server enforces this at publish time — and the validation seems to look at associations published in an earlier publishedon snapshot, not the current uncommitted ones. So for profiles being retrofitted (existing publish + late association additions), publish can fail even after associations are added. Parse the table name from the error message. Two recoveries: (a) read and execute ${PLUGIN_ROOT}/skills/add-table-to-offline-profile/SKILL.md with --table <tbl> to add ALL relevant inbound associations, not just one; (b) read and execute ${PLUGIN_ROOT}/skills/edit-offline-profile/SKILL.md with --table <tbl> --scope 2 --me to change scope away from Related-only. Prompt user to pick.
429 (rate limit) Concurrent publish in progress on shared env Back off via dataverse-request.js automatic retry; if still failing, report the result or verify the same target after a timeout. Do not widen publication without approval.
Client timeout, but server-side committed Shared envs can take longer than dataverse-request.js's 4-retry budget allows Verify by re-GET — if componentstate=0 AND publishedon is non-null + recent, treat as success

After publish, re-GET the profile and assert state:

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "mobileofflineprofiles(<profileId>)?\$select=publishedon,componentstate,isvalidated" --tenant-id "<tenantId>"

Expected post-publish: componentstate=0 (Published), publishedon=<iso8601> (within last 5 min). isvalidated will typically be true after publish — but false is fine if Validate (§8) was skipped.


§10 — Read existing profiles (discovery)

Use case: /setup-offline-profile Step 2 (extend-vs-create-new decision). Also used by /edit-offline-profile and /preview-offline-scope.

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
# List
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "mobileofflineprofiles?\$select=mobileofflineprofileid,name,description,publishedon,createdon" --tenant-id "<tenantId>"

# Detail (with items + associations)
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "mobileofflineprofiles(<profileId>)?\$expand=MobileOfflineProfile_MobileOfflineProfileItem(\$select=mobileofflineprofileitemid,selectedentitytypecode,recorddistributioncriteria,recordsownedbyme,recordsownedbymyteam,recordsownedbymybusinessunit,syncintervalinminutes,selectedcolumns;\$expand=MobileOfflineProfileItem_MobileOfflineProfileItemAssociation(\$select=mobileofflineprofileitemassociationid,relationshipid,relationshipname))" \
  --tenant-id "<tenantId>"

The second query is the canonical "read full profile state" call — also used by scripts/verify-offline-profile.js post-create.


§11 — Soft-delete a profile (resume / restart)

Use case: /setup-offline-profile Step 1b. If a prior session left a half-built profile in memory-bank.md with status: in-progress, and the user picks "start fresh".

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> DELETE \
  "mobileofflineprofiles(<profileId>)" --tenant-id "<tenantId>"

Cascade-deletes via the MobileOfflineProfile_MobileOfflineProfileItem and MobileOfflineProfileItem_MobileOfflineProfileItemAssociation relationships (both have Delete: Cascade configuration per the entity reference). Expected 204.

Confirm before deleting. Even if the skill thinks the profile is half-built, the user may have manually finished it in maker portal. Surface a confirmation: "Delete profile <name> (created , items)? This is irreversible."


§12 — Membership (user / team binding to profile)

Use case: /assign-offline-profile after profile creation. Without these rows, the profile is unbound — no user's app uses it.

User membership

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "usermobileofflineprofilememberships" \
  --tenant-id "<tenantId>" \
  --body '{
    "[email protected]": "/mobileofflineprofiles(<profileId>)",
    "[email protected]": "/systemusers(<systemuserid>)"
  }' \
  --include-headers

Team membership

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
  "teammobileofflineprofilememberships" \
  --tenant-id "<tenantId>" \
  --body '{
    "[email protected]": "/mobileofflineprofiles(<profileId>)",
    "[email protected]": "/teams(<teamid>)"
  }' \
  --include-headers

Listing existing memberships (for idempotency)

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "usermobileofflineprofilememberships?\$filter=_mobileofflineprofileid_value eq <profileId>&\$expand=systemuserid_systemuser(\$select=domainname)" \
  --tenant-id "<tenantId>"

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
  "teammobileofflineprofilememberships?\$filter=_mobileofflineprofileid_value eq <profileId>&\$expand=teamid_team(\$select=name)" \
  --tenant-id "<tenantId>"

⚠️ Verified empirically 2026-05-19 (MSProjectSienaV1 / Chanel profile demo): the correct @odata.bind nav prop names for usermobileofflineprofilemembership and teammobileofflineprofilemembership are PascalCase — MobileOfflineProfileId, SystemUserId, TeamId — NOT the snake_case lookup-attribute names. The setup/edit skills use snake_case regardingobjectid which IS correct for mobileofflineprofileitem and mobileofflineprofileitemassociation. Dataverse is inconsistent across entities. Always probe via EntityDefinitions(LogicalName='<entity>')/Attributes?$filter=AttributeType eq 'Lookup'&$select=LogicalName,SchemaName and use the SchemaName column for @odata.bind if unsure.

Duplicate handling: POSTing an (profile, user/team) pair that already exists returns 409. dataverse-request.js looksLikeDuplicate rescue treats as success.

DELETE (unassign)

cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> DELETE \
  "usermobileofflineprofilememberships(<membershipid>)" --tenant-id "<tenantId>"

Summary — call sequence for /setup-offline-profile

Step Section What
2 §10 List existing profiles
5 §3 POST profile shell
4 (pre-Gate-1) §1 PUT EntityMetadata per table needing prereqs
5 (mid-skill) §2 Targeted PublishXml for changed prerequisite tables
6 §4 POST profile item per table
7a §5 → §6 Resolve relationships → POST associations
7b §7 PATCH selectedcolumns + syncintervalinminutes
8 §9 Targeted PublishXml for the selected profile
9 (verification) §10 Re-fetch full profile, compare to offline-profile.json

The total HTTP cost for a typical 5-table profile with 3 relationships each: ~20 sequential calls (1 list + 1 publish-prereq + 1 publish-profile + 5 items + 15 associations + 5 PATCHes + 2 reads), bounded by Dataverse's serialization rules.