Get file versions

This API serves as a valuable resource for obtaining a complete overview of the versions associated with a given file within the MyIPR system.

End Point

{{base_url}}/get-file/{{fileId}}

API Description

This API endpoint, accessed through the specified URL, enables the retrieval of an array containing all versions associated with a particular file identified by the provided <file_id>.

/get-file/<file_id>

Notes:

  • The process of creating a certificate involves the automatic creation of a parent file in the background. The first version (certificate) is then associated with this file.

  • The system allows for the addition of multiple versions to a file, providing a comprehensive history of the file's certification journey. This API serves as a valuable resource for obtaining a complete overview of the versions associated with a given file within the MyIPR system.

Method

POST

Attributes

AttributeTypeDescription

status

Integer

Represents the status of the API response.

message

String

Provides a message indicating the success or failure of the API request.

results

Array of Objects

Contains an array of objects with information about the submitted file(s).

hash

String

The hash value of the file.

size

String

The size of the file.

result

Object

Contains information about the submitted version.

result.version_id

String

Unique identifier for the version of the file.

result.fileId

String

Unique identifier for the submitted file.

result.version_name

String

The name of the file version.

result.fileName

String

The name of the file.

result.fileStatus

String

The status of the file (e.g., "in_progress").

result.is_primary

Boolean

Indicates whether the file is the primary file.

result.size

String

The size of the file.

result.description

String

Description of the file, if available.

result.transaction_id

String

Unique identifier for the transaction related to the file.

result.hash

String

The hash value of the file.

result.category

Object

Contains information about the category of the file.

result.category.id

Integer

Unique identifier for the category.

result.category.name

String

The name of the category.

result.status

String

The overall status of the file (e.g., "completed").

result.error

Object

Object containing information about any errors, if applicable.

result.user

Object

Contains information about the user associated with the file.

result.user.id

String

Unique identifier for the user.

result.user.first_name

String

The first name of the user.

result.user.last_name

String

The last name of the user.

result.user.email

String

The email address of the user.

result.created_at

String

The timestamp indicating when the file was created.

result.lastUpdatedAt

String

The timestamp indicating when the file was last updated.

Request

curl --location -g --request POST '{{base_url}}/get-file/f8d0f158-7d33-44f3-8025-fb9b9402a74e' \
--header 'Authorization: SECRET {{secret_key}}'

Response

{
  "status": 201,
  "message": "success",
  "result": [
    {
      "version_id": "76233ed6-b9d0-46b5-bd4c-5cda20d7c622",
      "fileId": "f8d0f158-7d33-44f3-8025-fb9b9402a74e",
      "version_name": "This is a new file 13099",
      "fileName": "This is a new file 13099",
      "fileStatus": "in_progress",
      "is_primary": true,
      "size": "1079",
      "description": null,
      "transaction_id": "cb81ae60f3e2d28891a10bdce747f76b1acb73e7df770de68d04933c851260ac",
      "hash": "c5455acc691c249007aa739f2e4ff7651e549c4e9b471c9b0b327d2d61db1617",
      "category": {
        "id": 10,
        "name": "Legal"
      },
      "status": "completed",
      "error": {},
      "user": {
        "id": "2ebe5490-ce56-42c2-afbe-20b5de491a37",
        "first_name": "business",
        "last_name": "varsha",
        "email": "varshadev6@yopmail.com"
      },
      "created_at": "2023-11-24T05:55:34.128Z",
      "lastUpdatedAt": "2023-11-24T05:55:39.489Z"
    }
  ]
}

Last updated