Files Encrypted
dev-api

Index encrypted files

Changed on

Index encrypted files so their content can be retrieved during chat.

post/files/encrypted/index

Request

  • Base URL
    https://gateway.prem.io
  • Auth
    HTTP bearer and API key in header Authorization

Request body

Example request

{
  "files": [
    {
      "file_id": "file_0198042e-6dde-7b9c-bc91-452a7e0c833b",
      "encrypted_file_dek": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
      "encrypted_rag_dek": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
      "file_nonce": "0123456789abcdef0123456789abcdef",
      "rag_dek_nonce": "0123456789abcdef0123456789abcdef",
      "s3_r2_path": "encrypted/org_0196b0e9-11d8-7f26-b1d2-bd47054e4827/user_0196b0e9-11d8-7f26-b1d2-bd47054e4827/0198042e-6dde-76e0-b817-3afb324e29ac.enc",
      "cipher_text": "cipher_text_data"
    }
  ]
}

Response

Files indexed successfully

status200 | 201 | 202 required

Status code of the response

errorstring nullable

Error message of the response, human readable

messagestring nullable required

Message of the response, human readable

env'development' | 'production' required

API environment

support_idstring uuid nullable

Support ID linked to the response, used to identify it when talking with our team.

Example response

{
  "data": {
    "results": [
      {
        "file_id": "file_0198042e-6dde-7b9c-bc91-452a7e0c833b",
        "rag_status": "running",
        "success": true
      },
      {
        "file_id": "file_0198042e-6dde-7b9c-bc91-452a7e0c833c",
        "rag_status": "running",
        "success": true
      }
    ],
    "enclave_response": {}
  }
}

Changes

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the / response property for the response status

    • warning

      added the new 405.00 enum value to the response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the / response property for the response status

    • warning

      added the new 409.00 enum value to the response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the / response property for the response status

    • warning

      added the new 500.00 enum value to the response property for the response status

    • info

      endpoint added