---
openapi: 3.1.0
info:
  title: DataFrugal API Documentation
  description: Shield your critical data with Backup that Matters
  contact:
    name: Nikhil Dhamapurkar
    url: https://drive.datafrugal.com
    email: sales@celeritio.com
  version: 1.0.0
servers:
- url: https://drive.datafrugal.com
  description: Generated production server url
tags:
- name: Resource APIs
  description: "[ Resource / Operations on the Data create , upload ,delete complete.
    ]"
- name: Search APIs
  description: "[ Search Related Operations ]"
paths:
  "/ext/api/v1/resource":
    put:
      tags:
      - Resource APIs
      summary: Initiate Resource Upload Request.
      operationId: insertOrUpdateResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/ResourceResponse"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
      security:
      - KeycloakOAuth: []
    delete:
      tags:
      - Resource APIs
      summary: Delete Resource
      operationId: deleteResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resource/shares":
    put:
      tags:
      - Resource APIs
      summary: Share Resource With Group/User.
      operationId: addSharedResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SharedResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
    delete:
      tags:
      - Resource APIs
      summary: Un-Share Resource
      operationId: unshareResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SharedResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resource/relocation":
    put:
      tags:
      - Resource APIs
      summary: Move Resource
      operationId: moveResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MoveResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resource/completion":
    put:
      tags:
      - Resource APIs
      summary: Confirm Resource Upload Request
      operationId: completeInsertOrUpdateResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CompleteResourceUploadRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/ResourceResponse"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resources/sharedWithMe":
    post:
      tags:
      - Search APIs
      summary: Fetch Resources from Shared Dashboard.
      operationId: fetchSharedDashBoardResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/FetchSharedResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resources/dashboard":
    post:
      tags:
      - Search APIs
      summary: Fetch Resources from Dashboard.
      operationId: fetchDashboardResources
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DashBoardRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resources/archives":
    post:
      tags:
      - Search APIs
      summary: Fetch Archived/Deleted Resources from Trash Bin.
      operationId: fetchArchivedResources
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DashBoardRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resource/labels":
    post:
      tags:
      - Resource APIs
      summary: Add / Remove resource tags.
      operationId: handleResourceLabel
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resource/downloadEndpoint":
    post:
      tags:
      - Resource APIs
      summary: Get Resource Enddpoint for Download
      operationId: fetchResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/resource/copies":
    post:
      tags:
      - Resource APIs
      summary: Clone Resource
      operationId: cloneResource
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/archives/restore":
    post:
      tags:
      - Resource APIs
      summary: Restore Archived Resource.
      operationId: restoreArchivedResource
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
  "/ext/api/v1/archives/downloadEndpoint":
    post:
      tags:
      - Resource APIs
      summary: Get Archived Resource Enddpoint for Download
      operationId: fetchArchivedResourceEndpoint
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ResourceRequest"
        required: true
      responses:
        '200':
          description: OK
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/Response"
        '500':
          description: Internal Server Error
          content:
            "*/*":
              schema:
                type: object
                additionalProperties:
                  type: object
components:
  schemas:
    Header:
      type: object
      properties:
        email:
          type: string
        org:
          type: string
        requestId:
          type: string
        clientId:
          type: string
        user:
          type: string
        userId:
          type: integer
          format: int32
        idpUserId:
          type: string
        role:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
        ipAddr:
          type: string
        valid:
          type: boolean
      required:
      - email
    ResourceRequest:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        action:
          type: string
          enum:
          - SAVE
          - MODIFY
          - DELETE
          - DOWNLOAD
          - SEARCH
          - INSERT
          - COMPLETE_UPLOAD
          - SOFT_DELETE
          - DELETED
          - RESTORED
          - SHARE
          - UNSHARE
          - MOVE
          - CLONE_REQUESTED
          - CLONED
        resourceId:
          type: integer
          format: int64
        fileName:
          type: string
        contentType:
          type: string
        isItFolder:
          type: boolean
          writeOnly: true
        parentFolderId:
          type: integer
          format: int64
        getcID:
          type: integer
          format: int64
        role:
          type: string
          enum:
          - OWNER
          - EDITOR
          - VIEWERS
          - BLOCKED
        lastUpdateUser:
          type: string
        contentLength:
          type: integer
          format: int64
        lastUpdateTime:
          type: integer
          format: int64
        description:
          type: string
        updateType:
          type: string
        versionFlag:
          type: string
        labels:
          type: string
        resourceIds:
          type: array
          items:
            type: integer
            format: int64
        version:
          type: integer
          format: int32
        versionId:
          type: integer
          format: int32
        accountId:
          type: integer
          format: int32
        valid:
          type: boolean
        itFolder:
          type: boolean
        systemRole:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
    Footer:
      type: object
      properties:
        code:
          type: integer
          format: int32
        msg:
          type: string
      required:
      - code
    Resource:
      type: object
      properties:
        resourceId:
          type: integer
          format: int64
        uri:
          type: string
        fileName:
          type: string
        contentType:
          type: string
        contentLength:
          type: integer
          format: int64
        description:
          type: string
        ownerId:
          type: integer
          format: int64
        parentFolderId:
          type: integer
          format: int64
        isItFolder:
          type: boolean
        role:
          type: string
          enum:
          - OWNER
          - EDITOR
          - VIEWERS
          - BLOCKED
        lastUpdateUser:
          type: string
        lastUpdateTime:
          type: integer
          format: int64
        dsVersion:
          type: string
        locationId:
          type: integer
          format: int64
        version:
          type: integer
          format: int32
        labels:
          type: string
        parentFolderName:
          type: string
        parentFolderResourceid:
          type: integer
          format: int32
        ownerName:
          type: string
        sharedExplicitly:
          type: boolean
        locationShared:
          type: boolean
        payLoad:
          type: object
        msd:
          type: integer
          format: int64
        valid:
          type: boolean
        latest:
          type: boolean
      required:
      - contentType
      - fileName
      - role
    ResourceProperties:
      type: object
      properties:
        fields:
          type: object
          additionalProperties:
            type: object
    ResourceResponse:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        footer:
          "$ref": "#/components/schemas/Footer"
        resourceProperties:
          "$ref": "#/components/schemas/ResourceProperties"
        parentFolderId:
          type: integer
          format: int64
        resourceList:
          type: array
          items:
            "$ref": "#/components/schemas/Resource"
    RoleDetails:
      type: object
      properties:
        role:
          type: string
          enum:
          - OWNER
          - EDITOR
          - VIEWERS
          - BLOCKED
        userInfo:
          type: array
          items:
            "$ref": "#/components/schemas/UserInfo"
    SharedResourceRequest:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        action:
          type: string
          enum:
          - SAVE
          - MODIFY
          - DELETE
          - DOWNLOAD
          - SEARCH
          - INSERT
          - COMPLETE_UPLOAD
          - SOFT_DELETE
          - DELETED
          - RESTORED
          - SHARE
          - UNSHARE
          - MOVE
          - CLONE_REQUESTED
          - CLONED
        roleDetails:
          type: array
          items:
            "$ref": "#/components/schemas/RoleDetails"
        userId:
          type: integer
          format: int64
        resourceId:
          type: integer
          format: int64
        parentFolderId:
          type: integer
          format: int64
        senderRole:
          type: string
          enum:
          - OWNER
          - EDITOR
          - VIEWERS
          - BLOCKED
        isItFolder:
          type: boolean
          writeOnly: true
        lastUpdateUser:
          type: string
        fileName:
          type: string
        lastUpdateTime:
          type: integer
          format: int64
        resourceIdList:
          type: array
          items:
            type: integer
            format: int64
        valid:
          type: boolean
        itFolder:
          type: boolean
        systemRole:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
    UserInfo:
      type: object
      properties:
        email:
          type: string
        sharedLocationId:
          type: integer
          format: int64
        locationId:
          type: integer
          format: int64
    Response:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        footer:
          "$ref": "#/components/schemas/Footer"
    MoveResourceRequest:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        action:
          type: string
          enum:
          - SAVE
          - MODIFY
          - DELETE
          - DOWNLOAD
          - SEARCH
          - INSERT
          - COMPLETE_UPLOAD
          - SOFT_DELETE
          - DELETED
          - RESTORED
          - SHARE
          - UNSHARE
          - MOVE
          - CLONE_REQUESTED
          - CLONED
        resourceId:
          type: integer
          format: int64
        locationId:
          type: integer
          format: int64
        lastUpdateUser:
          type: string
        lastUpdateTime:
          type: integer
          format: int64
        destLocationId:
          type: integer
          format: int64
        systemRole:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
    CompleteResourceUploadRequest:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        action:
          type: string
          enum:
          - SAVE
          - MODIFY
          - DELETE
          - DOWNLOAD
          - SEARCH
          - INSERT
          - COMPLETE_UPLOAD
          - SOFT_DELETE
          - DELETED
          - RESTORED
          - SHARE
          - UNSHARE
          - MOVE
          - CLONE_REQUESTED
          - CLONED
        partETagCombo:
          type: array
          items:
            "$ref": "#/components/schemas/ResourcePartETagResponse"
        updateType:
          type: string
        versionFlag:
          type: string
        dfReqId:
          type: string
        contentLength:
          type: integer
          format: int64
        systemRole:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
    ResourcePartETagResponse:
      type: object
      properties:
        partNumber:
          type: integer
          format: int32
        geteTag:
          type: string
    FetchSharedResourceRequest:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        action:
          type: string
          enum:
          - SAVE
          - MODIFY
          - DELETE
          - DOWNLOAD
          - SEARCH
          - INSERT
          - COMPLETE_UPLOAD
          - SOFT_DELETE
          - DELETED
          - RESTORED
          - SHARE
          - UNSHARE
          - MOVE
          - CLONE_REQUESTED
          - CLONED
        parentFolderId:
          type: integer
          format: int64
        getcId:
          type: integer
          format: int64
        resourceId:
          type: integer
          format: int64
        systemRole:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
    DashBoardRequest:
      type: object
      properties:
        header:
          "$ref": "#/components/schemas/Header"
        action:
          type: string
          enum:
          - SAVE
          - MODIFY
          - DELETE
          - DOWNLOAD
          - SEARCH
          - INSERT
          - COMPLETE_UPLOAD
          - SOFT_DELETE
          - DELETED
          - RESTORED
          - SHARE
          - UNSHARE
          - MOVE
          - CLONE_REQUESTED
          - CLONED
        getcId:
          type: integer
          format: int64
        parentFolderId:
          type: integer
          format: int64
        folder:
          type: boolean
        fetchPreviousLevelDashboard:
          type: boolean
        isPrevious:
          type: boolean
          writeOnly: true
        systemRole:
          type: string
          enum:
          - unknown
          - user
          - member
          - billing
          - systemadmin
          - support
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    KeycloakOAuth:
      type: oauth2
      description: OAuth2 with OpenID Connect. Authorization and token endpoints are configured per environment; obtain them from your identity provider or administrator.
      flows:
        authorizationCode:
          authorizationUrl: https://example.com/auth/realms/{realm}/protocol/openid-connect/auth
          tokenUrl: https://example.com/auth/realms/{realm}/protocol/openid-connect/token
          scopes:
            openid: OpenID Connect scope
            profile: Profile info
            email: Email info

