|
| 1 | +# 7. Image Sets |
| 2 | + |
| 3 | +#### Image Set object |
| 4 | + |
| 5 | +Each image set returned from the API is a JSON object with the following properties: |
| 6 | + |
| 7 | +- `id`: (read only) The ID of the image set. |
| 8 | +- `name`: The name of the image set. |
| 9 | +- `description`: The description of the image set. |
| 10 | +- `attribution`: The attribution of the image set. |
| 11 | +- `owner`: (read only) The owner of the image set. The value is a [user object](#user-object) |
| 12 | + which contains the properties of the owner. |
| 13 | +- `collection`: (read only) The collection of the image set. The value is a [collection object](#collection-object) |
| 14 | + which contains the properties of the collection. |
| 15 | +- `publication`: (read only) The publication of the image set. The value is a publication object with the following |
| 16 | + properties: |
| 17 | + - `id`: The ID of the publication. |
| 18 | + - `image_set_id`: The ID of the image set of the publication. |
| 19 | + - `active`: Whether the publication is active. |
| 20 | + - `created_at`: The datetime when the publication is created. |
| 21 | + - `updated_at`: The datetime when the publication is updated. |
| 22 | +- `allowed_languages`: (read only) The allowed annotation languages of the image set. The value is an array of language |
| 23 | + objects with the following properties: |
| 24 | + - `name`: The name of the language. |
| 25 | + - `code`: The code of the language. |
| 26 | +- `thumbnail`: (read only) The URL of the thumbnail of the image set. |
| 27 | +- `image_count`: (read only) The number of images in the image set. |
| 28 | +- `created_at`: (read only) The datetime when the image set is created. |
| 29 | +- `updated_at`: (read only) The datetime when the image set is updated. |
| 30 | +- `policies`: (read only) The policies applied to the image set for the current user. The value is an array of |
| 31 | + permission names which the current user has on the image set. The permission names are: |
| 32 | + - `access`: The user can view or annotate the image set. |
| 33 | + - `write`: The user can update the image set properties. |
| 34 | + - `manage`: The user can publish the image set. |
| 35 | + - `delete`: The user can delete the image set. |
| 36 | + |
| 37 | +#### Get all image sets |
| 38 | + |
| 39 | +``` |
| 40 | +GET /collections/{collection_id}/image-sets |
| 41 | +``` |
| 42 | + |
| 43 | +Get all image sets in a collection. |
| 44 | + |
| 45 | +##### URL parameters |
| 46 | + |
| 47 | +- `collection_id`: The ID of the collection. |
| 48 | + |
| 49 | +##### Response |
| 50 | + |
| 51 | +An array of image set objects. |
| 52 | + |
| 53 | +#### Create an image set |
| 54 | + |
| 55 | +``` |
| 56 | +POST /collections/{collection_id}/image-sets |
| 57 | +``` |
| 58 | + |
| 59 | +Create an image set in a collection. |
| 60 | + |
| 61 | +##### URL parameters |
| 62 | + |
| 63 | +- `collection_id`: The ID of the collection. |
| 64 | + |
| 65 | +##### Request |
| 66 | + |
| 67 | +The request body should be an image set object used to create a new image set. Read only properties will be ignored. |
| 68 | + |
| 69 | +It also accepts a few additional properties in the image set object: |
| 70 | + |
| 71 | +- `allowed_languages`: An array of language codes which are allowed to be used in the image set for annotations. |
| 72 | +- `image_ids`: An array of IDs of the images which should be added to the image set. |
| 73 | + |
| 74 | +##### Response |
| 75 | + |
| 76 | +The image set object of the newly created image set. |
| 77 | + |
| 78 | +#### Get an image set |
| 79 | + |
| 80 | +``` |
| 81 | +GET /collections/{collection_id}/image-sets/{id} |
| 82 | +``` |
| 83 | + |
| 84 | +Get an image set by its ID. |
| 85 | + |
| 86 | +##### URL parameters |
| 87 | + |
| 88 | +- `collection_id`: The ID of the collection. |
| 89 | +- `id`: The ID of the image set. |
| 90 | + |
| 91 | +##### Response |
| 92 | + |
| 93 | +The image set object of the queried image set. |
| 94 | + |
| 95 | +#### Update an image set |
| 96 | + |
| 97 | +``` |
| 98 | +PUT /collections/{collection_id}/image-sets/{id} |
| 99 | +``` |
| 100 | + |
| 101 | +Update an image set by its ID. |
| 102 | + |
| 103 | +##### URL parameters |
| 104 | + |
| 105 | +- `collection_id`: The ID of the collection. |
| 106 | +- `id`: The ID of the image set. |
| 107 | + |
| 108 | +##### Request |
| 109 | + |
| 110 | +The request body should be an image set object used to update the image set. Read only properties will be ignored. |
| 111 | + |
| 112 | +It also accepts a few additional properties in the image set object: |
| 113 | + |
| 114 | +- `allowed_languages`: An array of language codes which are allowed to be used in the image set for annotations. |
| 115 | +- `image_ids`: An array of IDs of the images which should be added to the image set. |
| 116 | +- `published`: The publishing status of the image set. If it is set to `true`, the image set will be published. If it |
| 117 | + is set to `false`, the image set will be unpublished. |
| 118 | + |
| 119 | +##### Response |
| 120 | + |
| 121 | +The image set object after the update. |
| 122 | + |
| 123 | +#### Delete an image set |
| 124 | + |
| 125 | +``` |
| 126 | +DELETE /collections/{collection_id}/image-sets/{id} |
| 127 | +``` |
| 128 | + |
| 129 | +Delete an image set by its ID. |
| 130 | + |
| 131 | +##### URL parameters |
| 132 | + |
| 133 | +- `collection_id`: The ID of the collection. |
| 134 | +- `id`: The ID of the image set. |
| 135 | + |
| 136 | +##### Response |
| 137 | + |
| 138 | +The image set object of the deleted image set. |
| 139 | + |
| 140 | +#### Import IIIF manifest |
| 141 | + |
| 142 | +``` |
| 143 | +POST /collections/{collection_id}/import/manifest |
| 144 | +``` |
| 145 | + |
| 146 | +Import images from a IIIF manifest to an image set in a collection. |
| 147 | + |
| 148 | +##### URL parameters |
| 149 | + |
| 150 | +- `collection_id`: The ID of the collection. |
| 151 | + |
| 152 | +##### Request |
| 153 | + |
| 154 | +The request body should be an object with the following properties: |
| 155 | + |
| 156 | +- `manifest`: The URL of the IIIF manifest. |
| 157 | + |
| 158 | +##### Response |
| 159 | + |
| 160 | +The image set object created from the IIIF manifest. |
0 commit comments