What is modelled
Each area lists what sg-mockgun does and the api3 answers it follows. A gap is listed under "Not modelled". Per-call results are in the coverage table.
Upstream mockgun covers find, create, update, delete, revive and batch against a pickled schema. sg-mockgun keeps that surface and its tests, and changes its answers to the site's.
Filters
Answers 001 to 006 and 010 to 015.
- The relations each data type accepts, and the Fault for one it refuses.
- Entity and multi_entity operators, including rows whose link is unset.
- Dotted paths through links. A mismatched link reads null. An unknown path is refused.
- Relative date operators.
- Text and list
ismatch case-insensitively. - A refused filter is refused before the scan, even when another filter matches no row.
find options
limit,pageand the page size.orderwith several keys, on entity and dotted fields, and where None sorts.retired_onlyandinclude_archived_projects.additional_filter_presetswithLATEST.- Entity links have
name, the target's display name. A link to a retired row reads null.
Writes per data type
- Text, checkbox, float, number, multi_entity, color, timecode, jsonb, image, serializable, password, currency and footage writes: what is stored and what is refused.
- uuid, calculated, summary and pivot_column are read only.
- An unknown field in a create or an update is refused.
createreturns the fields sent.created_at,updated_at,created_by,updated_byandcached_display_nameare set.
Records
- A create with no fields is refused. A Shot, Version, Asset, Sequence, Task, Playlist, PublishedFile, Note or Delivery create without
projectis refused. - An omitted identity field reads
New <Type> <id>. An empty one is refused and spends an id.codeis not unique. - A status outside
valid_valuesis refused.""storesNone. updatereturns the row.batchis atomic. A failing request raises a Fault naming its index, and the ids it handed out stay spent.- A delete nulls entity fields that link to the row and retires the Versions whose
entityit is. A revive puts both back.
Hooks:
sg.require_project = Falselets a create skip theprojectcheck.sg.set_project_schema(project, entity_type, field, visible=..., hidden_values=...)sets whatschema_field_read(..., project_entity=project)reads.
Task Templates and scheduling
A create or a changed task_template applies the template from the TaskTemplate and its template Tasks in the mock. Seed them with create or load.
- Missing template Tasks are created with
template_taskset. Linked Tasks are re-synced. Edges are rewired. No Task is removed. durationcounts working days at 480 minutes. Downstream Tasks reschedule on an edge or an upstream date write. Astart_datewrite pins a dependent.dependency_violationis read only.- Deleting a Task retires its TaskDependency rows. Reviving it restores them.
sg.set_work_week([True] * 5 + [False] * 2) sets the working days, Monday first (default Mon to Fri).
Not modelled: event rows for rescheduled dates and re-synced fields, the dependency loop, duplicate and type refusals.
summarize, text_search and info
summarizewith each summary type, grouping, and the site's Faults.text_searchresult shape, matching and Faults.info()returns the site's payload.sg.set_info(**values)changes keys of it.
Attention, navigation and site reads
note_thread_read, activity_stream_read, followers, following, nav_expand, nav_search_string, nav_search_entity, preferences_read, work_schedule_read, user_subscriptions_read and export_page answer in process and over the HTTP server. Activity stream rows are the create rows of the event log. Site data the mock cannot know has a default and a setter:
sg.set_following(user, entities): whatuserfollows. Default: nothing.sg.set_preferences(values): preferences. Default: 17 keys of the recorded types.sg.set_work_schedule(week=None, exceptions=None): seven booleans, Monday first, and rules perYYYY-MM-DD. Default: Monday to Friday,STUDIO_WORK_WEEK.sg.set_user_subscriptions(subscriptions): keyed by HumanUser id as a string. Default:{}.
export_page refuses every page, as a site with no exportable page does.
Media
uploadcreates an Attachment, sets a File/Link field to itsthis_file, and returns its id.tag_listcreates missing Tags.- The file's bytes are kept in memory, per instance.
download_attachmentreturns them after the source file is gone. They pickle and snapshot with the records. - A refused upload raises
ShotgunErrorwith the site's reason. No row is made. - A thumbnail reads
/images/status/transient/thumbnail_pending.pnguntilsg.finalize_thumbnails().share_thumbnailfrom a transient source raisesShotgunThumbnailNotReady.
Not modelled: upload events beyond the Attachment create, and the HTTP server's upload routes.
Event log
Answers in api3-probe-2026-11-12, sg-groundtruth findings 025 and 049.
Each create, update, delete, revive and schema field write adds EventLogEntry rows shaped as the site writes them, queryable with find:
- A create logs
Shotgun_<Type>_New, then one_Changeper field it set, within_create: true. - An update logs one
_Changeper field whose value changed,meta.old_valueandmeta.new_value. - A delete logs a
retirement_datechange and_Retirement, and drops theentitylink from earlier rows for that entity.meta.entity_idkeeps the trail. A revive logs the reverse and_Revival. - Field create, rename and delete log
Shotgun_DisplayColumn_*rows.
sg.generate_event_log_entries = False turns logging off, as the ApiUser flag does on a site (default on here, off on a site). sg.set_clock(fn) makes timestamps deterministic.
Not modelled: server-set defaults logged on create, the internal properties row a rename also writes, and event ids that a site reserves ahead and commits late (finding 025).
Schema field writes
Answers in api3-probe-2026-11-12.
schema_field_create, schema_field_update and schema_field_delete answer with shotgun_api3.Fault and the site's words:
- The code is
sg_+ the lowercased display name, non-alphanumerics to_.sg_foobecomessg_sg_foo. - A display name already taken by a live field is suffixed:
_1,_2. No error is raised. - A deleted field's code stays taken. Creating it again, at any type, is refused. api3 has no revive; see REST field revive.
data_typecannot be updated. Onlyname,visible,description,summary_default,custom_metadataanduniquecan.query,summary,colorandimagecannot be created.calculatedfails as it does with no formula.entityandmulti_entityneed onevalid_types.checkboxneeds a boolean default.- Schema writes are per instance.
Not recorded over api3: a valid_types with several types uses the REST wording, and a calculated create with a formula is unmeasured. The code says so.
Bundled schemas
sg_mockgun.schemas.paths() returns a schema pulled from a Flow PT 8.91 site: 95 entity types, 1471 fields. It has visible, calculated, summary and jsonb fields, which upstream's test schema predates.
It lists only what any site ships. sg_mockgun.clean.clean_schema keeps a field when:
- the site cannot hide it (
visible.editablefalse, sg-groundtruth finding 056), - upstream's test schema has it, or
- its name has no
sg_prefix, since custom fields get one (finding 019).
Custom entities the site enabled are dropped with their connection entities and links to them. tools/pull_schema.py pulls and cleans a schema from any site, read-only.
schemas.paths("upstream_3_10_5") is Autodesk's test schema from shotgun_api3 3.10.5, as published in its repository under BSD-3: 77 entity types, 1035 fields, no visible key.