Arpia Bucket Object Store S3 API Documentation

Arpia Bucket Object Store S3 API Documentation

Table of Contents

  1. Key Features
  2. Authentication
  3. Endpoint Overview
  4. Usage Summary
  5. Detailed Endpoints
    • GET: List Files or Get a Specific File from Bucket
    • DELETE: Delete a File from the Bucket
    • PUT: Upload a File to the Bucket
    • POST: Work Area Project Submission

Key Features

  • File Management: List, retrieve, and delete files from a designated bucket.
  • File Upload: Easily upload files directly to the bucket, with instant access to the file link.
  • Project Submission: Submit projects to a workspace, complete with debug mode for enhanced feedback.

Authentication

All requests require an authentication token. Ensure to include a valid token in the request headers to securely access the API.

Endpoint Overview

The Object Store S3 API supports the following HTTP methods:

  • GET: Retrieve files from the bucket.
  • DELETE: Remove files from the bucket.
  • PUT: Upload files to the bucket.
  • POST: Submit project data to the workspace.

Usage Summary

Each endpoint allows for the following actions:

MethodDescription
GETRetrieve a list of files or a specific file from the bucket.
DELETERemove a specific file from the bucket.
PUTUpload files to the bucket, with support for multiple file types.
POSTSubmit project data to the workspace, enabling integration with other ARPIA tools.

Detailed Endpoints

1. GET: List Files or Get a Specific File from Bucket

  • Endpoint:
    GET https://cloud.arpia.ai/api/bucket/

  • Query Parameters:

    • token (Required): Authentication token for accessing the API.
    • bucket (Required): Unique identifier for the bucket, e.g., LElC1IWg.
    • file (Optional): Name of the file to retrieve, e.g., upload_test.txt. If omitted, lists all files in the bucket.
  • Description:
    Retrieve a list of all files in a bucket or a specific file if the file parameter is specified.

  • Response:

    • 200 OK
      Request successful, with JSON response listing files or file data.
      []
      

2. DELETE: Delete a File from the Bucket

  • Endpoint:
    DELETE https://cloud.arpia.ai/api/bucket/

  • Query Parameters:

    • token (Required): Authentication token.
    • bucket (Required): Unique identifier for the bucket, e.g., LElC1IWg.
    • file (Required): Name of the file to delete, e.g., upload_test.txt.
  • Description:
    Delete a specific file from the bucket.

  • Response:

    • 405 Method Not Allowed
      Request method not allowed for the resource.
      {
        "error": "YES",
        "error_message": "This Request Method is not supported!"
      }
      

3. PUT: Upload a File to the Bucket

  • Endpoint:
    PUT https://cloud.arpia.ai/api/bucket/

  • Query Parameters:

    • token (Required): Authentication token.
    • bucket (Required): Unique identifier for the bucket, e.g., LElC1IWg.
    • file (Required): Name of the file being uploaded, e.g., upload_test.json.
  • Request Body:

    • file (Required): Content of the file being uploaded.
  • Description:
    Upload a file to the specified bucket.

  • Response:

    • 200 OK
      Request successful, with JSON response containing file link and metadata.
      {
        "result": "OK",
        "file": "https://store-pty1.datakubes.io/LElC1IWg/upload_test.json",
        "message": "File uploaded successfully"
      }
      

4. POST: Work Area Project Submission

  • Endpoint:
    POST https://cloud.arpia.ai/api/

  • Query Parameters:

    • token (Required): Authentication token.
    • wsp (Required): Workspace ID where the project will be submitted, e.g., hZBM6k4h.
    • debug (Optional): Enables debug mode.
  • Request Body:

    • json: Data payload for the project submission.
      {
        "text": "Sample project data for submission."
      }
      
  • Description:
    Submit a project to a specified workspace within the ARPIA platform.

  • Response:

    • 200 OK
      Request successful, with JSON response detailing each step of the submission process.
      [
        {
          "Step": 1,
          "StepName": "First Step",
          "Msg": "Initial step for the action",
          "Error": "N",
          "Result": "DONE"
        },
        {
          "Step": 3,
          "StepName": "File Process",
          "Msg": "File process success.",
          "Error": "N",
          "Result": "DONE"
        },
        {
          "Step": 2,
          "StepName": "Database",
          "Msg": "Database Transaction Query",
          "Error": "N",
          "Result": "DONE"
        },
        {
          "Step": 4,
          "StepName": "Relational Node Data Entry",
          "Msg": "Save to Relational Node Query",
          "Error": "N",
          "Result": "DONE"
        },
        {
          "Step": 6,
          "FinalDBStep": "Y",
          "StepName": "Final DB Commit",
          "Msg": "Commit all database transactions",
          "Error": "N",
          "Result": "DONE"
        }
      ]