Page tree
Skip to end of metadata
Go to start of metadata

Digital.ai Continuous Testing allows testers to upload files to the cloud that can later be used by different features from relative URL and download files that were created by cloud commands so that they can work with files not hosted locally.



The role of the user performing the Rest Operation is specified by the 'Authorization' header.

Supports Authorization with Access Key only OR Admin authorization.

For more information please visit How To Execute Rest API, for a detailed example.

Get File Information

Get the information about the specified file.

GET /api/v1/files/{fileId}

Response
Response Status: 200 OK

{
    "status": "SUCCESS",
    "data": {
        "id": 516,
        "uniqueName": "f3",
        "description": null,
        "extension": "png",
        "size": 2649,
        "uploadedBySystem": false,
        "uploadTime": "2021-05-02T12:16:01.943Z",
        "lastUpdate": "2021-05-02T12:16:01.943Z",
        "uploadedUser": "admin",
        "lastUpdatedUser": "admin",
        "projectName": "Default"
    },
    "code": "OK"
}


Get File Information

Get a collection about multiple files information.

GET /api/v1/files


Parameters

Name

Type

Mandatory

Description

project_idStringNoAvailable for cloud admin only, if the project and unique_name are not specified, it will return the information about all the projects files.
project_nameStringNoAvailable for cloud admin only if project id not specified.
unique_nameStringNoIf empty- return all the information about all the files in the project(all the projects if admin and project aren't specified). Else, return information only about the specified file.
Response
Response Status: 200 OK
{
    "status": "SUCCESS",
    "data": [
        {
            "id": 517,
            "uniqueName": "microsoftStore.png",
            "description": null,
            "extension": "png",
            "size": 26278,
            "uploadedBySystem": false,
            "uploadTime": "2021-05-02T17:58:33.888Z",
            "lastUpdate": "2021-05-02T17:58:33.888Z",
            "uploadedUser": "admin",
            "lastUpdatedUser": "admin",
            "projectName": "Default"
        },
        {
            "id": 518,
            "uniqueName": "experitest-logo.png",
            "description": null,
            "extension": "png",
            "size": 2649,
            "uploadedBySystem": false,
            "uploadTime": "2021-05-02T17:58:38.533Z",
            "lastUpdate": "2021-05-02T17:58:38.533Z",
            "uploadedUser": "admin",
            "lastUpdatedUser": "admin",
            "projectName": "Default"
        },
        {
            "id": 516,
            "uniqueName": "f3",
            "description": null,
            "extension": "png",
            "size": 2649,
            "uploadedBySystem": false,
            "uploadTime": "2021-05-02T12:16:01.943Z",
            "lastUpdate": "2021-05-02T12:16:01.943Z",
            "uploadedUser": "admin",
            "lastUpdatedUser": "admin",
            "projectName": "Default"
        }
    ],
    "code": "OK"
}}


Download File Content

downloads the file from the repository

GET /api/v1/files/{fileId}/download

Remove File 

Removes file from the repository

DELETE /api/v1/files/{fileId}


Response
Response Status: 200 OK
{
    "status": "SUCCESS",
    "code": "OK"
}


Update File

Updates the file in the repository

PATCH /api/v1/files/{fileId}

Parameters

Name

Type

Mandatory

Description

file

MultipartFile

No

The file content user wants to update

description

String

No

Any file description(length < 255 Characters)

unique_name

String

No

File unique name -unique per project- that will be the way to work with the file (like a unique name in applications).


Response
Response Status: 200 OK
{
    "status": "SUCCESS",
    "data": null,
    "code": "OK"
}



Upload File

Uploads new file to the repository

Returned value -  file id(generated by the system)

POST /api/v1/files

Parameters

Name

Type

Mandatory

Description

file

MultipartFile

Yes

The file user wants to store

description

String

No

Any file description.(length < 255 Characters)

unique_name

String

No

File unique name -unique per project- that will be the way to work with the file (like a unique name in applications).

If the name is not specified, it will be the original file name.

project_id

String

No

Available for cloud admin only, if the project is not specified, it will be uploaded to the Default project.

project_name

String

No

Available for cloud admin only if project id not specified.


Response
Response Status: 200 OK
{
    "status": "SUCCESS",
    "data": 516,
    "message": "file f3 uploaded with id 516",
    "code": "OK"
}


  • No labels