Skip to main content
POST
/
v1
/
models
/
{modelId}
/
content-validator
curl --request POST \
  --url https://{instance}.omniapp.co/api/v1/models/{modelId}/content-validator \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "find": "old_view",
  "replacement": "new_view",
  "find_or_replace_type": "VIEW"
}
'
{
"replaced_queries_count": 15,
"replaced_documents_count": 5,
"replaced_workbook_models_count": 3,
"replaced_dashboard_filters_count": 2,
"skipped_pr_required_count": 0
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

modelId
string<uuid>
required

The ID of the model to perform find/replace against.

Query Parameters

userId
string<uuid>

The user ID to act on behalf of. Only valid when using an organization API key.

User-scoped API keys cannot use this parameter and will receive a 403 error if provided.

Body

application/json
find
string
required

The value to find. Used with find_or_replace_type to scope the search:

  • VIEW - The name of the view to find
  • FIELD - The fully qualified name of the field to find, specified as view_name.field_name
  • TOPIC - The name of the topic to find
replacement
string
required

The replacement value.

  • VIEW - The name of the replacement view
  • FIELD - The fully qualified name of the replacement field, specified as view_name.field_name
  • TOPIC - The name of the replacement topic
find_or_replace_type
enum<string>
required

The type of find/replace operation.

  • VIEW - Replace view references
  • FIELD - Replace field references. find and replacement values must be the fully qualified name of the field, e.g. view_name.field_name.
  • TOPIC - Replace topic references
Available options:
VIEW,
FIELD,
TOPIC
branch_id
string<uuid>

The branch ID to perform the operation on. If not provided, operates on the main model.

include_personal_folders
boolean

When enabled, include personal folders.

only_in_workbook_id
string

A workbook ID. When provided, the find/replace action will be limited only to the specified workbook.

Response

Find/replace operation completed successfully

replaced_queries_count
integer

The number of queries that had replacements made.

replaced_documents_count
integer

The number of documents that had replacements made.

replaced_workbook_models_count
integer

The number of workbook models that had replacements made.

replaced_dashboard_filters_count
integer

The number of dashboard filters that had replacements made.

skipped_pr_required_count
integer

The number of documents skipped because they require a pull request to publish.