# API-Vitam Version Alpha - Collect version v1

https://api.vitam.gouv.fr/collect-external/{version}

- version: required(v1)

### Avertissements

Cette version d'API présente des fonctionnalités sous différents statuts :

- `Usage non recommandé en production en dehors de vitam-UI, utiliser les "profils de sécurité" afin d'en interdire l'usage si nécessaire`

- Supportées : rien n'est spécifié, la fonctionnalité ou la donnée est supportée

Pour le détail du modèle de chaque collection, se référer à la documentation du modèle de données.

### Licence

Ce document est distribué sous les termes de la Licence Ouverte V2.0

### API Collect

API Collect

### Projects

API de collecte. Ce point d'entrée permet d'initialiser et de gérer un projet de versement.

Création d'un projet :

- une requête unique, avec un 'body' contenant toutes les informations au format JSON :
- ArchivalAgencyIdentifier
- TransferringAgencyIdentifier
- OriginatingAgencyIdentifier
- SubmissionAgencyIdentifier
- MessageIdentifier
- ArchivalAgreement
- unitUp
- Comment
- LegalStatus
- Name
- TransformationRules (beta, peut être modifié ou supprimé lors d'une prochaine release)

#### /projects post put get

post

- request body : JSON object
- response : JSON of saved project / HTTP CODE 200

put

- request body : JSON object
- response : JSON of saved project / HTTP CODE 200

get

- request body : JSON object
- response : JSON of saved project / HTTP CODE 200

#### post /projects

- request body : JSON object
- response : JSON of saved project / HTTP CODE 200

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### Headers

- x-tenant-id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: object

Example:

    {
      "ArchivalAgencyIdentifier": "Identifier0",
      "TransferringAgencyIdentifier": "Identifier3",
      "OriginatingAgencyIdentifier": "FRAN_NP_009915",
      "SubmissionAgencyIdentifier": "FRAN_NP_005061",
      "MessageIdentifier": "20220302-000005",
      "Name": "Project Name",
      "LegalStatus": "Archives privées",
      "AcquisitionInformation": "Versement",
      "ArchivalAgreement":"IC-000001",
      "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
      "UnitUp": "aeaqaaaaaahgnz5dabg42amava5kfoqaaaba",
      "TransformationRules": "{ \n \"Title\": .Title + \" - TRANSFORMED\", // Add suffix to Title field \n \"MyStatus\": [\"Verified\"], // Adds a new field \n *: . // Copies all fields from the input JSON \n }"
    }

## HTTP status code 200

Returns the saved transaction

### Body

Media type: application/json

Type: object

Example:

    {
        "httpCode": 200,
        "$hits": {
            "total": 1,
            "offset": 0,
            "limit": 0,
            "size": 1
        },
        "$results": [
            {
                "#id": "aeaaaaaaaahago4caajvgamet3mprkqaaaaq",
                "Name": "This is my Name",
                "ArchivalAgreement": "IC-000001",
                "MessageIdentifier": "20220302-000005",
                "ArchivalAgencyIdentifier": "Identifier0",
                "TransferringAgencyIdentifier": "Identifier3",
                "OriginatingAgencyIdentifier": "FRAN_NP_009915",
                "SubmissionAgencyIdentifier": "FRAN_NP_005061",
                "AcquisitionInformation": "Versement",
                "LegalStatus": "Archives privées",
                "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
                "UnitUp": "aeaqaaaaaahgnz5dabg42amava5kfoqaaaba",
                "TransformationRules": "{ \n \"Title\": .Title + \" - TRANSFORMED\", // Add suffix to Title field \n \"MyStatus\": [\"Verified\"], // Adds a new field \n *: . // Copies all fields from the input JSON \n }",
                "#tenant": 0
            }
        ],
        "$facetResults": [],
        "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### put /projects

- request body : JSON object
- response : JSON of saved project / HTTP CODE 200

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### Headers

- x-tenant-id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: object

Example:

    {
        "#id": "aeaaaaaaaahago4caajvgamet3mprkqaaaaq",
        "Name": "This is my Name",
        "ArchivalAgreement": "IC-000001",
        "MessageIdentifier": "20220302-000005",
        "ArchivalAgencyIdentifier": "Identifier0",
        "TransferringAgencyIdentifier": "Identifier3",
        "OriginatingAgencyIdentifier": "FRAN_NP_009915",
        "SubmissionAgencyIdentifier": "FRAN_NP_005061",
        "AcquisitionInformation": "Versement",
        "LegalStatus": "Archives privées",
        "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
        "UnitUp": "aeaqaaaaaahgnz5dabg42amava5kfoqaaaba",
        "TransformationRules": "{ \n \"Title\": .Title + \" - TRANSFORMED\", // Add suffix to Title field \n \"MyStatus\": [\"Verified\"], // Adds a new field \n *: . // Copies all fields from the input JSON \n }",
        "#tenant": 0
    }

## HTTP status code 200

Returns the saved transaction

### Body

Media type: application/json

Type: object

Example:

    {
        "httpCode": 200,
        "$hits": {
            "total": 1,
            "offset": 0,
            "limit": 0,
            "size": 1
        },
        "$results": [
            {
                "#id": "aeaaaaaaaahago4caajvgamet3mprkqaaaaq",
                "Name": "This is my Name",
                "ArchivalAgreement": "IC-000001",
                "MessageIdentifier": "20220302-000005",
                "ArchivalAgencyIdentifier": "Identifier0",
                "TransferringAgencyIdentifier": "Identifier3",
                "OriginatingAgencyIdentifier": "FRAN_NP_009915",
                "SubmissionAgencyIdentifier": "FRAN_NP_005061",
                "AcquisitionInformation": "Versement",
                "LegalStatus": "Archives privées",
                "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
                "UnitUp": "aeaqaaaaaahgnz5dabg42amava5kfoqaaaba",
                "TransformationRules": "{ \n \"Title\": .Title + \" - TRANSFORMED\", // Add suffix to Title field \n \"MyStatus\": [\"Verified\"], // Adds a new field \n *: . // Copies all fields from the input JSON \n }",
                "#tenant": 0
            }
        ],
        "$facetResults": [],
        "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### get /projects

- request body : JSON object
- response : JSON of saved project / HTTP CODE 200

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### Headers

- x-tenant-id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
        "httpCode": 200,
        "$hits": {
            "total": 1,
            "offset": 0,
            "limit": 0,
            "size": 1
        },
        "$results": [
            [
                {
                    "id": "aeeaaaaaachguhgcabg2kambqwah7zaaaaaq",
                    "ArchivalAgreement": "IC-000001",
                    "MessageIdentifier": "20220302-000005",
                    "ArchivalAgencyIdentifier": "Identifier0",
                    "TransferingAgencyIdentifier": "Identifier3",
                    "OriginatingAgencyIdentifier": "FRAN_NP_009915",
                    "SubmissionAgencyIdentifier": "FRAN_NP_005061",
                    "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
                    "tenant": 0,
                    "unitUp": "aeaqaaaaaahgnz5dabg42amava5kfoqaaaba"
                }
            ]
        ],
        "$facetResults": [],
        "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /projects/{id} delete

API de collecte. Ce point d'entrée permet de supprimer un projet.

delete

#### delete /projects/{id}

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- x-tenant-id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

## HTTP status code 200

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /projects/{id}/transactions post

post

- request body : JSON object
- response : JSON of saved transaction / HTTP CODE 200

#### post /projects/{id}/transactions

- request body : JSON object
- response : JSON of saved transaction / HTTP CODE 200

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- x-tenant-id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: object

Example:

    {
      "ArchivalAgencyIdentifier": "Vitam",
      "TransferingAgencyIdentifier": "AN",
      "OriginatingAgencyIdentifier": "MICHEL_MERCIER",
      "SubmissionAgencyIdentifier": "MICHEL_MERCIER",
      "MessageIdentifier": "20220302-000005",
      "ArchivalAgreement":"IC-000001",
      "Comment": "Versement du service producteur : Cabinet de Michel Mercier"
    }

## HTTP status code 200

Returns the saved transaction

### Body

Media type: application/json

Type: object

Example:

    {
        "httpCode": 200,
        "$hits": {
            "total": 1,
            "offset": 0,
            "limit": 0,
            "size": 1
        },
        "$results": [
            {
                "#id": "aeeaaaaaachago4caajvgamet3sv5riaaaaq",
                "ArchivalAgreement": "IC-000001",
                "MessageIdentifier": "20220302-000005",
                "ArchivalAgencyIdentifier": "Vitam",
                "TransferringAgencyIdentifier": "AN",
                "OriginatingAgencyIdentifier": "MICHEL_MERCIER",
                "SubmissionAgencyIdentifier": "MICHEL_MERCIER",
                "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
                "#tenant": 0
            }
        ],
        "$facetResults": [],
        "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /projects/{id}/upload post

post

Permet de soumettre un ensemble de binaire au format Zip. L'arborescence est rattachée à une transaction auto-générée dont l'identifiant est retourné à l'appelant. Optionnellement, le Zip peut contenir un fichier "metadata.csv" ou "metadata.jsonl" décrivant l'ensemble des métadonnées de l'arborescence.

Il est à noter que dans le cas d'un fichier de métadonnées au format JSONL (metadata.jsonl), la sélection des métadonnées peut se faire uniquement via le champ `File` ou via un sélecteur (champ `Selector`), limité à la clé `#uploadFile`.

Attention : Cette API est alpha / expérimentale.

#### post /projects/{id}/upload

Permet de soumettre un ensemble de binaire au format Zip. L'arborescence est rattachée à une transaction auto-générée dont l'identifiant est retourné à l'appelant. Optionnellement, le Zip peut contenir un fichier "metadata.csv" ou "metadata.jsonl" décrivant l'ensemble des métadonnées de l'arborescence.

Il est à noter que dans le cas d'un fichier de métadonnées au format JSONL (metadata.jsonl), la sélection des métadonnées peut se faire uniquement via le champ `File` ou via un sélecteur (champ `Selector`), limité à la clé `#uploadFile`.

Attention : Cette API est alpha / expérimentale.

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Encoding: (string)

  Encodage du zip, par default VITAM utilise UTF-8

- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/zip

Type: any

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 200,
      "$hits": {
        "total": 1,
        "offset": 0,
        "limit": 0,
        "size": 1
      },
      "$results": [ "VIRTUAL_TX_aeaqaaaaaaecg2hmabhlsammhkxs45iaaaca" ],
      "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

### Transactions

#### /transactions put

put

- request body : JSON object
- response : JSON of saved transaction / HTTP CODE 200

#### put /transactions

- request body : JSON object
- response : JSON of saved transaction / HTTP CODE 200

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### Headers

- x-tenant-id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: object

Example:

    {
                "#id": "aeeaaaaaachago4caajvgamet3sv5riaaaaq",
                "ArchivalAgreement": "IC-000001",
                "MessageIdentifier": "20220302-000005",
                "ArchivalAgencyIdentifier": "Vitam",
                "TransferringAgencyIdentifier": "AN",
                "OriginatingAgencyIdentifier": "MICHEL_MERCIER",
                "SubmissionAgencyIdentifier": "MICHEL_MERCIER",
                "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
                "#tenant": 0
    }

## HTTP status code 200

Returns the saved transaction

### Body

Media type: application/json

Type: object

Example:

    {
        "httpCode": 200,
        "$hits": {
            "total": 1,
            "offset": 0,
            "limit": 0,
            "size": 1
        },
        "$results": [
            {
                "#id": "aeeaaaaaachago4caajvgamet3sv5riaaaaq",
                "ArchivalAgreement": "IC-000001",
                "MessageIdentifier": "20220302-000005",
                "ArchivalAgencyIdentifier": "Vitam",
                "TransferringAgencyIdentifier": "AN",
                "OriginatingAgencyIdentifier": "MICHEL_MERCIER",
                "SubmissionAgencyIdentifier": "MICHEL_MERCIER",
                "Comment": "Versement du service producteur : Cabinet de Michel Mercier",
                "#tenant": 0
            }
        ],
        "$facetResults": [],
        "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/units get put

get

Permet de retourner la liste des unités archivistique associés à l'identifiant de la transaction

put

Permet de mettre à jour les métadonnées à partir d'un fichier CSV en entrée.

/!\ Dépréciée: Remplacée par l'API `PUT /collect-external/v1/transactions/{id}/units/metadata/csv`

Permissions requises:

- transaction:id:units:update

#### get /transactions/{id}/units

Permet de retourner la liste des unités archivistique associés à l'identifiant de la transaction

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: object

Example:

    {
      "$roots": [],
      "$query": [
        {
          "$gt": {
            "#approximate_creation_date": "2022-01-01"
          }
        }
      ],
      "$projection": {
        "$fields": {
        }
      },
      "$facets": [],
      "$threshold": 500000
    }

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 201,
      "$hits": {
        "total": 1,
        "offset": 0,
        "limit": 0,
        "size": 1
      },
      "$results": [
        {
          "#unitups": [],
          "#min": 1,
          "#max": 1,
          "#allunitups": [],
          "DescriptionLevel": "Item",
          "Title": "My title3",
          "Description": "Allemant. - Au chemin des Dames : le chateau et la ferme de la Motte totalement detruits.",
          "Descriptions": {
            "fr": "La legendes traduites en anglais."
          },
          "Status": "Pret",
          "Tag": [
            "Grande Collecte"
          ],
          "Source": "Famille Herve, CP1",
          "CreatedDate": "2014-06-12T09:31:00",
          "TransactedDate": "2014-06-12T09:31:00",
          "#management": {},
          "#originating_agencies": [],
          "#id": "aeeaaaaaach2brfeabbykal7ds6p33qaaaaq",
          "#opi": "aeeaaaaaach2brfeabbykal7ds53vdqaaaaq"
        }
      ],
      "$facetResults": [],
      "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### put /transactions/{id}/units

Permet de mettre à jour les métadonnées à partir d'un fichier CSV en entrée.

/!\ Dépréciée: Remplacée par l'API `PUT /collect-external/v1/transactions/{id}/units/metadata/csv`

Permissions requises:

- transaction:id:units:update

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/octet-stream

Type: Fichier CSV de MAJ

## HTTP status code 200

### Body

Media type: application/json

Type: object

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/units/metadata/csv put

put

Permet de mettre à jour les métadonnées à partir d'un fichier de métadonnées CSV en entrée.

Attention: Le fichier CSV doit être séparé par des point-virgules (`;`), et sans lignes vides.

NB. Le nombre de lignes du fichier de métadonnées CSV en entrée doit rester raisonnable, idéalement pas plus de 1000 par appel.

Important : L'API est synchrone / bloquante, et peut prendre quelques instants.

Permissions requises:

- transaction:id:units:metadata:csv:update

#### put /transactions/{id}/units/metadata/csv

Permet de mettre à jour les métadonnées à partir d'un fichier de métadonnées CSV en entrée.

Attention: Le fichier CSV doit être séparé par des point-virgules (`;`), et sans lignes vides.

NB. Le nombre de lignes du fichier de métadonnées CSV en entrée doit rester raisonnable, idéalement pas plus de 1000 par appel.

Important : L'API est synchrone / bloquante, et peut prendre quelques instants.

Permissions requises:

- transaction:id:units:metadata:csv:update

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-tenant-Id: required(string)

### Body

Media type: text/csv

Type: any

Example:

    File;Content.DescriptionLevel;Content.Description;Content.FilePlanPosition.0;Content.FilePlanPosition.1
    "Dossier/Sous-dossier/Archive1.txt";"Item";"Description de l'unité d'archives";"13.1.";"RATP.13.1."
    "Autre-dossier/Archive2.txt";"Item";"Description de l'unité d'archives";"13.1.";"RATP.13.1."

## HTTP status code 200

### Body

Media type: application/json

Type: object

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/units/metadata/jsonl put

put

Permet de mettre à jour les métadonnées à partir d'un fichier de métadonnées JSONL (JSON-Lines) en entrée.

Chaque ligne cible une unité archivistique de la transaction soit via le champ `File` qui sélectionne l'unité d'archives par son chemin dans le zip au format "Dossier/Sous-Dossier/Fichier.ext"), soit via un ou plusieurs sélecteurs libres (chaine de type "keyword", booléen, nombre), via le champ `Selector`.

La mise à jour des métadonnées se fait au niveau des champs "racines" (de premier niveau), et se traduit par :

- l'insertion du champ, si celui ci n'existe pas ;
- le remplacement du champ (et de toute son arborescence), si le champ existe déjà ;
- la suppression du champ si celui-ci pour valeur `null`.

Pour modifier un ou plusieurs champs feuilles et/ou intermédiaires, il convient de spécifier la valeur du champ racine parent. Ex. Pour modifier la `StartDate` d'une règle d'accès `#management.AccessRule.Rules.StartDate`, il faut spécifier la nouvelle valeur pour tout le champ racine `#management`.

NB. Les règles de gestion peuvent définir des `StartDate`, mais ne peuvent définir de `EndDate` (calculées par Vitam lors du versement de la transaction).

NB. Les champs Vitam `#management` et `#history` peuvent être spécifiés pour la mise à jour des métadonnées de gestion et historisées. Les autres champs internes à Vitam (ex. `#version`, `#originating_agency`...) ne sont, quant-à eux, pas modifiables.

NB. Le nombre de lignes du fichier de métadonnées JSONL (JSON-Lines) en entrée doit rester raisonnable, idéalement pas plus de 1000 par appel. Il est limité à un seuil maximum de 100 000.

Important : L'API est synchrone / bloquante, et peut prendre quelques instants.

Important : Le comportement en cas de sélecteur en doublon est non-supporté / non-déterminé.

Permissions requises:

- transaction:id:units:metadata:jsonl:update

#### put /transactions/{id}/units/metadata/jsonl

Permet de mettre à jour les métadonnées à partir d'un fichier de métadonnées JSONL (JSON-Lines) en entrée.

Chaque ligne cible une unité archivistique de la transaction soit via le champ `File` qui sélectionne l'unité d'archives par son chemin dans le zip au format "Dossier/Sous-Dossier/Fichier.ext"), soit via un ou plusieurs sélecteurs libres (chaine de type "keyword", booléen, nombre), via le champ `Selector`.

La mise à jour des métadonnées se fait au niveau des champs "racines" (de premier niveau), et se traduit par :

- l'insertion du champ, si celui ci n'existe pas ;
- le remplacement du champ (et de toute son arborescence), si le champ existe déjà ;
- la suppression du champ si celui-ci pour valeur `null`.

Pour modifier un ou plusieurs champs feuilles et/ou intermédiaires, il convient de spécifier la valeur du champ racine parent. Ex. Pour modifier la `StartDate` d'une règle d'accès `#management.AccessRule.Rules.StartDate`, il faut spécifier la nouvelle valeur pour tout le champ racine `#management`.

NB. Les règles de gestion peuvent définir des `StartDate`, mais ne peuvent définir de `EndDate` (calculées par Vitam lors du versement de la transaction).

NB. Les champs Vitam `#management` et `#history` peuvent être spécifiés pour la mise à jour des métadonnées de gestion et historisées. Les autres champs internes à Vitam (ex. `#version`, `#originating_agency`...) ne sont, quant-à eux, pas modifiables.

NB. Le nombre de lignes du fichier de métadonnées JSONL (JSON-Lines) en entrée doit rester raisonnable, idéalement pas plus de 1000 par appel. Il est limité à un seuil maximum de 100 000.

Important : L'API est synchrone / bloquante, et peut prendre quelques instants.

Important : Le comportement en cas de sélecteur en doublon est non-supporté / non-déterminé.

Permissions requises:

- transaction:id:units:metadata:jsonl:update

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-tenant-Id: required(string)

### Body

Media type: application/octet-stream

Type: any

Example:

    { "File": "Dossier/Sous-dossier/Archive1.txt", "UnitContent": { "Title": "Archive1 Title", "DescriptionLevel": "RecordGrp", "Description": "Description de l'unité d'archives 1", "OriginatingSystemId": [ "ID123456" ] } }
    { "Selector": { "#uploadPath": "Autre-dossier/Archive2.txt", "MyNumericField": 1 }, ",UnitContent": { "Title": null, "Title_": { "fr":  "Titre", "en": "Title" }, "Description": "Description de l'unité d'archives 2", "#management": { "StorageRule": { "FinalAction": "Copy" }, "AppraisalRule": { "FinalAction": "Keep" }, "AccessRule": { "Rules": [ { "Rule": "ACC-00002", "StartDate": "2000-01-01" } ] }, "ClassificationRule": { "Rules": [ { "Rule": "CLASS-00001", "StartDate": "2015-06-03" } ], "ClassificationAudience": "ClassificationAudience0", "ClassificationLevel": "Confidentiel Défense", "ClassificationOwner": "ClassificationOwner0", "ClassificationReassessingDate": "2016-06-03", "NeedReassessingAuthorization": true }, "NeedAuthorization": true } } }

## HTTP status code 200

### Body

Media type: application/json

Type: object

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/units/bulk post

post

Mise à jour unitaire des métadonnées descriptives de plusieurs unités archivistiques de la transaction.

La requête utilise le langage de requête DSL de type mise à jour unitaire de masse (BULK UPDATE) de Vitam en entrée.

Le nombre de requêtes unitaires doit rester raisonnable, idéalement pas plus de 1000 par appel. Il est limité à un seuil maximum de 100 000 par défaut. Ce seuil peut être redéfini dans la requête via le paramètre `threshold`.

Important : L'API est synchrone / bloquante, et peut prendre quelques instants.

Permissions requises:

- transaction:id:units:bulk:update

#### post /transactions/{id}/units/bulk

Mise à jour unitaire des métadonnées descriptives de plusieurs unités archivistiques de la transaction.

La requête utilise le langage de requête DSL de type mise à jour unitaire de masse (BULK UPDATE) de Vitam en entrée.

Le nombre de requêtes unitaires doit rester raisonnable, idéalement pas plus de 1000 par appel. Il est limité à un seuil maximum de 100 000 par défaut. Ce seuil peut être redéfini dans la requête via le paramètre `threshold`.

Important : L'API est synchrone / bloquante, et peut prendre quelques instants.

Permissions requises:

- transaction:id:units:bulk:update

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

- X-Access-Contract-Id: required(string)

  Unique Access Contract Identifier. Allow read/write access on specific archive unit.

  Example:

      Access-Contract-00001

### Body

Media type: application/json

Type: CollectTraits.CollectTypes.BulkAtomicUpdateRequest

Example:

BulkAtomicUpdate:

    {
      "threshold": 100,
      "queries": [
        {
          "$query": [
            { "$eq": { "ArchivalAgencyArchiveUnitIdentifier": "Value1" } }
          ],
          "$action": [
            { "$set": { "Title": "Nouveau titre" } }
          ]
        },
        {
          "$query": [
            { "$eq": { "#id": "some_unit_guid" } }
          ],
          "$action": [
            { "$unset": [ "EndDate" ] },
            { "$set": { "Description": "Description mise à jour" } }
          ]
        }
      ]
    }

## HTTP status code 202

La requête a été traitée par le serveur.

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

### Body

Media type: application/json

Type: any

Example:

BulkAtomicUpdate:

    {
      "httpCode": 202,
      "$hits": {
        "total": 2,
        "offset": 0,
        "limit": 0,
        "size": 2
      },
      "$results": [
        {
          "status": "KO",
          "updatedUnitId": "aeaqaaaaaefh4bz6cdxgkamnp5ozy3aaaaaq",
          "errorDetails": "Invalid unit format : Document schema validation failed"
        },
        {
          "status": "OK",
          "updatedUnitId": "aeaqaaaaaefh4bz6cdxgkamnp5ozy3iaaaaq"
        }
      ],
      "$facetResults": []
    }

## HTTP status code 400

La validation de la requête a échoué.

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

### Body

Media type: application/json

Type: any

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 403

Forbidden, requested action is forbidden

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 500

Erreur technique lors du traitement de la requête.

### Body

Media type: application/json

Type: any

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/unitsWithInheritedRules get

get

API pour accéder aux Unités d'archives liées à une transaction avec leurs règles de gestion héritées . La requête utilise le langage de requête DSL de Vitam en entrée et retourne une liste d'Unités d'archives avec leurs règles de gestion selon le DSL Vitam en cas de succès.

Permissions requises:

- transaction:unitsWithInheritedRules:read

#### get /transactions/{id}/unitsWithInheritedRules

API pour accéder aux Unités d'archives liées à une transaction avec leurs règles de gestion héritées . La requête utilise le langage de requête DSL de Vitam en entrée et retourne une liste d'Unités d'archives avec leurs règles de gestion selon le DSL Vitam en cas de succès.

Permissions requises:

- transaction:unitsWithInheritedRules:read

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

- Accept: required(one of application/json, application/zip, application/octet-stream)

  Allow to specify if a result must contain only Metadata ('application/json') or only the Objects with a binary content ('application/octet-stream').

### Body

Media type: application/json

Type: object

## HTTP status code 200

Renvoie la liste des résultats d'Unités d'archives correspondant à la requête DSL ainsi que leurs règles héritées.

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 200,
      "$hits": {
        "total": 1,
        "offset": 0,
        "limit": 10000,
        "size": 1
      },
      "$results": [
        {
          "Title": "BP_123457_20230131.pdf",
          "#id": "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq",
          "InheritedRules": {
            "GlobalProperties": [],
            "HoldRule": {
              "Rules": [],
              "Properties": []
            },
            "StorageRule": {
              "Rules": [],
              "Properties": []
            },
            "AppraisalRule": {
              "Rules": [
                {
                  "UnitId": "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq",
                  "Paths": [
                    [
                      "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq"
                    ]
                  ],
                  "Rule": "APP-00002"
                }
              ],
              "Properties": [
                {
                  "UnitId": "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq",
                  "Paths": [
                    [
                      "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq"
                    ]
                  ],
                  "PropertyName": "FinalAction",
                  "PropertyValue": "Destroy"
                }
              ]
            },
            "DisseminationRule": {
              "Rules": [],
              "Properties": []
            },
            "ReuseRule": {
              "Rules": [],
              "Properties": []
            },
            "ClassificationRule": {
              "Rules": [],
              "Properties": []
            },
            "AccessRule": {
              "Rules": [
                {
                  "UnitId": "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq",
                  "Paths": [
                    [
                      "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq"
                    ]
                  ],
                  "Rule": "ACC-00016",
                  "StartDate": "2023-01-20"
                },
                {
                  "UnitId": "aeaqaaaaaehmdzhmaayjqamhbiwrfoiaaaaq",
                  "Paths": [
                    [
                      "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq",
                      "aeaqaaaaaehmdzhmaayjqamhbiwrfoiaaaaq"
                    ]
                  ],
                  "Rule": "ACC-00001",
                  "StartDate": "2023-01-27"
                }
              ],
              "Properties": []
            }
          }
        }
      ],
      "$facetResults": [],
      "$context": {
        "$roots": [],
        "$query": [
          {
            "$eq": {
              "#id": "aeaqaaaaaehmdzhmaayjqamhbiwrgnaaaaaq"
            }
          }
        ],
        "$filter": {},
        "$projection": {
          "$fields": {
            "#id": 1,
            "Title": 1
          }
        }
      }
    }

## HTTP status code 400

Bad Request, syntax might be erroneous

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 403

Forbidden, requested action is forbidden

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/reclassification post

post

Reclasse une ou plusieurs unités archivistiques d'une transaction

Permissions requises:

- transaction:reclassification

#### post /transactions/{id}/reclassification

Reclasse une ou plusieurs unités archivistiques d'une transaction

Permissions requises:

- transaction:reclassification

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

  Identifiant de la transaction

### Headers

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

### Body

Media type: application/json

Type: any

Example:

    [
      {
        "$roots": [],
        "$query": [{ "$match": { "Title": "XYZ" } }],
        "$action": [
          {
            "$pull": {
              "#unitups": [ "aeaqaaaaaafnrnfpabijualehokvjliaaaaq" ]
            },
            "$add": {
              "#unitups": [ "aeaqaaaaaafnrnfpabijualehok5n5iaaabq" ]
            }
          }
        ]
      },
      {
        "$roots": [],
        "$query": [{ "$eq": { "#id": "aeaqaaaaaafnrnfpabijualehok5n6yaaaaq" } }],
        "$action": [
          {
            "$add": {
              "#unitups": [ "aeaqaaaaaafnrnfpabijualehokvjliaaaaq" ]
            }
          }
        ]
      }
    ]

## HTTP status code 200

### Body

Media type: application/json

Type: object

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /transactions/{id}/close post

post

Permet de fermer une transaction à la modification. Le statut de la transaction passe de `OPEN` à `READY`. La validation et la génération du SIP est automatiquement lancée en tâche de fond (`READY` -> `VALIDATED`/`KO`).

#### post /transactions/{id}/close

Permet de fermer une transaction à la modification. Le statut de la transaction passe de `OPEN` à `READY`. La validation et la génération du SIP est automatiquement lancée en tâche de fond (`READY` -> `VALIDATED`/`KO`).

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: any

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 200,
      "$hits": {
        "total": 0,
        "offset": 0,
        "limit": 0,
        "size": 0
      },
      "$results": [],
      "$facetResults": [],
      "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

### Téléchargement du SIP de la transaction.

#### /{id}/downloadSIP post

post

Permet de télécharger le SIP d'une transaction.

Le téléchargement est disponible après validation & génération du SIP, pendant le versement à Vitam (ingest), et en cas de rejet du versement par Vitam (statuts `VALIDATED`, `SENDING`, `SENT` et `ACK_KO`).

#### post /{id}/downloadSIP

Permet de télécharger le SIP d'une transaction.

Le téléchargement est disponible après validation & génération du SIP, pendant le versement à Vitam (ingest), et en cas de rejet du versement par Vitam (statuts `VALIDATED`, `SENDING`, `SENT` et `ACK_KO`).

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: any

## HTTP status code 200

### Body

Media type: application/octet-stream

Type: any

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

### Units

API de collecte. Ce point d'entrée permet de gérer une unité archivistique et les groupe d'objets.

#### /units/{id} get

get

Permet de retourner une unité archivistique par son id

#### get /units/{id}

Permet de retourner une unité archivistique par son id

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 201,
      "$hits": {
        "total": 1,
        "offset": 0,
        "limit": 0,
        "size": 1
      },
      "$results": [
        {
          "#unitups": [],
          "#min": 1,
          "#max": 1,
          "#allunitups": [],
          "DescriptionLevel": "Item",
          "Title": "My title3",
          "Description": "Allemant. - Au chemin des Dames : le chateau et la ferme de la Motte totalement detruits.",
          "Descriptions": {
            "fr": "La legendes traduites en anglais."
          },
          "Status": "Pret",
          "Tag": [
            "Grande Collecte"
          ],
          "Source": "Famille Herve, CP1",
          "CreatedDate": "2014-06-12T09:31:00",
          "TransactedDate": "2014-06-12T09:31:00",
          "#management": {},
          "#originating_agencies": [],
          "#id": "aeeaaaaaach2brfeabbykal7ds6p33qaaaaq",
          "#opi": "aeeaaaaaach2brfeabbykal7ds53vdqaaaaq"
        }
      ],
      "$facetResults": [],
      "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /units/{id}/objects/{usage}/{version} post

post

Permet de rajouter un groupe d'objets

#### post /units/{id}/objects/{usage}/{version}

Permet de rajouter un groupe d'objets

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)
- usage: required(string)
- version: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/json

Type: object

Example:

    {
      "fileInfo": {
        "filename": "plan.txt"
      }
    }

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 200,
      "$hits": {
        "total": 1,
        "offset": 0,
        "limit": 0,
        "size": 1
      },
      "$results": [
        {
          "id": "aeeaaaaaach2brfeabbykal7egm5ysyaaaaq",
          "fileInfo": {
            "lastModified": "2022-02-22T13:23:25.846",
            "filename": "plan.txt"
          }
        }
      ],
      "$facetResults": [],
      "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### /units/{id}/objects/{usage}/{version}/binary get post

get

Permet de télécharger un binaire

post

Permet de rajouter un binaire

#### get /units/{id}/objects/{usage}/{version}/binary

Permet de télécharger un binaire

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)
- usage: required(string)
- version: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

## HTTP status code 200

### Body

Media type: application/octet-stream

Type: any

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

#### post /units/{id}/objects/{usage}/{version}/binary

Permet de rajouter un binaire

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)
- usage: required(string)
- version: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

### Body

Media type: application/octet-stream

Type: any

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "httpCode": 200,
      "$hits": {
        "total": 0,
        "offset": 0,
        "limit": 0,
        "size": 0
      },
      "$results": [],
      "$facetResults": [],
      "$context": {}
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution

### Objects

API de collecte. Ce point d'entrée permet de gérer les groupe d'objets.

#### /objects/{id} get

get

Permet de retourner une groupe d'objet par son id

#### get /objects/{id}

Permet de retourner une groupe d'objet par son id

Secured by VitamPlatform

Based on certificate passing a valid identifier of application

### URI Parameters

- id: required(string)

### Headers

- X-tenant-Id: required(string)
- X-Application-Id: (string)

  Session Identifier from client Front-Office Application

  Example:

      SESSION-ID-00001

- X-Personal-Certificate: (string)

  Personal certificate (in Base64-encoded DER format), required only if this resource needs personal authentification. If the resource requires personal authentication, and no personal certificate has been provided OR the provided personal certificate is unauthorized, the server will return a 401 http status.

  Example:

      MIIGfzCCBGegAwIBAgICAPcwDQYJK...

- X-Tenant-Id: required(number)

  Unique Tenant Identifier.

  Example:

      0

## HTTP status code 200

### Body

Media type: application/json

Type: object

Example:

    {
      "_id": "aebaaaaaaacpbveraqxzuamdvda5l3yaaaaq",
      "_tenant": 0,
      "FileInfo": {
        "Filename": "Child C"
      },
      "_nbc": 1,
      "_opi": "TRANSACTION_ID",
      "_qualifiers": [
        {
          "qualifier": "BinaryMaster",
          "_nbc": 1,
          "versions": [
            {
              "_id": "aebqaaaaaccpbveraqxzuamdvda5l3qaaaba",
              "DataObjectVersion": "BinaryMaster_1",
              "FileInfo": {
                "Filename": "Child C"
              },
              "Size": 0
            }
          ]
        }
      ]
    }

## HTTP status code 401

Unauthorized (restricted operation), authentication in error

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 404

Not Found, requested resource does not exist

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 409

Conflict, operation requested is in conflict with existing data

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

## HTTP status code 412

Precondition Failed, some predicates are incorrect, therefore the operation is not possible

### Headers

- X-Request-Id: required(string)

  Unique Request Identifier

  Example:

      aeeaaaaaachmj6ciaa5nwalv3rsu4laaaaaq

# Secured by VitamPlatform

### Headers

- X-Identity: required(string)

  Contains the application identifier from the Certificate resolution