cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1037
Views
20
Helpful
3
Replies

How to get all SEL log via restful api(redfish)

kdy77k@gmail.com
Beginner
Beginner

HI all,

According to the example of official website

 curl -GET https://10.10.10.10/redfish/v1/Managers/CIMC/LogServices
/SEL/Entries\?\$skip=2\&\$top=2 -u admin:admin123 --insecure

The upper example code can get top two and skipping two records of sel log.

 

curl -GET https://10.10.10.10/redfish/v1/Chassis/1/LogServices/SEL/Erestfurestful api redfish SELl api redfish SELntries/ -k -u admin:Admin123

The example code can get the top 50 records of sel log by default.

 

My question is:  how to get all sel log with one http "get" request?

I don't want to get the total record number of sel log, then get sel log record by record. I just want to get all sel log with one or few http request (As I know, the upper limit of record fetching in one return is 500)

 

I also find two questions

1. In address "redfish/v1/Chassis/1/LogServices/SEL/Entries/" , I can't find total number of record of sel log and left number of record of sel log

2. In address "redfish/v1/Chassis/1/LogServices/SEL/Entries/" , I can't find the url link to next 50 record of sel log.

3. Does Cisco support parameter "expand"?  Refer to the DMTF specification.

 

$skipInteger indicating the number of Members in the Resource Collection to skip before retrieving the first resource.http://resourcecollection?$skip=5
$topInteger indicating the number of Members to include in the response. The minimum value for this parameter is 1. The default behavior is to return all Members.http://resourcecollection?$top=30
$expandInclude data from links in the resource inline within the current payload, depending on the value of the expand.http://resourcecollection?$expand=.($levels=1)
$selectInclude a subset of the properties of a resource based on the expression specified in the query parameters for this option.http://resourcecollection?$select=SystemType,Status
$filterInclude a subset of the members of a collection based on the expression specified in the query parameters for this option.http://resourcecollection?$filter=SystemType eq 'Physical'
3 Replies 3

kdy77k@gmail.com
Beginner
Beginner

Hi all, 

Anyone can help me? Thanks a lot!

You might want to try posting over in https://community.cisco.com/t5/unified-computing-system-ucs/bd-p/j-disc-dev-dc-ucs

I didn't see a way after doing some tests either, but maybe some of the devs over there may have better ideas.

 

Kirk...

Hi @Kirk J,

Thank you for your reply. I suggest in the future version, Cisco could add a "next-page link" or "next-page indicator" in the url "redfish/v1/Chassis/1/LogServices/SEL/Entries/" .  Thus, ,client can follow the "next" link to get next page of sel log until the end of sel log array. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers