Skip to main content
POST
/
api
/
saved-views
/
v1
Upsert
curl --request POST \
  --url https://developer.synq.io/api/saved-views/v1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "description": "<string>",
  "selection": {
    "entityQuery": {
      "resolverQl": "<string>",
      "renderedResolverQl": "<string>",
      "publicQuery": {
        "parts": [
          {
            "identifierList": {
              "identifiers": [
                {
                  "airflowDag": {
                    "integrationId": "<string>",
                    "dagId": "<string>"
                  }
                }
              ]
            }
          }
        ]
      }
    }
  },
  "config": {
    "cardFields": [
      "<string>"
    ]
  },
  "grants": {
    "grants": [
      {
        "granteeIdentity": "<string>"
      }
    ]
  },
  "etag": "<string>"
}
'
{
  "view": {
    "workspace": "<string>",
    "id": "<string>",
    "title": "<string>",
    "description": "<string>",
    "selection": {
      "entityQuery": {
        "resolverQl": "<string>",
        "renderedResolverQl": "<string>",
        "publicQuery": {
          "parts": [
            {
              "identifierList": {
                "identifiers": [
                  {
                    "airflowDag": {
                      "integrationId": "<string>",
                      "dagId": "<string>"
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    },
    "config": {
      "cardFields": [
        "<string>"
      ]
    },
    "grants": [
      {
        "granteeIdentity": "<string>"
      }
    ],
    "owner": {
      "name": "<string>",
      "email": {
        "userEmail": "jsmith@example.com"
      }
    },
    "updatedBy": {
      "name": "<string>",
      "email": {
        "userEmail": "jsmith@example.com"
      }
    },
    "permissions": {
      "canEdit": true,
      "canDelete": true,
      "canManageGrants": true
    },
    "pinned": true,
    "etag": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
id
string<uuid>

Client-supplied UUID identifying the view. The same id updates the same view; a new id creates a new view.

title
string | null

Title. Required when creating; omit to keep the existing title on update.

Required string length: 1 - 200
description
string | null

Description. Omit to keep the existing description.

Maximum string length: 10000
context
enum<string> | null

Surface the view applies to. Omit to keep the existing context.

Available options:
SAVED_VIEW_CONTEXT_UNSPECIFIED,
SAVED_VIEW_CONTEXT_CHECKS,
SAVED_VIEW_CONTEXT_ISSUES
selection
entity_query · object | null

The selection. Required when creating; omit to keep the existing selection.

config
SavedViewConfig · object | null

Display configuration. Omit to keep the existing config.

visibility
enum<string> | null

Sharing state. Omit to keep the existing visibility.

Available options:
SAVED_VIEW_VISIBILITY_UNSPECIFIED,
SAVED_VIEW_VISIBILITY_SHARED,
SAVED_VIEW_VISIBILITY_GRANTED
grants
GrantList · object | null

Access grants. When present, replaces the entire grant set (an empty list clears all grants); when omitted, grants are left unchanged. Changing grants requires manage/admin permission on the view.

etag
string | null

Optional optimistic-concurrency guard. When set, the update fails with a conflict if the view was modified since this etag was read.

Response

200 - application/json

Success

view
SavedView · object

The stored view after the upsert.