Collection management (GraphQL)

Related queries and mutations in Agents and deployments. Each has its own section.

Queries

getAllowList (query)

getAllowList is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: General availability

Get the list of projects and datasets that are allowed to be fetched from the warehouse.

Arguments

ArgumentTypeDescription
resourceUuidUUID!The UUID of the warehouse from which to fetch the allowed projects datasets
projectNames[String]The list of project names to filter the allowed datasets from
firstIntThe number of datasets to return. Defaults to 1000. Default: 1000.
offsetIntThe offset from the beginning of the list. Defaults to 0.

Returns

[ProjectAllowType]

Example

query GetAllowList($resourceUuid: UUID!) {
  getAllowList(resourceUuid: $resourceUuid) {
    projectName
    datasets
  }
}

Types used only by getAllowList

ProjectAllowType

Object type.

FieldTypeDescription
projectNameStringProject name
datasets[String]List of allowed datasets in project

Related types

UUID

getAssetCollectionPreferences (query)

getAssetCollectionPreferences is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get asset collection preferences for my account.

Arguments

ArgumentTypeDescription
resourceIdUUIDFilter by resource id
assetTypeStringFilter by asset type
offsetInt
beforeString
afterString
firstInt
lastInt

Returns

AssetCollectionPreferencesConnection

Example

query GetAssetCollectionPreferences {
  getAssetCollectionPreferences {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

AssetCollectionPreferencesConnection, UUID

getCollectionBlockList (query)

getCollectionBlockList is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Get collection rules in my account. Only block rules are returned unless effects is non-empty.

Arguments

ArgumentTypeDescription
resourceIdUUIDFilter by resource id
projectStringDEPRECATED: use parent_scope instead
parentScopeCollectionBlockListParentScopeInputThe parent scope of target objects. If not provided then all collection blocks for the account will be returned.
targetObjectTypes[CollectionPreferenceTargetObjectType]Only return collection blocks targeting these object types.
filterTypeCollectionPreferenceFilterTypeReturn only rules belonging to this filter list. When omitted, only metadata rules are returned.
effects[CollectionPreferenceEffectType]Return only rules with these effects. When omitted or empty, only block rules are returned.
offsetInt
beforeString
afterString
firstInt
lastInt

Returns

CollectionBlockConnection

Example

query GetCollectionBlockList {
  getCollectionBlockList {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

CollectionBlockConnection, CollectionBlockListParentScopeInput, CollectionPreferenceEffectType, CollectionPreferenceFilterType, CollectionPreferenceTargetObjectType, UUID

getCollectionDatasetList (query)

getCollectionDatasetList is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Get datasets in the account, including blocked datasets and dataset unblocked recently

Arguments

ArgumentTypeDescription
resourceIdUUIDFilter by resource id
beforeString
afterString
firstInt
lastInt

Returns

CollectionDataSetConnection

Example

query GetCollectionDatasetList {
  getCollectionDatasetList {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Types used only by getCollectionDatasetList

CollectionDataSet

Object type. Data set to collect data.

FieldTypeDescription
resourceIdUUID!The resource UUID of the dataset.
projectString!Top-level object hierarchy e.g. database, catalog, etc.
datasetStringIntermediate object hierarchy e.g. schema, database, etc.
CollectionDataSetConnection

Object type. Datasets to collect data

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[CollectionDataSetEdge]!Contains the nodes in this connection.
CollectionDataSetEdge

Object type. A Relay edge containing a CollectionDataSet and its cursor.

FieldTypeDescription
nodeCollectionDataSetThe item at the end of the edge
cursorString!A cursor for use in pagination

Related types

PageInfo, UUID

getWorkspaceIdsAllowListForPowerBiReportsCollection (query)

getWorkspaceIdsAllowListForPowerBiReportsCollection is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Get the list of workspace UUIDs for which metadata collection is allowed on this account. These IDs are used as a pre-scan filter, which is more efficient than the workspace name-based filter.

Arguments

ArgumentTypeDescription
connectionUuidUUID!The UUID of the connection that handles the Power BI Reports collection.

Returns

[String]

Example

query GetWorkspaceIdsAllowListForPowerBiReportsCollection($connectionUuid: UUID!) {
  getWorkspaceIdsAllowListForPowerBiReportsCollection(connectionUuid: $connectionUuid)
}

Related types

UUID

getWorkspacesAllowListForPowerBiReportsCollection (query)

getWorkspacesAllowListForPowerBiReportsCollection is a query in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: General availability

Get the list of workspaces for which metadata collection is allowed on this account.

Arguments

ArgumentTypeDescription
connectionUuidUUID!The UUID of the connection that handles the Power BI Reports collection.

Returns

[String]

Example

query GetWorkspacesAllowListForPowerBiReportsCollection($connectionUuid: UUID!) {
  getWorkspacesAllowListForPowerBiReportsCollection(connectionUuid: $connectionUuid)
}

Related types

UUID

Mutations

addAllowListEntry (mutation)

addAllowListEntry is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: General availability

Adds a project/dataset pair to the allow list.

Arguments

ArgumentTypeDescription
datasetString!The dataset to add to the allow list.
projectNameString!The project_name to which to add the entry.
resourceUuidUUID!The resource UUID to which to add the entry.

Returns

AddAllowListEntry

Example

mutation AddAllowListEntry($dataset: String!, $projectName: String!, $resourceUuid: UUID!) {
  addAllowListEntry(dataset: $dataset, projectName: $projectName, resourceUuid: $resourceUuid) {
    success
    projectName
    dataset
  }
}

Types used only by addAllowListEntry

AddAllowListEntry

Object type.

FieldTypeDescription
successBooleanWhether the mutation succeeded.
projectNameStringThe project name for which the dataset was added.
datasetStringThe dataset name that was added.

Related types

UUID

addToCollectionBlockList (mutation)

addToCollectionBlockList is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Adds to the list of entities for which metadata collection is not allowed on this account.

Arguments

ArgumentTypeDescription
collectionBlocks[CollectionBlockInput]!The entries to be added to the collection block list.

Returns

AddToCollectionBlockList

Example

mutation AddToCollectionBlockList($collectionBlocks: [CollectionBlockInput]!) {
  addToCollectionBlockList(collectionBlocks: $collectionBlocks) {
    success
  }
}

Types used only by addToCollectionBlockList

AddToCollectionBlockList

Object type. Adds to the list of entities for which metadata collection is not allowed on this account.

FieldTypeDescription
successBooleanWhether the mutation succeeded.

Related types

CollectionBlockInput

deleteAllowListEntry (mutation)

deleteAllowListEntry is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: General availability

Deletes a project/dataset pair from the allow list.

Arguments

ArgumentTypeDescription
datasetString!The dataset to delete from the allow list.
projectNameString!The project_name from which to delete the entry.
resourceUuidUUID!The resource UUID from which to delete the entry.

Returns

DeleteAllowListEntry

Example

mutation DeleteAllowListEntry($dataset: String!, $projectName: String!, $resourceUuid: UUID!) {
  deleteAllowListEntry(dataset: $dataset, projectName: $projectName, resourceUuid: $resourceUuid) {
    success
    projectName
    dataset
  }
}

Types used only by deleteAllowListEntry

DeleteAllowListEntry

Object type.

FieldTypeDescription
successBooleanWhether the mutation succeeded.
projectNameStringThe project_name from which the dataset was deleted
datasetStringThe dataset which was deleted.

Related types

UUID

deleteAssetCollectionPreferences (mutation)

deleteAssetCollectionPreferences is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Deletes rules for collection of a particular asset type.

Arguments

ArgumentTypeDescription
assetTypeString!The asset type of the preferences to delete.
resourceIdUUID!The resource UUID of the preferences to delete.

Returns

DeleteAssetCollectionPreferences

Example

mutation DeleteAssetCollectionPreferences($assetType: String!, $resourceId: UUID!) {
  deleteAssetCollectionPreferences(assetType: $assetType, resourceId: $resourceId) {
    success
    resourceId
    assetType
  }
}

Types used only by deleteAssetCollectionPreferences

DeleteAssetCollectionPreferences

Object type.

FieldTypeDescription
successBooleanWhether the mutation succeeded.
resourceIdUUIDThe resource UUID the preferences were removed from.
assetTypeStringThe asset type that the preferences were removed for.

Related types

UUID

modifyCollectionBlockList (mutation)

modifyCollectionBlockList is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

For an object type under a parent scope, modify the list of rules used to determine which objects are excluded from metadata collection. Example: To exclude ingestion for the 'analytics' project and all projects that start with 'prod_', make a request with these variables: {
"parentScope": {
"resourceId": "9ed28eb2-6d21-4ad3-9d87-c05a3cb0f7e2"
},
"targetObjectType": "project",
"collectionBlocks": [
{
"resourceId": "9ed28eb2-6d21-4ad3-9d87-c05a3cb0f7e2",
"project": "analytics",
"matchType": "exact_match"
},
{
"resourceId": "9ed28eb2-6d21-4ad3-9d87-c05a3cb0f7e2",
"project": "prod_",
"matchType": "prefix"
}
]
}

Arguments

ArgumentTypeDescription
collectionBlocks[ModifyCollectionBlockListInput]!The complete list of rules for deciding which objects are excluded from metadata collection
filterTypeCollectionPreferenceFilterTypeWhich filter list to operate on. Defaults to 'metadata'. The mutation replaces the complete set of rules in this scope for the specified filter_type only; the other filter list is left untouched. Default: "metadata".
parentScopeCollectionBlockListParentScopeInput!The direct parent scope of target objects
targetObjectTypeCollectionPreferenceTargetObjectType!The type of object to apply the rules to

Returns

[CollectionBlock]

Example

mutation ModifyCollectionBlockList($collectionBlocks: [ModifyCollectionBlockListInput]!, $parentScope: CollectionBlockListParentScopeInput!, $targetObjectType: CollectionPreferenceTargetObjectType!) {
  modifyCollectionBlockList(collectionBlocks: $collectionBlocks, parentScope: $parentScope, targetObjectType: $targetObjectType) {
    id
    resourceId
    project
    dataset
    tableName
    matchType
    targetObjectType
    effect
    filterType
  }
}

Types used only by modifyCollectionBlockList

ModifyCollectionBlockListInput

Input object type.

FieldTypeDescription
idStringID of the rule. If provided, the rule will be updated instead of created.
resourceIdUUID!Warehouse that the collection preference belongs to.
projectString!Value used to match against project/database.
datasetStringValue used to match against dataset/schema.
tableNameStringValue used to match against table name. Not supported for data lakes whose metadata comes only from Glue, which applies rules per catalog and database.
matchTypeCollectionPreferenceMatchType!
effectCollectionPreferenceEffectTypeDefault: "block".

Related types

CollectionBlock, CollectionBlockListParentScopeInput, CollectionPreferenceEffectType, CollectionPreferenceFilterType, CollectionPreferenceMatchType, CollectionPreferenceTargetObjectType, UUID

removeFromCollectionBlockList (mutation)

removeFromCollectionBlockList is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Removes from the list of entities for which metadata collection is not allowed on this account.

Arguments

ArgumentTypeDescription
collectionBlocks[CollectionBlockInput]!The entries to be removed from the collection block list.

Returns

RemoveFromCollectionBlockList

Example

mutation RemoveFromCollectionBlockList($collectionBlocks: [CollectionBlockInput]!) {
  removeFromCollectionBlockList(collectionBlocks: $collectionBlocks) {
    success
  }
}

Types used only by removeFromCollectionBlockList

RemoveFromCollectionBlockList

Object type. Removes from the list of entities for which metadata collection is not allowed on this account.

FieldTypeDescription
successBooleanWhether the mutation succeeded.

Related types

CollectionBlockInput

setAssetCollectionPreferences (mutation)

setAssetCollectionPreferences is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Sets rules for collection of a particular asset type.

Arguments

ArgumentTypeDescription
assetTypeString!The asset type that these collection preferences will apply to (e.g. 'workbook', 'project' etc.)
defaultEffectAssetCollectionRuleEffectWhether to allow or block assets of this type when no rules match. Default: "allow".
resourceIdUUID!The resource UUID that these collection preferences will apply to.
rules[AssetCollectionRuleInput]The set of rules for collection of this asset type.

Returns

SetAssetCollectionPreferences

Example

mutation SetAssetCollectionPreferences($assetType: String!, $resourceId: UUID!) {
  setAssetCollectionPreferences(assetType: $assetType, resourceId: $resourceId) {
    success
  }
}

Types used only by setAssetCollectionPreferences

AssetCollectionRuleConditionInput

Input object type.

FieldTypeDescription
attributeNameString!The name of the attribute to match
valueString!The value (or pattern) to compare the attribute against
comparisonTypeCollectionPreferenceMatchTypeThe method for comparing the attribute to the given value
AssetCollectionRuleInput

Input object type.

FieldTypeDescription
conditions[AssetCollectionRuleConditionInput]The set of conditions that need to match in order for this rule to apply
effectAssetCollectionRuleEffectWhether to allow or block the asset when this rule matches. Default: "block".
SetAssetCollectionPreferences

Object type.

FieldTypeDescription
successBooleanWhether the mutation succeeded.
assetCollectionPreferencesAssetCollectionPreferencesThe created or updated asset collection preferences.

Related types

AssetCollectionPreferences, AssetCollectionRuleEffect, CollectionPreferenceMatchType, UUID

setWorkspacesAllowListForPowerBiReportsCollection (mutation)

setWorkspacesAllowListForPowerBiReportsCollection is a mutation in the Monte Carlo GraphQL API, in Agents and deployments. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: General availability

Sets the list of workspaces to allow for collection in BI Reports.

Arguments

ArgumentTypeDescription
allowedWorkspaceIds[String]Workspace UUIDs to filter by before scanning (pre-scan filter). More efficient than allowed_workspaces as it skips the full workspace fetch. At least one of allowed_workspaces or allowed_workspace_ids must be provided.
allowedWorkspaces[String]Workspace names to filter by after scanning (post-scan filter). At least one of allowed_workspaces or allowed_workspace_ids must be provided.
connectionUuidUUID!The UUID of the connection that handles the Power BI Reports collection.

Returns

SetWorkspacesAllowListForPowerBiReportsCollection

Example

mutation SetWorkspacesAllowListForPowerBiReportsCollection($connectionUuid: UUID!) {
  setWorkspacesAllowListForPowerBiReportsCollection(connectionUuid: $connectionUuid) {
    success
  }
}

Types used only by setWorkspacesAllowListForPowerBiReportsCollection

SetWorkspacesAllowListForPowerBiReportsCollection

Object type. Set the workspace allowlists for Power BI reports collection. Accepts workspace names (post-scan filter) and/or workspace UUIDs (pre-scan filter). At least one of allowed_workspaces or allowed_workspace_ids must be provided.

FieldTypeDescription
successBooleanWhether the mutation succeeded.

Related types

UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.