| Back | Main view

IMiS/Storage Connector Services REST - Object transfer

Product:IMiS/StorageConnector Services REST
Release:9.6.2010
Date:02/23/2021

Case: IMiS/Storage Connector Services REST - Object transfer

Description:

This example demonstrates operations which transfers objects from unstructured object storage (Stages) to structured storage on the IMiS/ARChive Server.
Requests and responses are in JSON format.
Below is a description of operations for the object transfer.


1. Object transfer

Operation transfer the object from unstructured object storage with identifier "ID_2001" to entity with classification code "C=3^C=92^D=000001". The same can be applied to examples using internal or external entity identifiers.

Request
POST archives/{archiveId}/batch/create.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "entities": [
    {
      "id_type": "C",
      "id": "C=3^C=92^D=000001",
      "object_transfer": [
        {
          "id": "ID_2001"
        }
      ]
    }
  ]
}

Response

Body:
{
  "size": 1,
  "entities": [
    {
       ... <updated state of target entity> ...
    }
  ]
}


2. Object and identifier transfer

Operation transfer the object and identifier from unstructured object storage with identifier "ID_1601" to entity with classification code "C=3^C=92^D=000002".
Identifier "ID_1601" is transferred to entity's external identifiers property list.

Request
POST archives/{archiveId}/batch/create.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "entities": [
    {
      "id_type": "C",
      "id": "C=3^C=92^D=000002",
      "update": true,
      "object_transfer": [
        {
          "id": "ID_1601",
          "transfer_id": true
        }
      ]
    }
  ]
}

Response

Body:
{
  "size": 1,
  "entities": [
    {
      ... <updated state of target entity> ...
    }
  ]
}


3. Entity create, object and identifier transfer

Operation creates new entity with template "Document" and title "Document 2023" under specified entity and transfers the object and identifier from unstructured object storage with identifier "ID_2023".
Identifier "ID_2023" is transferred to entity's external identifiers property list.

Request
POST archives/{archiveId}/entities/{entityId}/batch/create.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "entities": [
    {
      "title": "Document 2023",
      "template": "Document",
      "object_transfer": [
        {
          "id": "ID_2023",
          "transfer_id": true
        }
      ]
    }
  ]
}

Response

Body:
{
  "size": 1,
  "entities": [
    {
      ... <updated state of target entity> ...
    }
  ]
}




4. Multiple entity create with search and object transfer

Operation creates 2 entities, if the search expression in Body does not find any result for each entity:
1. Entity with template "Case" and title "Case01" under specified entity in URL (entityId).
2. Entity with template "FiledDocument" and title "ObjectTransferDocument01" under specified entity in Body with title "Case01" and transfers the object from unstructured object storage with identifier "snuJyd2UkKR7L77rMhVJpEs46Lividj-".

Request
POST archives/{archiveId}/entities/{entityId}/batch/create.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "entities": [
    {
      "title": "Case01",
      "template": "Case",
      "search": "[sys:Title]=\"Case01\"",
      "entities": [
        {
          "title": "ObjectTransferDocument01",
          "template": "FiledDocument",
          "search": "[sys:Title]=\"ObjectTransferDocument01\"",
          "object_transfer": [
            {
              "id": "snuJyd2UkKR7L77rMhVJpEs46Lividj-"
            }
          ]
        }
      ]
    }
  ]
}

Response

Body:
{
  "size": 2,
  "entities": [
    {
      ... <updated state of entity> ...
    }
  ]
}



Related Documents:



| Back | Main view