Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: /api/v9/item/{id}/files?itemType={itemType}&uploadType={uploadType}&additionalFieldId=&validate=true
- Type: GET
-
Required headings:
- content-type: application/json
- X-Authorization: Bearer {token}
URL Description
- {host}: It represents the domain of the environment in which the API is located.
- ASMSAPI/: Fixed API prefix.
- URI: Specific endpoint for the request.
⚐ EXAMPLE URL:
https://{host}/ASMSAPI/api/v9/item/{id}/files?itemType={itemType}&uploadType={uploadType}&additionalFieldId=&validate=true
Parameters
Name | Data type | Obligatory | Description |
---|---|---|---|
Id | Int | Yes | Case ID |
ItemType | String | Yes | Case Type |
uploadType | String | Yes | Identifies whether the file is from the case or an additional field - Case = 0, - AdditionalField - 1 |
urlFiles | Compound | Yes | Return the URL to download files |
Body of the petition: /api/v9/item/{id}/files?itemType={itemType}&uploadType={uploadType}&additionalFieldId=&validate=true&urlFiles=true
Answer
{
"content": [
{
"date": 1709731699770,
"description": "Archivo de prueba",
"id": 5910,
"isPublic": false,
"name": "Aranda Software.zip",
"size": 386308,
"url": "https://ds-asms.azurewebsites.net/asmsadministrator/Main/Pages/Files.aspx?key=16813fb398444e3aafee556ea9d6ff28&fileName=Aranda_Software.zip"
"userId": 3155,
"userName": "Diego Suarez
}
],
"totalItems": 1
}
Nota: |
|
Response Parameters
Name | Data type | Description |
---|---|---|
content | List | List of objects found in the search. |
Date | Date | Date the file was attached |
Description | Text | File description |
Id | Number | File ID |
isPublic | They boan | Indicates whether the file is public or not |
Name | Text | File Name |
size | Number | File size |
URL | Compound | Link to download the file |
totalItems | Number | Total number of objects found |
Error messages
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | \r\nParameter Name: Id |
400 | BadRequest | \r\nParameter Name: Itemtype |
400 | BadRequest | \r\nParameter Name: Uploadtype |
400 | BadRequest | InvalidAdditionalFieldId |
400 | BadRequest | InvalidGetFiles |
400 | BadRequest | InvalidItemType |
400 | BadRequest | InvalidUploadType |
400 | BadRequest | RequestNeedsSomeArguments |
403 | Forbidden | DoNotHavePermissionForThisAction |
500 | InternalServerError | FailureGetFiles |