Skip to main content

Save a graph view or question.

POST/api/v1/graph-viewsanalytics:write

A private view needs Create Private Graph Views and the Docwize Atlas licence, a shared one Create Shared Graph Views (403 otherwise). The caller owns it. definition is the Portal's query definition (format graph_view_definition), parameters the declared parameters (format graph_view_parameters); a parameter the definition uses must be declared. 409 already_exists when the slug is taken.

Scopeanalytics:write
AsynchronousNo
MCP toolcreate_graph_view

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonGraphViewCreateInput

Responses​

StatusDescriptionBody
201Success.application/json GraphView or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409already_exists, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

GraphView​

FieldTypeRequiredDescription
definitionobject or nullRequiredThe saved query (format graph_view_definition): the Portal's own document.
descriptionstring or nullRequired
graph_view_idstringRequired
is_activebooleanRequired
is_ownerbooleanRequiredThe caller owns the view.
is_questionbooleanRequiredThe Atlas offers the view as a question.
last_opened_atstring or nullRequiredThe caller's last visit, as the Portal records it; null when never opened or in a list.
namestringRequired
owner_user_idstring or nullRequired
parametersobject or nullRequiredThe declared parameters (format graph_view_parameters).
slugstringRequired
visibilitystringRequiredprivate (its owner's) or shared.

GraphViewCreateInput​

FieldTypeRequiredDescription
definitionobjectRequiredThe query to save (format graph_view_definition).
descriptionstring or nullOptionalUp to 1000 characters.
is_activeboolean or nullOptionalTrue when left out.
namestringRequiredUp to 200 characters.
parametersobject or nullOptionalThe declared parameters (format graph_view_parameters); none when left out.
slugstringRequiredLower-case letters, digits and hyphens, starting with a letter; 2 to 64 characters.
visibilitystring or nullOptionalprivate (default; needs Create Private Graph Views and the Docwize Atlas licence) or shared (needs Create Shared Graph Views).