Skip to content

Space

Spaces allow you to partition assets into groups. You can use them to organise your assets logically, like folders. You can also define different default settings to apply to assets when they are registered in a Space - for example, default delivery channels. These can be overridden for individual assets. There is no limit to the number of assets you can register in a space.

{
"@context": "https://dlcs.github.io/vocab/context/future.json",
"@id": "https://api.dlcs.example/customers/2/spaces/99",
"@type": "vocab:Space",
"id": 36,
"name": "An example space",
"created": "2022-08-11T13:00:32.2635950Z",
"approximateNumberOfImages": 4,
"images": "https://api.dlcs.example/customers/2/spaces/99/images",
"defaultDeliveryChannels": "https://api.dlcs.example/customers/2/spaces/99/defaultDeliveryChannels",
"defaultRoles": [ "https://api.dlcs.example/customers/2/roles/clickthrough" ],
"defaultTags": [ "green", "red" ],
"storage": "https://api.dlcs.example/customers/2/spaces/99/storage"
}

/customers/{customer}/spaces/{spaceId}

MethodLabelExpectsReturnsStatus
GETRetrieve a Space-vocab:Space200 OK, 404 Not Found
PUTCreate or update a space. PUT allows you to specify the integer space IDvocab:Spacevocab:Space200 OK, 201 Created, 400 Bad request, 409 Conflict
PATCHModify one or more fields of a space.vocab:Spacevocab:Space200 OK, 400 Bad request, 404 Not found, 409 Conflict
DELETEDelete a space. If the space is not empty, the response is 409 Conflict.--204 No Content, 404 Not found, 409 Conflict

The model id or integer identifier of a space. This is provided for read convenience, you can’t set it yourself. When creating a new Space, the platform will assign the next available integer id when you POST to customer.spaces, or you can PUT to a particular space URL, e.g.,

PUT /customers/2/spaces/3333
{
"name": "My space with all the 3s",
}
domainrangereadonlywriteonly
vocab:Spacexsd:integerTrueFalse

A friendly name for the space. This is for your use in the portal (like a folder name) - it doesn’t get displayed to users.

domainrangereadonlywriteonly
vocab:Spacexsd:stringFalseFalse

Date the space was created.

domainrangereadonlywriteonly
vocab:Spacexsd:dateTimeTrueFalse

The number of assets (not just images) in the space. This figure may not be accurate while you are adding assets but will eventually become accurate.

domainrangereadonlywriteonly
vocab:Spacexsd:integerTrueFalse

All the assets (not just images) in the Space. This is presented as a Hydra Collection of assets, and can take any asset query to filter the returned collection. You can also adjust the page size to suit your application needs (the default is 100).

domainrangereadonlywriteonly
vocab:Space🔗 hydra:Collection (of vocab:Image)TrueFalse

/customers/{customer}/spaces/{spaceId}/images

MethodLabelExpectsReturnsStatus
GET(with optional query parameter).-hydra:Collection200 OK
PATCHUpdate one or more assets🔗 hydra:Collection (of vocab:Image)🔗 hydra:Collection (of vocab:Image)200 OK, 400 Bad Request

The PATCH operation performs a bulk update of assets in the space. The body is a Hydra Collection whose member array contains the assets to update; each member must include its id, and the same id may not appear twice. There is a maximum number of assets in a single call (250 by default; deployments can configure this).

The PATCH operation is only permitted for changes to assets that do not require reprocessing, because it updates the submitted assets synchronously. Therefore changes to metadata fields like string1, tags or roles can be patched, but changes to fields like origin, maxWidth or deliveryChannels are rejected with 400 Bad Request. Assets are updated one at a time: if an update fails partway through, changes already applied to earlier members are not rolled back.

A link to a paged Collection of default Delivery Channels. These are only used when you register an asset without supplying any delivery channels on the submitted asset resource. The platform uses the mediaType of the asset to match one of these. It looks in the defaultDeliveryChannels property of the asset’s Space first, and continues looking at this customer level if none match from those in the space.

domainrangereadonlywriteonly
vocab:Space🔗 hydra:Collection (of vocab:DeliveryChannel)TrueFalse

Unlike delivery channels on assets, any delivery channels listed here MUST have the mediaType property, which is used by the platform to match them to an asset. See Delivery Channels.

/customers/{customer}/spaces/{space}/defaultDeliveryChannels

MethodLabelExpectsReturnsStatus
GETList all your default Delivery Channels-A paged hydra:Collection of vocab:DeliveryChannel200 OK
POSTAdd a new default Delivery Channel. The body must include the mediaType property. The platform will create a GUID for the last path element, which you can use on PUT and DELETE operations.-vocab:DeliveryChannel201 Created

See also the PUT and DELETE operations on DeliveryChannel.

NB this is not a collection of collections like deliveryChannelPolicies.

An array of strings where the strings are URIs of Roles defined under customer.roles.

These are the default Roles for assets in this space.

domainrangereadonlywriteonly
vocab:SpaceArray of xsd:stringFalseFalse

An array of string tags.

The tags can be any string. You can use tags (set directly on assets) in API asset queries and in named queries.

domainrangereadonlywriteonly
vocab:SpaceArray of xsd:stringFalseFalse

Returns information about storage usage for the customer within this Space. See the StoragePolicy topic for more information.

domainrangereadonlywriteonly
vocab:Spacevocab:CustomerStorageTrueFalse

/customers/{customer}/spaces/{space}/storage

MethodLabelExpectsReturnsStatus
GETReturns the storage resource for this space-vocab:CustomerStorage200 OK