Object

MCM module
Object extension

The Object extension gets, sets and updates objects in the database.

Object/Get

Retrieves objects according to a query.

Object/Get is the main search and object retrieval function in CHAOS.

Parameters:
  • query – the Solr search query (See The Index)
  • pageIndex (optional) – the index of page that should be returned
  • pageSize (optional) – the number of object returned (one request gives one page)
  • includeMetadata (optional) – whether metadata should be returned for each object
  • includeFiles (optional) – whether files should be returned for each object
  • includeAccessPoints (optional) – whether accessPoints should be returned for each object
  • includeObjectRelations (optional) – whether objectRelations should be returned for each object
  • includeFolders (optional) – whether objectRelations should be returned for each object
  • accessPointGUID (optional) –
  • sessionGUID (optional) – the GUID of an authorized session
Returns:

A list of objects

Either an authorized sessionGUID or accessPointGUID must be provided.

By default no files, metadata, accessPoints or object relations will be returned.

Object/SetPublishSettings

Publishes/unpublishes an object on an accessPointGUID in a given time period (or indefinitely).

The accessPointGUID must exists in the database in order to publish on it. As of 7th October 2013 you cannot create an accessPointGUID in the database via the API.

Authentication:
  • Logged in – You need to be logged in to use this feature
  • Write permission – you need have write-permission to the AccessPoint you are publishing to.
Parameters:
  • objectGUID – the GUID of the object for which you want to set accessPointGUID
  • accessPointGUID – the accessPointGUID you want to publish on
  • sessionGUID – the GUID of an authorized session
  • startDate (optional) – the start of publishing period
  • endDate (optional) – the end of the publishing period
Returns:

  • On success: CHAOS.Portal.DTO.Standard.ScalarResult with value 1
  • On error: a number of different errors can be given on erroneous dates, accessPointsGUID or objectsGUIDs. If the accessPoint does not exists you will get CHAOS.Portal.Exception.InsufficientPermissionsException

startDate and endDate should be in the format DD-MM-YYYY HH:MM:SS where the first MM is month and the seconds is minutes. e.g. 03-10-2013 14:25:42 is the 3rd of October 2013, twenty-five minutes and fourty-two seconds past 2 PM.

If no startDate is given the object will is unpublished, i.e. it will not be accessible from the given accessPoint. That is the following situations will unpublish the object:

SetPublishSettings parameters
startDate endDate What happens
not given not given Object is unpublished
not given given Object is unpublished
given not given Object is published indefinitely
given given Object is published in given time period

If startDate is given but no endDate is given the object will be published until you change the publish period or remove the accessPoint.

http://api.danskkulturarv.dk/Object/SetPublishSettings?accessPointGUID=7A06C4FF-D15A-48D9-A908-088F9796AF28&objectGUID=00000000-0000-0000-0000-000000820016&sessionGUID=9755b31c-c0d4-2a47-9605-487b1401d1fa&startDate=01-10-2013+06:00:00

<PortalResult Duration="104">
  <ModuleResults>
    <ModuleResult Fullname="MCM" Duration="0" Count="1">
      <Results>
        <Result FullName="CHAOS.Portal.DTO.Standard.ScalarResult">
          <Value>1</Value>
        </Result>
      </Results>
    </ModuleResult>
  </ModuleResults>
</PortalResult>
Object/Create

Creates an Object.

Authentication:
  • Logged in – You need to be logged in to use this feature
  • Permission to folder – You need to have permission to create objects in the folder (FolderPermission.CreateUpdateObjects)
Parameters:
  • guid (optional) – The GUID of the new object
  • objectTypeID – ID of the ObjectType of the new object
  • folderID – The ID of folder in which the object should be created
Returns:

The created Object

If no GUID is given, CHAOS will generate a guid for the new object.

Object/Delete

Deletes an Object.

Authentication:
  • Logged in – You need to be logged in to use this feature
  • Permission to folder – You need to have permission to delete objects in the folder in which the object resides (FolderPermission.DeleteObject)
Parameters:

guid – The GUID of the object to delete

Returns:

The number of affected rows in the database