PREGLED PODATKOV VSEH OSNOVNIH SREDSTEV
URL: api/assets
HTTP metoda klica: GET
Parametri glave klica (Request headers): FindApiKey, FindApiAuthenticationToken
HTTP koda rezultata: 200, 401
Vhodni podatki:
- start (int); pozicija kurzorja v URL naslovu klica
- count (int): št. elementov v URL naslovu klica
Primer vhodnih podatkov:
GET api/assets?start=0&count=100
OPOMBA: V primeru, da parametrov v zahtevi ne navedete se upoštevajo privzete vrednosti:
Izhodni podatki:
- id (string)
- code (string)
- name (string)
- is_new (bool)
- new_name (string)
- new_code (string)
- audit_user_id (string)
- audit_username (string)
- audit_time (string)
- audit_type (int); 0 - scanner, 1 - manual, 2 - rfid
- audit_comment (string)
- writeoff (bool)
- asset_count (int)
- asset_owner_id (string)
- asset_owner_code (string)
- asset_owner_name (string)
- new_asset_owner_id (string)
- new_asset_owner_code (string)
- new_asset_owner_name (string)
- expected_location_id (string)
- expected_location_code (string)
- expected_location_name (string)
- actual_location_id (string)
- actual_location_code (string)
- actual_location_name (string)
- expected_cost_center_id (string)
- expected_cost_center_code (string)
- expected_cost_center_name (string)
- actual_cost_center_id (string)
- actual_cost_center_code (string)
- actual_cost_center_name (string)
- description (string)
- serial_number (string)
- status_code (string)
- status_description (string)
- optional_text_1 (string)
- optional_text_2 (string)
- optional_text_3 (string)
- optional_text_4 (string)
- optional_text_5 (string)
- asset_images_count (int)
- asset_images (array)
- rfid_tag (string)
- new_rfid_tag (string)
Primer izhodnih podatkov:
{
"row_count": 2,
"total_count": 2,
"data": [
{
"id": "b9156377-28f4-42a9-b7f0-44908e375980",
"code": "000001",
"name": "TEST ASSET 1",
"is_new": false,
"new_name": null,
"new_code": null,
"audit_user_id": "c51d08e2-242d-4b62-9f93-f000ad7b1ed4",
"audit_username": "[email protected]",
"audit_time": "2020-03-26T14:26:30.677",
"audit_type": 1,
"audit_comment": null,
"writeoff": false,
"asset_count": null,
"asset_owner_id": null,
"asset_owner_code": null,
"asset_owner_name": null,
"new_asset_owner_id": null,
"new_asset_owner_code": null,
"new_asset_owner_name": null,
"expected_location_id": "b47d479b-b057-4faa-fd3c-08d7d18143e5",
"expected_location_code": "1000",
"expected_location_name": "LOCATION 1",
"actual_location_id": "b47d479b-b057-4faa-fd3c-08d7d18143e5",
"actual_location_code": "1000",
"actual_location_name": "LOCATION 1",
"expected_cost_center_id": null,
"expected_cost_center_code": null,
"expected_cost_center_name": null,
"actual_cost_center_id": null,
"actual_cost_center_code": null,
"actual_cost_center_name": null,
"description": null,
"serial_number": "1234567",
"status_code": null,
"status_description": null,
"optional_text_1": null,
"optional_text_2": null,
"optional_text_3": null,
"optional_text_4": null,
"optional_text_5": null,
"asset_images_count": 2,
"asset_images": [],
"rfid_tag": null,
"new_rfid_tag": null
},
{
"id": "b8592395-85db-4dcc-a8af-be425031df63",
"code": "000002",
"name": "TEST ASSET 2",
"is_new": false,
"new_name": null,
"new_code": null,
"audit_user_id": "c51d08e2-242d-4b62-9f93-f000ad7b1ed4",
"audit_username": "[email protected]",
"audit_time": "2020-03-26T14:26:48.803",
"audit_type": 1,
"audit_comment": "Test comment",
"writeoff": true,
"asset_count": null,
"asset_owner_id": null,
"asset_owner_code": null,
"asset_owner_name": null,
"new_asset_owner_id": null,
"new_asset_owner_code": null,
"new_asset_owner_name": null,
"expected_location_id": "b47d479b-b057-4faa-fd3c-08d7d18143e5",
"expected_location_code": "1000",
"expected_location_name": "LOCATION 1",
"actual_location_id": "b47d479b-b057-4faa-fd3c-08d7d18143e5",
"actual_location_code": "1000",
"actual_location_name": "LOCATION 1",
"expected_cost_center_id": null,
"expected_cost_center_code": null,
"expected_cost_center_name": null,
"actual_cost_center_id": null,
"actual_cost_center_code": null,
"actual_cost_center_name": null,
"description": null,
"serial_number": null,
"status_code": null,
"status_description": null,
"optional_text_1": null,
"optional_text_2": null,
"optional_text_3": null,
"optional_text_4": null,
"optional_text_5": null,
"asset_images_count": 0,
"asset_images": [],
"rfid_tag": null,
"new_rfid_tag": null
}
]
}
OPOMBA: Pri izpisov vseh osnovnih sredstev slike v izhodnih podatkih niso vključene. Na voljo je podatek o številu slik (asset_images_count), ki za določeno sredstvo obstajajo. Če želite dostopati do podatkov slik osnovnega sredstva je potrebno narediti kilc za pridobitev podatkov posemeznega osnovnega sredstva.
PREGLED PODATKOV POSAMEZNEGA OSNOVNEGA SREDSTVA (BREZ SLIK)
URL: api/assets/{id}
HTTP metoda klica: GET
Parametri glave klica (Request headers): FindApiKey, FindApiAuthenticationToken
HTTP koda rezultata: 200, 401, 404
Vhodni podatki:
{id}; id osnovnega sredstva v URL naslovu klica
Izhodni podatki:
Struktura podatov je enaka kot pri izpisu vseh osnovnih sredstev, le da je v tem primeru vrnjeno samo eno osnovno sredstvo.
PREGLED PODATKOV POSAMEZNEGA OSNOVNEGA SREDSTVA (S SLIKAMI)
URL: api/assets/{id}?images=true
HTTP metoda klica: GET
Parametri glave klica (Request headers): FindApiKey, FindApiAuthenticationToken
HTTP koda rezultata: 200, 401, 404
Vhodni podatki:
{id}; id osnovnega sredstva v URL naslovu klica
Izhodni podatki:
Struktura podatov je enaka kot pri izpisu vseh osnovnih sredstev, le da je v tem primeru vrnjeno samo eno osnovno sredstvo.
Struktura objekta posamezne slike:
- id (string)
- image (string, base64 encoded image)
- thumbnail (string, base64 encoded image)
- description (string)
- type (int)
- captured_date (datetime)
Primer izhodnih podatkov:
{
"row_count": 1,
"total_count": 1,
"data": [
{
"id": "b9156377-28f4-42a9-b7f0-44908e375980",
"code": "000001",
"name": "TEST ASSET 1",
"is_new": false,
"new_name": null,
"new_code": null,
"audit_user_id": "c51d08e2-242d-4b62-9f93-f000ad7b1ed4",
"audit_username": "[email protected]",
"audit_time": "2020-03-26T14:26:30.677",
"audit_type": 1,
"audit_comment": null,
"writeoff": false,
"asset_count": null,
"asset_owner_id": null,
"asset_owner_code": null,
"asset_owner_name": null,
"new_asset_owner_id": null,
"new_asset_owner_code": null,
"new_asset_owner_name": null,
"expected_location_id": "b47d479b-b057-4faa-fd3c-08d7d18143e5",
"expected_location_code": "1000",
"expected_location_name": "LOCATION 1",
"actual_location_id": "b47d479b-b057-4faa-fd3c-08d7d18143e5",
"actual_location_code": "1000",
"actual_location_name": "LOCATION 1",
"expected_cost_center_id": null,
"expected_cost_center_code": null,
"expected_cost_center_name": null,
"actual_cost_center_id": null,
"actual_cost_center_code": null,
"actual_cost_center_name": null,
"description": null,
"serial_number": "1234567",
"status_code": null,
"status_description": null,
"optional_text_1": null,
"optional_text_2": null,
"optional_text_3": null,
"optional_text_4": null,
"optional_text_5": null,
"asset_images_count": 2,
"asset_images": [
{
"id": "5ff59bd7-45e4-4fa9-5f44-02d7d182a160",
"image": "ABC123...",
"thumbnail": "ABC123...",
"description": "Test image 2",
"type": 1,
"captured_date": "2019-01-30T00:00:00"
},
{
"id": "9f41a893-2a01-4692-8737-6e8f80265835",
"image": "ABC123...",
"thumbnail": "ABC123...",
"description": "Test image 1",
"type": 1,
"captured_date": "2019-01-30T00:00:00"
}
],
"rfid_tag": null,
"new_rfid_tag": null
}
]
}