1. API
  2. Admin
  3. Story sync destinations

Story sync destinations: Update

Description

Update an existing sync destination. Use this to rotate the API key, change which stories are synced, or toggle manual-only sync.

The source team, destination team, destination tenant URL, and whether the sync is remote or same-tenant cannot be changed after creation. To change these, delete the sync destination and create a new one.

Request

HTTP Method: PUT, PATCH

Body parameter Description
destination_tenant_api_key Optional Tines API key used to publish to the destination tenant. When omitted, the existing key is preserved.
story_ids Optional Array of story IDs (from the current tenant) to sync. Pass [] to remove all subscriptions. When omitted, existing subscriptions are preserved.
manual_sync_only Optional When true, stories are only synced on manual trigger. When omitted, the existing value is preserved.

curl -X PUT \
  https://<tenant-domain>/api/v1/admin/sync_destinations/24 \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
    "destination_tenant_api_key": "<<CREDENTIAL.tines_api_key>>",
    "story_ids": [9981, 9982, 9983],
    "manual_sync_only": true
  }'

Response

A successful request returns status 200 and the updated sync destination object.

Field description

Parameter Description
id Sync destination ID.
destination_tenant_url Base URL of the destination tenant (e.g. https://).
destination_team_id ID of the destination team receiving the synced stories.
manual_sync_only Whether the sync destination only syncs on manual trigger.
origin_team_id ID of the team on the current tenant where the sync destination was created.
subscriptions Array of subscription objects (one per story).
subscriptions[].story.id ID of the story.
subscriptions[].story.name Name of the story.
subscriptions[].status Sync status. One of synced, failed, or requires_sync.
subscriptions[].error_message Error details if status is failed; null otherwise.

Sample response

{
  "sync_destination": {
    "id": 24,
    "destination_tenant_url": "https://<tenant-domain>",
    "destination_team_id": 42,
    "manual_sync_only": true,
    "origin_team_id": 7,
    "subscriptions": [
      {
        "story": { "id": 9981, "name": "High-Priority Alerts" },
        "status": "synced",
        "error_message": null
      },
      {
        "story": { "id": 9982, "name": "Change Control Requests" },
        "status": "synced",
        "error_message": null
      },
      {
        "story": { "id": 9983, "name": "Incident Response" },
        "status": "requires_sync",
        "error_message": null
      }
    ]
  }
}
Was this helpful?