The ceph osd ls command simply returns a list of the OSD numbers currently deployed within the cluster.
# ceph osd ls | head -3 0 1 2 # ceph osd ls |wc 280 280 1010 #
This information could be derived by processing the output of ceph osd tree, but this is a convenient way to drive all in a single command