Download OpenAPI specification:
Public API for Collect resources and files
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"sites":
[
-
{
-
"uuid":
"string",
-
"name":
"string",
-
"url":
"string",
-
"primary_language_code":
"string"
}
]
}
|
uuid
required
|
string
|
{
-
"uuid":
"string",
-
"name":
"string",
-
"url":
"string",
-
"host":
"string",
-
"primary_language_code":
"string",
-
"additional_language_codes":
[
-
"string"
],
-
"bulk_upload_method":
"string",
-
"google_analytics_code":
"string",
-
"mytours_project_id":
0,
-
"settings":
{
-
"contributions_enabled":
true,
-
"downloads_enabled":
true,
-
"homepage_enabled":
true,
-
"community_taggings_enabled":
true,
-
"fuzzy_search_enabled":
true,
-
"strict_search_enabled":
true,
-
"public_site_enabled":
true,
-
"comments_enabled":
true,
-
"public_authority_files_enabled": true,
-
"public_scrapbook_enabled":
true,
-
"public_collections_enabled":
true,
-
"copyright":
"string",
-
"website_url":
"string",
-
"contact_email":
"string",
-
"twitter_handle":
"string",
-
"facebook_handle":
"string",
-
"instagram_handle":
"string",
-
"disqus_short_name":
"string",
-
"logo_url":
"string",
-
"favicon_url":
"string",
-
"og_image_url":
"string",
-
"sign_in_background_image_url":
"string",
-
"comments_tab_title":
"string",
-
"comments_login_prompt":
"string",
-
"theme_version":
0,
-
"default_resource_display_option": "fluid_grid",
-
"resource_card_template":
"default",
-
"contribution_licenses":
[
-
"string"
],
-
"resource_placements":
[
-
"string"
],
-
"colours":
{ },
-
"style":
{ },
-
"static_texts":
{ },
-
"sortable_fields":
[
-
{ }
]
},
-
"schema_version_id":
"string",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A merge, not a replacement: a setting left out keeps its current value, and so does a whole group
left out. The exceptions are the list-valued settings — contribution_licenses,
resource_placements and sortable_fields — which replace what is there,
because a half-merged list is worse than either.
|
uuid
required
|
string
|
| name |
string
What the site is called |
| google_analytics_code |
string
|
| bulk_upload_method |
string
Enum:
"sftp"
"google_drive"
Where a bulk import reads its spreadsheet from |
|
object
|
{
-
"name":
"string",
-
"google_analytics_code":
"string",
-
"bulk_upload_method":
"sftp",
-
"settings":
{
-
"copyright":
"string",
-
"website_url":
"string",
-
"contact_email":
"string",
-
"twitter_handle":
"string",
-
"facebook_handle":
"string",
-
"instagram_handle":
"string",
-
"disqus_short_name":
"string",
-
"logo_url":
"string",
-
"favicon_url":
"string",
-
"og_image_url":
"string",
-
"sign_in_background_image_url":
"string",
-
"comments_tab_title":
"string",
-
"comments_login_prompt":
"string",
-
"contributions_enabled":
true,
-
"downloads_enabled":
true,
-
"homepage_enabled":
true,
-
"community_taggings_enabled":
true,
-
"comments_enabled":
true,
-
"public_authority_files_enabled": true,
-
"public_scrapbook_enabled":
true,
-
"public_collections_enabled":
true,
-
"theme_version":
0,
-
"default_resource_display_option": "fluid_grid",
-
"resource_card_template":
"default",
-
"contribution_licenses":
[
-
"cc-by"
],
-
"resource_placements":
[
-
"string"
],
-
"colours":
{
-
"primary":
"string",
-
"secondary":
"string",
-
"tertiary":
"string",
-
"quaternary":
"string",
-
"success":
"string",
-
"info":
"string",
-
"light":
"string",
-
"dark":
"string"
},
-
"static_texts":
{
-
"welcome":
"string",
-
"contribution_lead":
"string",
-
"contribution_message":
"string"
},
-
"style":
{
-
"logo":
"logo",
-
"header":
"default",
-
"footer":
"default",
-
"content":
"default"
},
-
"sortable_fields":
[
-
{
-
"title":
"string",
-
"sort_field":
"string"
}
]
}
}
{
-
"uuid":
"string",
-
"name":
"string",
-
"url":
"string",
-
"host":
"string",
-
"primary_language_code":
"string",
-
"additional_language_codes":
[
-
"string"
],
-
"bulk_upload_method":
"string",
-
"google_analytics_code":
"string",
-
"mytours_project_id":
0,
-
"settings":
{
-
"contributions_enabled":
true,
-
"downloads_enabled":
true,
-
"homepage_enabled":
true,
-
"community_taggings_enabled":
true,
-
"fuzzy_search_enabled":
true,
-
"strict_search_enabled":
true,
-
"public_site_enabled":
true,
-
"comments_enabled":
true,
-
"public_authority_files_enabled": true,
-
"public_scrapbook_enabled":
true,
-
"public_collections_enabled":
true,
-
"copyright":
"string",
-
"website_url":
"string",
-
"contact_email":
"string",
-
"twitter_handle":
"string",
-
"facebook_handle":
"string",
-
"instagram_handle":
"string",
-
"disqus_short_name":
"string",
-
"logo_url":
"string",
-
"favicon_url":
"string",
-
"og_image_url":
"string",
-
"sign_in_background_image_url":
"string",
-
"comments_tab_title":
"string",
-
"comments_login_prompt":
"string",
-
"theme_version":
0,
-
"default_resource_display_option": "fluid_grid",
-
"resource_card_template":
"default",
-
"contribution_licenses":
[
-
"string"
],
-
"resource_placements":
[
-
"string"
],
-
"colours":
{ },
-
"style":
{ },
-
"static_texts":
{ },
-
"sortable_fields":
[
-
{ }
]
},
-
"schema_version_id":
"string",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| q |
string
Keyword search query |
| order |
string
Default:
"relevance"
Enum:
"relevance"
"title"
"type"
"updated"
"created"
Sort order |
| direction |
string
Default:
"asc"
Enum:
"asc"
"desc"
Sort direction |
| parent_id |
string
Only resources with this parent |
| title |
string
|
| creator |
string
|
| type[] |
Array of strings
|
| language[] |
Array of strings
|
| access_rights[] |
Array of strings
Items
Enum:
"published"
"unpublished"
"unmoderated"
"draft"
"deleted"
Include |
| source[] |
Array of strings
|
| contributor_role[] |
Array of strings
|
| location_precision[] |
Array of strings
|
| source_id |
string
|
| created_at_gt |
string
<date-time>
|
| created_at_lt |
string
<date-time>
|
| updated_at_gt |
string
<date-time>
|
| updated_at_lt |
string
<date-time>
|
| custom_fields |
string
Filters on the site's own fields, keyed by field name |
| ids[] |
Array of strings
Only these resources, which re-fetches a known set in one call |
| with_files |
boolean
Only resources that have at least one file |
| without_files |
boolean
Only resources that have no files |
| bbox[] |
Array of numbers
<float> [ items
<float
>
]
Only resources inside this bounding box: west, south, east, north |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resources":
[
-
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id": "string",
-
"type":
"article",
-
"name":
"string",
-
"original_name": "string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate": 0,
-
"resize_master_name": "string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
]
}
Writes the resource and runs the same pipeline the Builder does: the metadata file is written to S3 before this answers. File processing is asynchronous, so a file's derived fields appear on a later read.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
| title |
string
|
| type |
string
What kind of thing it is |
| creator |
string
|
| language |
string
|
| parent_id |
string
The resource this one belongs to |
| access_rights |
string
Enum:
"published"
"unpublished"
"unmoderated"
"draft"
"deleted"
Who can see it |
| source |
string
Which system it came from |
| source_id |
string
What that system calls it |
| location |
Array of numbers
<float> [ items
<float
>
]
Latitude and longitude |
| location_data |
object
|
| location_precision |
string
|
| custom_fields |
object
Values for the site's own fields, keyed by field name |
{
-
"title":
"string",
-
"type":
"string",
-
"creator":
"string",
-
"language":
"string",
-
"parent_id":
"string",
-
"access_rights":
"published",
-
"source":
"string",
-
"source_id":
"string",
-
"location":
[
-
0.1
],
-
"location_data":
{ },
-
"location_precision":
"string",
-
"custom_fields":
{ }
}
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate":
0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
|
site_uuid
required
|
string
|
|
attribute
required
|
string
Which field to suggest for |
|
value
required
|
string
What has been typed so far |
{
-
"suggestions":
[
-
{
-
"attribute":
"string",
-
"suggestions":
[
-
"string"
]
}
]
}
Pages like any other list. The file holds one page, and the paging it was taken from travels in
the Current-Page, Page-Items, Total-Pages and Total-Count headers, since a spreadsheet has nowhere
to carry it. A json export is a Collect_Entities_Public_ResourcesList.
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
1000
Rows per file, to a maximum of 1000 |
| q |
string
Keyword search query |
| order |
string
Default:
"relevance"
Enum:
"relevance"
"title"
"type"
"updated"
"created"
Sort order |
| direction |
string
Default:
"asc"
Enum:
"asc"
"desc"
Sort direction |
| parent_id |
string
Only resources with this parent |
| title |
string
|
| creator |
string
|
| type[] |
Array of strings
|
| language[] |
Array of strings
|
| access_rights[] |
Array of strings
Items
Enum:
"published"
"unpublished"
"unmoderated"
"draft"
"deleted"
Include |
| source[] |
Array of strings
|
| contributor_role[] |
Array of strings
|
| location_precision[] |
Array of strings
|
| source_id |
string
|
| created_at_gt |
string
<date-time>
|
| created_at_lt |
string
<date-time>
|
| updated_at_gt |
string
<date-time>
|
| updated_at_lt |
string
<date-time>
|
| custom_fields |
string
Filters on the site's own fields, keyed by field name |
| ids[] |
Array of strings
Only these resources, which re-fetches a known set in one call |
| with_files |
boolean
Only resources that have at least one file |
| without_files |
boolean
Only resources that have no files |
| bbox[] |
Array of numbers
<float> [ items
<float
>
]
Only resources inside this bounding box: west, south, east, north |
| file_format |
string
Default:
"json"
Enum:
"json"
"xlsx"
Which file to produce |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resources":
[
-
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id": "string",
-
"type":
"article",
-
"name":
"string",
-
"original_name": "string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate": 0,
-
"resize_master_name": "string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
]
}
|
site_uuid
required
|
string
|
| q |
string
Keyword search query |
| order |
string
Default:
"relevance"
Enum:
"relevance"
"title"
"type"
"updated"
"created"
Sort order |
| direction |
string
Default:
"asc"
Enum:
"asc"
"desc"
Sort direction |
| parent_id |
string
Only resources with this parent |
| title |
string
|
| creator |
string
|
| type[] |
Array of strings
|
| language[] |
Array of strings
|
| access_rights[] |
Array of strings
Items
Enum:
"published"
"unpublished"
"unmoderated"
"draft"
"deleted"
Include |
| source[] |
Array of strings
|
| contributor_role[] |
Array of strings
|
| location_precision[] |
Array of strings
|
| source_id |
string
|
| created_at_gt |
string
<date-time>
|
| created_at_lt |
string
<date-time>
|
| updated_at_gt |
string
<date-time>
|
| updated_at_lt |
string
<date-time>
|
| custom_fields |
string
Filters on the site's own fields, keyed by field name |
| ids[] |
Array of strings
Only these resources, which re-fetches a known set in one call |
| with_files |
boolean
Only resources that have at least one file |
| without_files |
boolean
Only resources that have no files |
| bbox[] |
Array of numbers
<float> [ items
<float
>
]
Only resources inside this bounding box: west, south, east, north |
|
fields[]
required
|
Array of strings
Which fields to count over; each one costs a query |
{
-
"facets":
[
-
{
-
"attribute":
"string",
-
"values":
[
-
{
-
"value":
"string",
-
"count":
0
}
]
}
]
}
Takes the ids to restore; there is no form that restores everything, because "everything currently deleted" is not a set a caller can see before asking. Runs in the background and answers 202.
|
site_uuid
required
|
string
|
|
resource_ids
required
|
Array of strings
Which deleted resources to restore |
| access_rights |
string
Default:
"unpublished"
Enum:
"unpublished"
"unmoderated"
"draft"
What to restore them as |
{
-
"resource_ids":
[
-
"string"
],
-
"access_rights":
"unpublished"
}
{
-
"status":
"accepted"
}
Irreversible, and only reaches resources that are already deleted. Either name the ids or pass
all: true; omitting both is refused rather than taken to mean everything. Runs in the
background and answers 202.
|
site_uuid
required
|
string
|
| resource_ids[] |
Array of strings
Which deleted resources to purge |
| all |
boolean
Purge every deleted resource on the site. Say so explicitly. |
{
-
"status":
"accepted"
}
Sets one attribute on the resources named, or on every resource on the site when
all: true is given; omitting both is refused. A field that holds a list needs
edit_modifier and old_values to say what to do with what is already
there. Runs in the background and answers 202.
|
site_uuid
required
|
string
|
|
attribute
required
|
string
Which field to change |
|
new_values
required
|
Array of strings
What to set it to |
| resource_ids |
Array of strings
Which resources to change |
| all |
boolean
Change every resource on the site. Say so explicitly. |
| edit_modifier |
string
Enum:
"append"
"delete"
"replace"
"replace_all"
For a list-valued field: what to do with the values already there |
| old_values |
Array of strings
For a list-valued field: which values to act on |
| exact_match |
boolean
Default:
true
Match the whole creator, not part of it |
{
-
"attribute":
"string",
-
"new_values":
[
-
"string"
],
-
"resource_ids":
[
-
"string"
],
-
"all":
true,
-
"edit_modifier":
"append",
-
"old_values":
[
-
"string"
],
-
"exact_match":
true
}
{
-
"status":
"accepted"
}
|
id
required
|
string
|
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resources":
[
-
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id": "string",
-
"type":
"article",
-
"name":
"string",
-
"original_name": "string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate": 0,
-
"resize_master_name": "string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
]
}
|
id
required
|
string
|
|
site_uuid
required
|
string
|
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate":
0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
Only the attributes sent are changed; anything left out keeps its current value. Writing
access_rights: "deleted" is refused — use DELETE, which is what a soft
delete is called here.
|
id
required
|
string
|
|
site_uuid
required
|
string
|
| title |
string
|
| type |
string
What kind of thing it is |
| creator |
string
|
| language |
string
|
| parent_id |
string
The resource this one belongs to |
| access_rights |
string
Enum:
"published"
"unpublished"
"unmoderated"
"draft"
"deleted"
Who can see it |
| source |
string
Which system it came from |
| source_id |
string
What that system calls it |
| location |
Array of numbers
<float> [ items
<float
>
]
Latitude and longitude |
| location_data |
object
|
| location_precision |
string
|
| custom_fields |
object
Values for the site's own fields, keyed by field name |
{
-
"title":
"string",
-
"type":
"string",
-
"creator":
"string",
-
"language":
"string",
-
"parent_id":
"string",
-
"access_rights":
"published",
-
"source":
"string",
-
"source_id":
"string",
-
"location":
[
-
0.1
],
-
"location_data":
{ },
-
"location_precision":
"string",
-
"custom_fields":
{ }
}
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate":
0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
A soft delete: the resource stops appearing in searches but is still fetchable by id, and can be restored. Nothing purges it from here.
|
id
required
|
string
|
|
site_uuid
required
|
string
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
Comes back unpublished unless told otherwise: what it was before the delete is not
recorded, and unpublished claims only that it is not public, which is true of
anything just restored.
|
id
required
|
string
|
|
site_uuid
required
|
string
|
| access_rights |
string
Default:
"unpublished"
Enum:
"unpublished"
"unmoderated"
"draft"
What to restore it as |
{
-
"access_rights":
"unpublished"
}
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate":
0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| type |
string
Only fields carried by this resource type |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resource_fields":
[
-
{
-
"name":
"string",
-
"type":
"float",
-
"label":
"string",
-
"multiple":
true,
-
"required":
true,
-
"internal":
true,
-
"position":
0,
-
"types":
[
-
"string"
],
-
"valid_options":
[
-
"string"
],
-
"inactive_options":
[
-
"string"
],
-
"option_labels":
{ },
-
"valid_breadcrumbs_options": { },
-
"inactive_breadcrumbs_options": [
-
"string"
],
-
"breadcrumbs_option_labels": { },
-
"authority_group_id":
0,
-
"search":
{
-
"fuzzy":
true,
-
"suggest":
true,
-
"match_weight_admin": 0,
-
"match_weight_exact": 0,
-
"match_weight_fuzzy": 0
},
-
"display":
{
-
"placement":
"string",
-
"public_placement":
"string",
-
"public_position":
0,
-
"public_position_in_filter": "string",
-
"icons":
{ },
-
"allowed_file_types": { }
}
}
]
}
name is how the field is addressed in a resource's custom_fields and
in a search filter, and cannot be changed afterwards. Existing resources are not rewritten: they
simply have no value for it yet.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
name
required
|
string
How the field is addressed. Immutable once set. |
|
label
required
|
string
What people see |
|
field_type
required
|
string
Enum:
"string"
"text"
"formatted_text"
"date"
"edtf_date"
"integer"
"decimal"
"boolean"
"lookup"
"image"
"authority_file"
"url"
"html"
"nested_item"
"breadcrumbs"
What kind of value it holds |
| multiple |
boolean
Whether the field can hold more than one value |
| required |
boolean
Whether a resource must have a value for it |
| internal |
boolean
Whether it is hidden from the public site |
| position |
integer
Where it sits in the list |
|
object
|
|
|
object
|
{
-
"name":
"string",
-
"label":
"string",
-
"field_type":
"string",
-
"multiple":
true,
-
"required":
true,
-
"internal":
true,
-
"position":
0,
-
"settings":
{
-
"authority_group_id":
0,
-
"types":
[
-
"string"
],
-
"placement":
"string",
-
"public_placement":
"string",
-
"public_position":
0,
-
"public_position_in_filter":
"string"
},
-
"search_config":
{
-
"fuzzy":
true,
-
"suggest":
true,
-
"match_weight_exact":
0,
-
"match_weight_fuzzy":
0
}
}
{
-
"name":
"string",
-
"type":
"float",
-
"label":
"string",
-
"multiple":
true,
-
"required":
true,
-
"internal":
true,
-
"position":
0,
-
"types":
[
-
"string"
],
-
"valid_options":
[
-
"string"
],
-
"inactive_options":
[
-
"string"
],
-
"option_labels":
{ },
-
"valid_breadcrumbs_options":
{ },
-
"inactive_breadcrumbs_options":
[
-
"string"
],
-
"breadcrumbs_option_labels":
{ },
-
"authority_group_id":
0,
-
"search":
{
-
"fuzzy":
true,
-
"suggest":
true,
-
"match_weight_admin":
0,
-
"match_weight_exact":
0,
-
"match_weight_fuzzy":
0
},
-
"display":
{
-
"placement":
"string",
-
"public_placement":
"string",
-
"public_position":
0,
-
"public_position_in_filter":
"string",
-
"icons":
{ },
-
"allowed_file_types":
{ }
}
}
Positions are applied together, so the list never passes through a state where two fields claim one position.
|
site_uuid
required
|
string
|
|
required
|
Array of objects
|
{
-
"fields":
[
-
{
-
"field_id":
0,
-
"position":
0
}
]
}
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
name
required
|
string
|
|
site_uuid
required
|
string
|
{
-
"name":
"string",
-
"type":
"float",
-
"label":
"string",
-
"multiple":
true,
-
"required":
true,
-
"internal":
true,
-
"position":
0,
-
"types":
[
-
"string"
],
-
"valid_options":
[
-
"string"
],
-
"inactive_options":
[
-
"string"
],
-
"option_labels":
{ },
-
"valid_breadcrumbs_options":
{ },
-
"inactive_breadcrumbs_options":
[
-
"string"
],
-
"breadcrumbs_option_labels":
{ },
-
"authority_group_id":
0,
-
"search":
{
-
"fuzzy":
true,
-
"suggest":
true,
-
"match_weight_admin":
0,
-
"match_weight_exact":
0,
-
"match_weight_fuzzy":
0
},
-
"display":
{
-
"placement":
"string",
-
"public_placement":
"string",
-
"public_position":
0,
-
"public_position_in_filter":
"string",
-
"icons":
{ },
-
"allowed_file_types":
{ }
}
}
name is absent on purpose: every resource's custom_fields is keyed
by it, so changing one would orphan every value already stored.
|
name
required
|
string
|
|
site_uuid
required
|
string
|
| label |
string
What people see |
| multiple |
boolean
Whether the field can hold more than one value |
| required |
boolean
Whether a resource must have a value for it |
| internal |
boolean
Whether it is hidden from the public site |
| position |
integer
Where it sits in the list |
|
object
|
|
|
object
|
{
-
"label":
"string",
-
"multiple":
true,
-
"required":
true,
-
"internal":
true,
-
"position":
0,
-
"settings":
{
-
"authority_group_id":
0,
-
"types":
[
-
"string"
],
-
"placement":
"string",
-
"public_placement":
"string",
-
"public_position":
0,
-
"public_position_in_filter":
"string"
},
-
"search_config":
{
-
"fuzzy":
true,
-
"suggest":
true,
-
"match_weight_exact":
0,
-
"match_weight_fuzzy":
0
}
}
{
-
"name":
"string",
-
"type":
"float",
-
"label":
"string",
-
"multiple":
true,
-
"required":
true,
-
"internal":
true,
-
"position":
0,
-
"types":
[
-
"string"
],
-
"valid_options":
[
-
"string"
],
-
"inactive_options":
[
-
"string"
],
-
"option_labels":
{ },
-
"valid_breadcrumbs_options":
{ },
-
"inactive_breadcrumbs_options":
[
-
"string"
],
-
"breadcrumbs_option_labels":
{ },
-
"authority_group_id":
0,
-
"search":
{
-
"fuzzy":
true,
-
"suggest":
true,
-
"match_weight_admin":
0,
-
"match_weight_exact":
0,
-
"match_weight_fuzzy":
0
},
-
"display":
{
-
"placement":
"string",
-
"public_placement":
"string",
-
"public_position":
0,
-
"public_position_in_filter":
"string",
-
"icons":
{ },
-
"allowed_file_types":
{ }
}
}
The field stops being offered. Values already stored on resources are left alone, and come back if it is restored.
|
name
required
|
string
|
|
site_uuid
required
|
string
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"vocabularies":
[
-
{
-
"name":
"string",
-
"values":
[
-
{
-
"value":
"string",
-
"label":
"string"
}
]
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| resource_id |
string
Only the files of this resource |
| type |
string
Enum:
"article"
"audio"
"book"
"captions"
"cms_page"
"cover_image"
"image"
"transcription"
"video"
Only files of this type |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate":
0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
Two steps, the same way the Builder writes a file. This records what is coming and answers with a presigned S3 POST; the client then sends the bytes straight to S3. Processing — checksums, dimensions, deep zoom, transcoding — starts when S3 reports the upload and finishes later, so the derived fields appear on a subsequent read.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
resource_id
required
|
string
The resource the file belongs to |
|
name
required
|
string
Filename |
|
type
required
|
string
Enum:
"article"
"audio"
"book"
"captions"
"cms_page"
"cover_image"
"image"
"transcription"
"video"
What kind of file it is |
|
mime_type
required
|
string
|
|
size
required
|
integer
Size in bytes. The upload is pinned to it. |
| md5sum |
string
|
| sha1sum |
string
|
| sha256sum |
string
|
| position |
integer
Where it sits among the resource's files |
{
-
"resource_id":
"string",
-
"name":
"string",
-
"type":
"article",
-
"mime_type":
"string",
-
"size":
0,
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"position":
0
}
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"upload":
{
-
"url":
"string",
-
"fields":
{ }
}
}
Positions are applied together, so the resource never passes through a state where two files claim
one place. Setting position one file at a time does not do that.
|
site_uuid
required
|
string
|
|
resource_id
required
|
string
The resource whose files these are |
|
required
|
Array of objects
|
{
-
"resource_id":
"string",
-
"files":
[
-
{
-
"file_id":
"string",
-
"position":
0
}
]
}
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
id
required
|
string
|
|
site_uuid
required
|
string
|
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate":
0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width":
0,
-
"height":
0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
Changes what is recorded about the file. It does not replace its contents: a new size answers with a fresh presigned POST to upload to.
|
id
required
|
string
|
|
site_uuid
required
|
string
|
| name |
string
Filename |
| type |
string
Enum:
"article"
"audio"
"book"
"captions"
"cms_page"
"cover_image"
"image"
"transcription"
"video"
What kind of file it is |
| mime_type |
string
|
| position |
integer
Where it sits among the resource's files |
| md5sum |
string
|
| sha1sum |
string
|
| sha256sum |
string
|
| size |
integer
Size in bytes |
{
-
"name":
"string",
-
"type":
"article",
-
"mime_type":
"string",
-
"position":
0,
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"size":
0
}
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"upload":
{
-
"url":
"string",
-
"fields":
{ }
}
}
Removes the file and everything derived from it. Unlike a resource, this is not reversible.
|
id
required
|
string
|
|
site_uuid
required
|
string
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| q |
string
Filters by title |
| active |
boolean
Only collections shown on the site's own pages |
| highlighted |
boolean
|
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"collections":
[
-
{
-
"id":
0,
-
"title":
"string",
-
"slug":
"string",
-
"description":
"string",
-
"active":
true,
-
"highlighted":
true,
-
"position":
0,
-
"cover_image_url":
"string",
-
"search_criteria":
{ },
-
"sort_order":
"relevance",
-
"sort_direction":
"asc",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
A collection is a saved search unless sort_order is manual:
search_criteria decides what is in it, in the same filter names the resources
endpoint takes. A manual collection holds an explicit, ordered list of resources instead, and is
created empty. The slug is derived from the title when one is not given.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
title
required
|
string
|
|
description
required
|
string
|
|
search_criteria
required
|
object
What the collection selects |
| slug |
string
What it is called in a URL. Derived from the title when omitted. |
| cover_image_url |
string
|
| active |
boolean
Whether the site's own public pages show it |
| highlighted |
boolean
|
| position |
integer
Display order within the site |
| sort_order |
string
Enum:
"relevance"
"updated"
"title"
"manual"
How its resources are ordered. Switching to |
| sort_direction |
string
Enum:
"asc"
"desc"
Read for |
{
-
"title":
"string",
-
"description":
"string",
-
"search_criteria":
{ },
-
"slug":
"string",
-
"cover_image_url":
"string",
-
"active":
true,
-
"highlighted":
true,
-
"position":
0,
-
"sort_order":
"relevance",
-
"sort_direction":
"asc"
}
{
-
"id":
0,
-
"title":
"string",
-
"slug":
"string",
-
"description":
"string",
-
"active":
true,
-
"highlighted":
true,
-
"position":
0,
-
"cover_image_url":
"string",
-
"search_criteria":
{ },
-
"sort_order":
"relevance",
-
"sort_direction":
"asc",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"id":
0,
-
"title":
"string",
-
"slug":
"string",
-
"description":
"string",
-
"active":
true,
-
"highlighted":
true,
-
"position":
0,
-
"cover_image_url":
"string",
-
"search_criteria":
{ },
-
"sort_order":
"relevance",
-
"sort_direction":
"asc",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
search_criteria replaces what is there rather than merging into it: a half-replaced
set of filters would select something nobody asked for.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
| title |
string
|
| description |
string
|
| search_criteria |
object
Replaces the criteria outright |
| slug |
string
What it is called in a URL. Derived from the title when omitted. |
| cover_image_url |
string
|
| active |
boolean
Whether the site's own public pages show it |
| highlighted |
boolean
|
| position |
integer
Display order within the site |
| sort_order |
string
Enum:
"relevance"
"updated"
"title"
"manual"
How its resources are ordered. Switching to |
| sort_direction |
string
Enum:
"asc"
"desc"
Read for |
{
-
"title":
"string",
-
"description":
"string",
-
"search_criteria":
{ },
-
"slug":
"string",
-
"cover_image_url":
"string",
-
"active":
true,
-
"highlighted":
true,
-
"position":
0,
-
"sort_order":
"relevance",
-
"sort_direction":
"asc"
}
{
-
"id":
0,
-
"title":
"string",
-
"slug":
"string",
-
"description":
"string",
-
"active":
true,
-
"highlighted":
true,
-
"position":
0,
-
"cover_image_url":
"string",
-
"search_criteria":
{ },
-
"sort_order":
"relevance",
-
"sort_direction":
"asc",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A manual collection lists the members an editor added, in their order, and
meta.count is how many it holds: a member since deleted or purged shortens its page
without changing the count. Any other collection lists what its
search_criteria match, ordered by its sort_order and
sort_direction.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resources":
[
-
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id": "string",
-
"type":
"article",
-
"name":
"string",
-
"original_name": "string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate": 0,
-
"resize_master_name": "string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Default:
"active"
Enum:
"all"
"active"
"discarded"
all, active, or discarded |
| published |
boolean
|
| placement |
string
Enum:
"none"
"footer"
"search_tip"
|
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"cms_pages":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"slug":
"string",
-
"published":
true,
-
"status":
"active",
-
"placement":
"string",
-
"primary_language":
"string",
-
"translated_languages":
[
-
"string"
],
-
"title":
{ },
-
"link_text":
{ },
-
"body":
{ },
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
title, link_text and body are per-locale maps, keyed by
language code —
{ "en": "About", "mi": "Mō mātou" }.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
name
required
|
string
What it is called in the Builder |
|
slug
required
|
string
What it is called in a URL |
| title |
object
Page title per locale |
| link_text |
object
Navigation link text per locale |
| body |
object
Markdown body per locale |
| published |
boolean
Whether the public site shows it |
| primary_language |
string
Which locale the page is written in |
{
-
"name":
"string",
-
"slug":
"string",
-
"title":
{ },
-
"link_text":
{ },
-
"body":
{ },
-
"published":
true,
-
"primary_language":
"string"
}
{
-
"id":
0,
-
"name":
"string",
-
"slug":
"string",
-
"published":
true,
-
"status":
"active",
-
"placement":
"string",
-
"primary_language":
"string",
-
"translated_languages":
[
-
"string"
],
-
"title":
{ },
-
"link_text":
{ },
-
"body":
{ },
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"id":
0,
-
"name":
"string",
-
"slug":
"string",
-
"published":
true,
-
"status":
"active",
-
"placement":
"string",
-
"primary_language":
"string",
-
"translated_languages":
[
-
"string"
],
-
"title":
{ },
-
"link_text":
{ },
-
"body":
{ },
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A locale left out of title, link_text or body keeps what it
had; sending one replaces that locale alone.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
| name |
string
What it is called in the Builder |
| slug |
string
What it is called in a URL |
| title |
object
Page title per locale |
| link_text |
object
Navigation link text per locale |
| body |
object
Markdown body per locale |
| published |
boolean
Whether the public site shows it |
| primary_language |
string
Which locale the page is written in |
{
-
"name":
"string",
-
"slug":
"string",
-
"title":
{ },
-
"link_text":
{ },
-
"body":
{ },
-
"published":
true,
-
"primary_language":
"string"
}
{
-
"id":
0,
-
"name":
"string",
-
"slug":
"string",
-
"published":
true,
-
"status":
"active",
-
"placement":
"string",
-
"primary_language":
"string",
-
"translated_languages":
[
-
"string"
],
-
"title":
{ },
-
"link_text":
{ },
-
"body":
{ },
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A soft delete. It stays reachable with status=discarded, and can be restored.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Enum:
"new"
"approved"
"deleted"
"spam"
Moderation state |
| resource_id |
string
Only comments on this resource |
| q |
string
Filters by message |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"comments":
[
-
{
-
"id":
0,
-
"message":
"string",
-
"status":
"new",
-
"resource_id":
"string",
-
"parent_id":
0,
-
"author_name":
"string",
-
"author_username":
"string",
-
"author_email":
"string",
-
"creator_type":
"User",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
Attributed to the key, not to a visitor: creator_type says ApiKey and
the author fields carry the key's name. The site's own
comments_enabled setting gates this, as it gates the Builder.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
resource_id
required
|
string
The resource it is about |
|
message
required
|
string
|
| parent_id |
integer
Set when this replies to another comment |
{
-
"resource_id":
"string",
-
"message":
"string",
-
"parent_id":
0
}
{
-
"id":
0,
-
"message":
"string",
-
"status":
"new",
-
"resource_id":
"string",
-
"parent_id":
0,
-
"author_name":
"string",
-
"author_username":
"string",
-
"author_email":
"string",
-
"creator_type":
"User",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"id":
0,
-
"message":
"string",
-
"status":
"new",
-
"resource_id":
"string",
-
"parent_id":
0,
-
"author_name":
"string",
-
"author_username":
"string",
-
"author_email":
"string",
-
"creator_type":
"User",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
The only thing about a comment that may be changed. Its message is what somebody wrote, so it is not editable here.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
|
status
required
|
string
Enum:
"new"
"approved"
"deleted"
"spam"
What to mark it as |
{
-
"status":
"new"
}
{
-
"id":
0,
-
"message":
"string",
-
"status":
"new",
-
"resource_id":
"string",
-
"parent_id":
0,
-
"author_name":
"string",
-
"author_username":
"string",
-
"author_email":
"string",
-
"creator_type":
"User",
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
Marks it deleted rather than removing the row, which is what the deleted status is.
It stays listable with status=deleted.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| public |
boolean
Only sets the visitor shared |
| sub |
string
Only the sets of one visitor |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"user_sets":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"public":
true,
-
"sub":
"string",
-
"resources_count":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"id":
0,
-
"name":
"string",
-
"public":
true,
-
"sub":
"string",
-
"resources_count":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resources":
[
-
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision":
"string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates":
[ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id": "string",
-
"type":
"article",
-
"name":
"string",
-
"original_name": "string",
-
"mime_type":
"string",
-
"size":
0,
-
"position":
0,
-
"transcoded":
true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width":
0,
-
"height":
0,
-
"duration":
0,
-
"sample_rate": 0,
-
"resize_master_name": "string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
}
]
}
|
site_uuid
required
|
string
|
|
id
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"resource_archive_containers":
[
-
{
-
"id":
0,
-
"position":
0,
-
"container":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description": "string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count": 0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
Counts only. GET ./:id carries what became of each row.
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"spreadsheet_import_jobs":
[
-
{
-
"id":
0,
-
"state":
"pending",
-
"filename":
"string",
-
"total_files_count":
0,
-
"pending_files_count":
0,
-
"processing_files_count":
0,
-
"complete_files_count":
0,
-
"failed_files_count":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
Reads the spreadsheet and reports what it found, without importing anything —
POST ./:id/enqueue is what starts the work. Media named in the spreadsheet is fetched
from the site's SFTP, so that has to be configured first. A spreadsheet that does not parse is
refused outright: no job is created, and the errors name the rows.
|
site_uuid
required
|
string
|
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
spreadsheet
required
|
string
The filled-in template, base64 encoded. A |
| filename |
string
Default:
"import.xlsx"
What to call it in the import's own record |
| folder_id |
string
Which SFTP folder holds the media. Defaults to the site's. |
{
-
"spreadsheet":
"string",
-
"filename":
"import.xlsx",
-
"folder_id":
"string"
}
{
-
"id":
0,
-
"state":
"pending",
-
"filename":
"string",
-
"total_files_count":
0,
-
"pending_files_count":
0,
-
"processing_files_count":
0,
-
"complete_files_count":
0,
-
"failed_files_count":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z",
-
"rows":
[
-
{
-
"line_number":
0,
-
"state":
"string",
-
"filename":
"string",
-
"resource_id":
"string",
-
"file_id":
"string",
-
"import_errors":
[
-
"string"
]
}
]
}
state is pending until it is enqueued, then processing, then complete or failed. The
per-row errors say which line of the spreadsheet failed.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"id":
0,
-
"state":
"pending",
-
"filename":
"string",
-
"total_files_count":
0,
-
"pending_files_count":
0,
-
"processing_files_count":
0,
-
"complete_files_count":
0,
-
"failed_files_count":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z",
-
"rows":
[
-
{
-
"line_number":
0,
-
"state":
"string",
-
"filename":
"string",
-
"resource_id":
"string",
-
"file_id":
"string",
-
"import_errors":
[
-
"string"
]
}
]
}
Queues the rows the upload found. Returns as soon as they are queued; watch the job itself to see them land.
|
id
required
|
integer
|
|
site_uuid
required
|
string
|
{
-
"status":
"accepted"
}
|
site_uuid
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
|
resource_id
required
|
string
The resource whose tags to list |
| user_reference |
string
Only the tags of one visitor |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"user_tags":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"user_reference":
"string",
-
"tags":
[
-
"string"
],
-
"created_at":
"string",
-
"updated_at":
"string"
}
]
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Default:
"active"
Enum:
"all"
"active"
"discarded"
all, active, or discarded |
| ids[] |
Array of integers
|
| q |
string
Filters by name |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_locations":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
| name |
string
What the location is called |
| description |
string
|
| parent_id |
integer
The location this one sits inside |
| tag_list |
Array of strings
Replaces the location's tags outright |
{
-
"name":
"string",
-
"description":
"string",
-
"parent_id":
0,
-
"tag_list":
[
-
"string"
]
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
| name |
string
What the location is called |
| description |
string
|
| parent_id |
integer
The location this one sits inside |
| tag_list |
Array of strings
Replaces the location's tags outright |
{
-
"name":
"string",
-
"description":
"string",
-
"parent_id":
0,
-
"tag_list":
[
-
"string"
]
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A soft delete. The location stays reachable with status=discarded, and can be restored.
|
id
required
|
integer
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
Locations form a tree — Building, Room, Shelf — and this is the only way to re-parent one.
target_id is required for every position but root, and
index additionally for child_with_index.
|
id
required
|
integer
|
|
position
required
|
string
Enum:
"child_of"
"left_of"
"right_of"
"root"
"child_with_index"
Where to put it, relative to target_id |
| target_id |
integer
The location to move relative to |
| index |
integer
Which child to become, for child_with_index |
{
-
"position":
"child_of",
-
"target_id":
0,
-
"index":
0
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Default:
"active"
Enum:
"all"
"active"
"discarded"
all, active, or discarded |
| ids[] |
Array of integers
|
| location_id |
integer
Only containers shelved at this location |
| accession_id |
integer
Only containers linked to this accession |
| q |
string
Filters by name |
| tags[] |
Array of strings
Only containers carrying all of these tags |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_containers":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
| name |
string
What the container is called |
| description |
string
|
| location_id |
integer
Where it is shelved |
| tag_list |
Array of strings
Replaces the container's tags outright |
|
Array of objects
|
{
-
"name":
"string",
-
"description":
"string",
-
"location_id":
0,
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value_or_image_data":
"string",
-
"_destroy":
true
}
]
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
| name |
string
What the container is called |
| description |
string
|
| location_id |
integer
Where it is shelved |
| tag_list |
Array of strings
Replaces the container's tags outright |
|
Array of objects
|
{
-
"name":
"string",
-
"description":
"string",
-
"location_id":
0,
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value_or_image_data":
"string",
-
"_destroy":
true
}
]
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A soft delete. The container stays reachable with status=discarded, and can be restored.
|
id
required
|
integer
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
id
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_container_accessions":
[
-
{
-
"id":
0,
-
"description":
"string",
-
"accession":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
Records that this accession's material is in this container. The same link is writable from the accession's end; it is one row either way, and linking something already linked answers with the link that is there.
|
id
required
|
string
|
|
accession_id
required
|
integer
The accession to link |
| description |
string
What the link is, in the archivist's words |
{
-
"accession_id":
0,
-
"description":
"string"
}
{
-
"id":
0,
-
"description":
"string",
-
"accession":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
accession_id
required
|
integer
|
|
id
required
|
string
|
| description |
string
What the link is, in the archivist's words |
{
-
"description":
"string"
}
{
-
"id":
0,
-
"description":
"string",
-
"accession":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
Removes the link. Neither the container nor the accession is touched.
|
accession_id
required
|
integer
|
|
id
required
|
string
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
id
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_container_resources":
[
-
{
-
"id":
0,
-
"resource_id":
"string",
-
"site_uuid":
"string",
-
"position":
0,
-
"resource":
{
-
"id":
"string",
-
"type":
"string",
-
"files_count":
0,
-
"parent_id":
"string",
-
"title":
"string",
-
"access_rights":
"published",
-
"language":
"string",
-
"contributor_role":
"string",
-
"position":
0,
-
"source":
"string",
-
"source_id":
"string",
-
"creator":
"string",
-
"location":
[
-
0.1
],
-
"location_precision": "string",
-
"location_shape":
{
-
"type":
"string",
-
"coordinates": [ ],
-
"geometries":
[
-
{ }
]
},
-
"location_data":
{ },
-
"admin_state":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"custom_fields":
{ },
-
"files":
[
-
{
-
"id":
"string",
-
"resource_id":
"string",
-
"type":
"article",
-
"name":
"string",
-
"original_name":
"string",
-
"mime_type":
"string",
-
"size":
0,
-
"position": 0,
-
"transcoded": true,
-
"icon_color":
"string",
-
"md5sum":
"string",
-
"sha1sum":
"string",
-
"sha256sum":
"string",
-
"width": 0,
-
"height": 0,
-
"duration": 0,
-
"sample_rate": 0,
-
"resize_master_name":
"string",
-
"created_at":
"string",
-
"updated_at":
"string",
-
"deep_zoom":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"images":
{
-
"original":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"small":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"medium":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"large":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
},
-
"xlarge":
{
-
"url":
"string",
-
"mime_type":
"string",
-
"width": 0,
-
"height": 0
}
},
-
"versions":
{
-
"low":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"med":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"lossy":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_dat":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_json":
{
-
"mime_type":
"string",
-
"url":
"string"
},
-
"waveform_png":
{
-
"mime_type":
"string",
-
"url":
"string"
}
},
-
"documents":
{
-
"pdf":
{
-
"mime_type":
"string",
-
"url":
"string"
}
}
}
]
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Default:
"active"
Enum:
"all"
"active"
"discarded"
all, active, or discarded |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_container_fields":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_container_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
name is how the field is addressed everywhere else and cannot be changed afterwards;
it is lower-cased and underscored on the way in. label is what people see, and can be
changed freely.
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
name
required
|
string
How the field is addressed. Immutable once set. |
|
label
required
|
string
What people see |
|
field_type
required
|
string
Enum:
"string"
"text"
"formatted_text"
"date"
"edtf_date"
"integer"
"decimal"
"boolean"
"lookup"
"image"
"authority_file"
"url"
What kind of value it holds. Immutable once set. |
| multiple |
boolean
Whether the field can hold more than one value |
| position |
integer
Where it sits in the list |
|
object
|
{
-
"name":
"string",
-
"label":
"string",
-
"field_type":
"string",
-
"multiple":
true,
-
"position":
0,
-
"settings":
{
-
"required":
true
}
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_container_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
Positions are applied together, so the list never passes through a state where two fields claim one position.
|
required
|
Array of objects
|
{
-
"fields":
[
-
{
-
"field_id":
0,
-
"position":
0
}
]
}
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
id
required
|
integer
|
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_container_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
name is absent on purpose: values are stored against it, so changing one would orphan
every value already written.
|
id
required
|
integer
|
| label |
string
What people see |
| multiple |
boolean
Whether the field can hold more than one value |
| position |
integer
Where it sits in the list |
|
object
|
{
-
"label":
"string",
-
"multiple":
true,
-
"position":
0,
-
"settings":
{
-
"required":
true
}
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_container_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A soft delete. Values already written against it are left alone, and it can be restored.
|
id
required
|
integer
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Default:
"active"
Enum:
"all"
"active"
"discarded"
all, active, or discarded |
| stage |
string
Enum:
"awaiting_appraisal"
"incoming"
"processing"
"completed"
"declined"
|
| ids[] |
Array of integers
|
| container_id |
integer
Only accessions linked to this container |
| q |
string
Filters by name |
| tags[] |
Array of strings
Only accessions carrying all of these tags |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_accessions":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
| name |
string
What the accession is called |
| description |
string
|
| stage |
string
Enum:
"awaiting_appraisal"
"incoming"
"processing"
"completed"
"declined"
Where it is in processing |
| tag_list |
Array of strings
Replaces the accession's tags outright |
|
Array of objects
|
{
-
"name":
"string",
-
"description":
"string",
-
"stage":
"awaiting_appraisal",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value_or_image_data":
"string",
-
"_destroy":
true
}
]
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
id
required
|
integer
|
| name |
string
What the accession is called |
| description |
string
|
| stage |
string
Enum:
"awaiting_appraisal"
"incoming"
"processing"
"completed"
"declined"
Where it is in processing |
| tag_list |
Array of strings
Replaces the accession's tags outright |
|
Array of objects
|
{
-
"name":
"string",
-
"description":
"string",
-
"stage":
"awaiting_appraisal",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value_or_image_data":
"string",
-
"_destroy":
true
}
]
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"stage":
"awaiting_appraisal",
-
"description":
"string",
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_accession_field_id": 0,
-
"value":
"string"
}
],
-
"resource_ids":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A soft delete. The accession stays reachable with status=discarded, and can be restored.
|
id
required
|
integer
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
Records that this resource came in with this accession. Linking twice is not an error.
|
id
required
|
integer
|
|
resource_id
required
|
string
The resource's UUID |
{
-
"resource_id":
"string"
}
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
id
required
|
string
|
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_accession_containers":
[
-
{
-
"id":
0,
-
"description":
"string",
-
"container":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description": "string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count": 0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
The same link as POST /archive_containers/:id/accessions, written from the other end. It is one row either way.
|
id
required
|
string
|
|
container_id
required
|
integer
The container to link |
| description |
string
What the link is, in the archivist's words |
{
-
"container_id":
0,
-
"description":
"string"
}
{
-
"id":
0,
-
"description":
"string",
-
"container":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
|
container_id
required
|
integer
|
|
id
required
|
string
|
| description |
string
What the link is, in the archivist's words |
{
-
"description":
"string"
}
{
-
"id":
0,
-
"description":
"string",
-
"container":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"location":
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"description":
"string",
-
"parent_id":
0,
-
"depth":
0,
-
"children_count":
0,
-
"tag_list":
[
-
"string"
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"tag_list":
[
-
"string"
],
-
"values":
[
-
{
-
"id":
0,
-
"archive_container_field_id": 0,
-
"value":
"string"
}
],
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| status |
string
Default:
"active"
Enum:
"all"
"active"
"discarded"
all, active, or discarded |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"archive_accession_fields":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_accession_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
name is how the field is addressed everywhere else and cannot be changed afterwards;
it is lower-cased and underscored on the way in. label is what people see, and can be
changed freely.
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
name
required
|
string
How the field is addressed. Immutable once set. |
|
label
required
|
string
What people see |
|
field_type
required
|
string
Enum:
"string"
"text"
"formatted_text"
"date"
"edtf_date"
"integer"
"decimal"
"boolean"
"lookup"
"image"
"authority_file"
"url"
What kind of value it holds. Immutable once set. |
| multiple |
boolean
Whether the field can hold more than one value |
| position |
integer
Where it sits in the list |
|
object
|
{
-
"name":
"string",
-
"label":
"string",
-
"field_type":
"string",
-
"multiple":
true,
-
"position":
0,
-
"settings":
{
-
"required":
true
}
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_accession_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
Positions are applied together, so the list never passes through a state where two fields claim one position.
|
required
|
Array of objects
|
{
-
"fields":
[
-
{
-
"field_id":
0,
-
"position":
0
}
]
}
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
|
id
required
|
integer
|
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_accession_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
name is absent on purpose: values are stored against it, so changing one would orphan
every value already written.
|
id
required
|
integer
|
| label |
string
What people see |
| multiple |
boolean
Whether the field can hold more than one value |
| position |
integer
Where it sits in the list |
|
object
|
{
-
"label":
"string",
-
"multiple":
true,
-
"position":
0,
-
"settings":
{
-
"required":
true
}
}
{
-
"id":
0,
-
"name":
"string",
-
"status":
"active",
-
"field_type":
"string",
-
"label":
"string",
-
"position":
0,
-
"multiple":
true,
-
"lookups":
[
-
{
-
"id":
0,
-
"value":
"string",
-
"label":
"string",
-
"status":
"active",
-
"position":
0,
-
"archive_accession_field_id": 0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
],
-
"settings":
{
-
"required":
true
},
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
A soft delete. Values already written against it are left alone, and it can be restored.
|
id
required
|
integer
|
{
-
"errors":
[
-
{
-
"code":
0,
-
"message":
"string",
-
"region":
"string"
}
]
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| notable_type |
string
Enum:
"Curtis::Resource"
"Archive::Container"
"Archive::Location"
"Archive::Accession"
Only notes on this kind of thing |
| notable_id |
string
Only notes on this one thing; requires notable_type |
| favourited |
boolean
Only notes marked favourite |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"notes":
[
-
{
-
"id":
0,
-
"title":
"string",
-
"body":
"string",
-
"favourited":
true,
-
"notable_type":
"Curtis::Resource",
-
"notable_id":
"string",
-
"user_id":
0,
-
"user_name":
"string",
-
"creator_type":
"User",
-
"creator_name":
"string",
-
"updated_by_user_id":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
]
}
Notes hang off a resource, container, location or accession. The read surface lists them as one account-wide collection, so they are written the same way rather than under each kind of thing.
| idempotency_key |
string
Repeat a create safely: the same key replays the first response for 24 hours. |
|
notable_type
required
|
string
Enum:
"Curtis::Resource"
"Archive::Container"
"Archive::Location"
"Archive::Accession"
What kind of thing the note is about |
|
notable_id
required
|
string
Which one. A UUID for a resource, an id for anything else. |
|
body
required
|
string
|
| title |
string
|
| favourited |
boolean
Default:
false
|
{
-
"notable_type":
"Curtis::Resource",
-
"notable_id":
"string",
-
"body":
"string",
-
"title":
"string",
-
"favourited":
false
}
{
-
"id":
0,
-
"title":
"string",
-
"body":
"string",
-
"favourited":
true,
-
"notable_type":
"Curtis::Resource",
-
"notable_id":
"string",
-
"user_id":
0,
-
"user_name":
"string",
-
"creator_type":
"User",
-
"creator_name":
"string",
-
"updated_by_user_id":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
{
-
"id":
0,
-
"title":
"string",
-
"body":
"string",
-
"favourited":
true,
-
"notable_type":
"Curtis::Resource",
-
"notable_id":
"string",
-
"user_id":
0,
-
"user_name":
"string",
-
"creator_type":
"User",
-
"creator_name":
"string",
-
"updated_by_user_id":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
Records the key as the last editor. The note's original author is unchanged.
|
id
required
|
integer
|
| body |
string
|
| title |
string
|
| favourited |
boolean
|
{
-
"body":
"string",
-
"title":
"string",
-
"favourited":
true
}
{
-
"id":
0,
-
"title":
"string",
-
"body":
"string",
-
"favourited":
true,
-
"notable_type":
"Curtis::Resource",
-
"notable_id":
"string",
-
"user_id":
0,
-
"user_name":
"string",
-
"creator_type":
"User",
-
"creator_name":
"string",
-
"updated_by_user_id":
0,
-
"created_at":
"2019-08-24T14:15:22Z",
-
"updated_at":
"2019-08-24T14:15:22Z"
}
| page |
integer
Default:
1
Page number, from 1 |
| per_page |
integer
Default:
25
Results per page, to a maximum of 1000 |
| trackable_type |
string
Enum:
"Archive::Container"
"Archive::Location"
"Archive::Accession"
Only changes to this kind of record |
| trackable_id |
integer
Only changes to this one record; requires trackable_type |
| key |
string
Enum:
"archive_container.create"
"archive_container.destroy"
"archive_container.update"
"archive_container.discard"
"archive_container.undiscard"
"archive_container.move"
"archive_container.note_added"
"archive_container.accession_linked"
"archive_container.accession_unlinked"
"archive_container.resource_linked"
"archive_container.resource_unlinked"
"archive_container.resources_reordered"
"archive_location.create"
"archive_location.destroy"
"archive_location.update"
"archive_location.discard"
"archive_location.undiscard"
"archive_location.note_added"
"archive_accession.create"
"archive_accession.destroy"
"archive_accession.update"
"archive_accession.discard"
"archive_accession.undiscard"
"archive_accession.note_added"
"archive_accession.container_linked"
"archive_accession.container_unlinked"
Only this kind of change |
{
-
"meta":
{
-
"page":
0,
-
"pages":
0,
-
"per_page":
0,
-
"count":
0
},
-
"activities":
[
-
{
-
"id":
0,
-
"key":
"archive_container.create",
-
"trackable_type":
"Archive::Container",
-
"trackable_id":
0,
-
"owner_id":
0,
-
"owner_name":
"string",
-
"parameters":
{ },
-
"created_at":
"2019-08-24T14:15:22Z"
}
]
}