Description

This article applies to all CSO versions. The purpose here is to track the API used to check the images and its details stored in CSO Swift Database. 

Symptoms

API used to list the images stored in CSO Database.

Solution

Steps to list the images stored in CSO Database:
  1. Below POSTMAN API can be used to list the images stored in CSO Database. This API will list the UUID of the images.

    Method: GET , url :- https://<cso IP>/ems-central/image/

    <output snip for ref>

    {
    "image": [
    {
    "fq_name": [
    "default-domain",
    "default-project",
    "image_default-domain_default-project_junos-srxsme-19.3X5.tgz".  ----> image name 
    ],
    "uuid": "cd4b4413-022b-4723-8654-199de45f72c1",   ------> image uuid
    "uri": "/ems-central/image/cd4b4413-022b-4723-8654-199de45f72c1"
    },
    {
    "fq_name": [
    "default-domain",
    "default-project",
    "image_default-domain_default-project_junos-install-vsrx3-x86-64-20.2R3-S2.5.tgz"
    ],
    "uuid": "943f06ff-02b4-446b-bfac-110b1b4bbb26",
    "uri": "/ems-central/image/943f06ff-02b4-446b-bfac-110b1b4bbb26"
    },
    {
    "fq_name": [
    "default-domain",
    "default-project",
    "image_default-domain_default-project_junos-srxentedge-x86-64-20.2R3-S2.5.tgz"
    ],
    "uuid": "4787b5b3-5bd6-41a2-81fd-4c2ce4eb906c",
    "uri": "/ems-central/image/4787b5b3-5bd6-41a2-81fd-4c2ce4eb906c"
    },
    {
    "fq_name": [
    "default-domain",
    "default-project",
    "image_default-domain_default-project_junos-srxsme-20.2R3-S2.5.tgz"
    ],
    "uuid": "8b3f8673-7e31-4b0a-bdaf-9645d7cdcd15",
    "uri": "/ems-central/image/8b3f8673-7e31-4b0a-bdaf-9645d7cdcd15"
    },
  2. Use the below API along with the UUID of the interested image to get further details of the image.

    Method: GET , Url :- https://<cso ip>/ems-central/image/<image uuid>

    <output snip for reference>

    {
    "image": {
    "device_family": "juniper-srx",
    "vendor": "Juniper",
    "parent_uuid": "75c5e45f-f7b6-438b-bee5-6a9384303739",
    "image_size": 404485793,
    "parent_type": "project",
    "supported_platform": [
    "srxsme",
    "srxsme,SRXME,SRX300,SRX320,SRX340,SRX345"
    ],
    "build_num": "R3-S2.5",
    "perms2": {
    "owner": "75c5e45ff7b6438bbee56a9384303739",
    "owner_access": 7,
    "global_access": 0,
    "share": [
    {
    "tenant_access": 4,
    "tenant": "share.descendant_projects"
    }
    ]
    },
    "image_file_md5": "b0fda02c5db3e4e36624ce46c9f3e2cf",
    "display_name": "junos-srxsme-20.2R3-S2.5",
    "image_file_sha1": "ad3ec0e37f5e7723a1f9cc410b0e1e1b32f7a65a",
    "name": "image_default-domain_default-project_junos-srxsme-20.2R3-S2.5.tgz",
    "properties_image": {
    "property": [
    {
    "name": "version_from_image",
    "value": "20.2R3-S2.5"
    }
    ]
    },
    "fq_name": [
    "default-domain",
    "default-project",
    "image_default-domain_default-project_junos-srxsme-20.2R3-S2.5.tgz"
    ],
    "uuid": "8b3f8673-7e31-4b0a-bdaf-9645d7cdcd15",
    "image_type": "DEVICE_IMAGE",
    "file_uri": "/v1/AUTH_7e9466f5932a4ddaa028bb184181a808/mycontainer/image_default-domain_default-project_junos-srxsme-20.2R3-S2.5.tgz",
    "cname": "junos-srxsme-20.2R3-S2.5.tgz",
    "major_version": 20,
    "uri": "/ems-central/image/8b3f8673-7e31-4b0a-bdaf-9645d7cdcd15",
    "minor_version": 2,
    "upload_ts": 1630028228440,
    "id_perms": {
    "enable": true,
    "uuid": {
    "uuid_mslong": 10033886325401275146,
    "uuid_lslong": 13668308620810243349
    },
    "created": "2021-08-27T01:37:08.538687",
    "description": null,
    "creator": "admin",
    "user_visible": true,
    "last_modified": "2021-08-27T01:37:08.538687",
    "modifier": "admin",
    "permissions": {
    "owner": "admin",
    "owner_access": 7,
    "other_access": 7,
    "group": "admin",
    "group_access": 7
    }
    },
    "regions": [
    "regional"
    ],
    "image_file_sha256": "c024ce4eb9b42277162bd3741b7392eaef88b7c5e1c340b8ec4959492241f1e8",
    "parent_uri": "/ems-central/project/75c5e45f-f7b6-438b-bee5-6a9384303739"
    }
    }

Modification History

2023-05-25: Initial publication