Get media files by specified filter

Updated on 30 Apr 2020

Description

A User or External Entity on behalf of a User with role permissions MEDIA_FILE_VIEWER, MEDIA_FILE_OWNER will go through all steps of “Authentication” Use Case, and then send a request to Endpoint “Get media files by the specified filter”.

Actors

  1. External Entity that can interact with System Operator API acting as a registered System Operator User with permissions: MEDIA_FILE_VIEWER, MEDIA_FILE_OWNER.
  2. System Operator running “SDK.Finance” software and exposing the portfolio of financial APIs.

Preconditions

  1. The user must have a System Operator profile with sufficient access privileges.

Basic Flow

By default, this flow assumes that External Entity sends Requests to System Operator Endpoints, and System Operator sends back Responses to External Entity.

  1. Perform all steps of Use Case “Authentication”.
  2. External Entity sends a request to Endpoint “Get media files by the specified filter”.

Endpoint URL: https://sdkfinance.app/api/ui/#!/Media_files_management/Get_filtered_media_files

Authorization – authorization token

Request body example:



   "filter":{ 

      "id":"string",

      "name":"string",

      "types":[ 

         "string"

      ],

      "used":false,

      "fromExpiresAt":"2018-08-16T14:36:19.587Z",

      "toExpiresAt":"2018-08-16T14:36:19.589Z",

      "creationDateFrom":"2018-08-16T14:36:19.589Z",

      "creationDateTo":"2018-08-16T14:36:19.589Z"

   },

   "sort":{ 

      "creationDate":"asc",

      "expirationDate":"asc",

      "name":"asc"

   },

   "pageNumber":0,

   "pageSize":0

}
  1. System Operator returns List of files (could be empty) to External Entity. (See Result example below)

Optional Flow with Web Browser UI

  1. Perform all steps of Use Case “Authentication”.
  2. A user sends a request to Endpoint “Get media files by the specified filter”.

Endpoint URL: https://sdkfinance.app/api/ui/#!/Media_files_management/Get_filtered_media_files

Authorization – authorization token

Request body example:



   "filter":{ 

      "id":"string",

      "name":"string",

      "types":[ 

         "string"

      ],

      "used":false,

      "fromExpiresAt":"2018-08-16T14:36:19.587Z",

      "toExpiresAt":"2018-08-16T14:36:19.589Z",

      "creationDateFrom":"2018-08-16T14:36:19.589Z",

      "creationDateTo":"2018-08-16T14:36:19.589Z"

   },

   "sort":{ 

      "creationDate":"asc",

      "expirationDate":"asc",

      "name":"asc"

   },

   "pageNumber":0,

   "pageSize":0

}
  1. System Operator returns List of files (could be empty) to User (See Result example below).

Post Conditions

List of files (could be empty)is available.

Result example



   "records":[ 

      { 

         "id":"string",

         "ownerId":"string",

         "mediaType":"string",

         "name":"string",

         "url":"string",

         "md5":"string",

         "sha1":"string",

         "size":0,

         "used":false,

         "createdAt":"2018-08-16T14:36:20.972Z",

         "expiresAt":"2018-08-16T14:36:20.972Z",

         "tag":"string"

      }

   ],

   "status":"ok",

   "message":"string",

   "pageNumber":0,

   "pageSize":0,

   "totalRecords":0,

   "totalPages":0

}