PowerStore: PowerStore Rest API를 사용하는 방법

Résumé: 이 문서에서는 실제 사용 예 및 일반적인 오류를 포함하여 PowerStore REST API에 대해 소개합니다.

Cet article concerne Cet article ne concerne pas Cet article n’est associé à aucun produit spécifique. Toutes les versions du produit ne sont pas identifiées dans cet article.

Instructions

Postman, HTTPie 및 cURL을 비롯한 여러 도구를 사용하여 REST API를 테스트할 수 있습니다. 이 문서에서 cURL은 기본적으로 대부분의 운영 체제에서 쉽게 사용할 수 있으므로 모든 예제에 사용됩니다.
 
일반적인 REST API 사용:

 

노드 상태:
curl -H "수락 : application / json"-u "admin : ********"-X GET -k https://xx.xx.xx.xx/api/rest/hardware?select=id,name,type,lifecycle_state?type=eq.Node

출력 예:

{"id":"00b941ceea9243f0a36e85abe9504214","name":"BaseEnclosure-NodeB","type":"Node","lifecycle_state":"정상"},
{"id":"2877d096fd2a4cc4b3b8af97f21c1c24","name":"BaseEnclosure-NodeA","type":"Node","lifecycle_state":"정상"}

 

복제 상태:
curl -H "수락 : application / json"-u "admin : ********"-X GET -k https://xx.xx.xx.xx/api/rest/replication_session?select=id,role,state,last_sync_timestamp,local_resource_id

출력 예:

{"id":"047e38ee-9aeb-4761-8ca5-393204fe6584","role":"Metro_Preferred","state":"OK","last_sync_timestamp":"2026-07-16T15:48:05.628263+00:00","local_resource_id":"d34bd80e-1d43-4692-ab37-e307bc92eb73"},
{"id":"26dd4105-a24f-4d82-b40b-20dcefbfe5df","role":"Source","state":"OK","last_sync_timestamp":"2026-07-16T15:31:54.64127+00:00","local_resource_id":"82c40277-dee4-46de-8559-920fe5f942cc"},
{ "id": "414dba20-08b1-4d5e-a521-517a3b37473a", "role": "Metro_Preferred", "state": "OK", "last_sync_timestamp": "2026-07-16T15 : 51 : 05.525764 + 00 : 00", "local_resource_id": "eb970724-cc3e-4661-8d71-bec7f44baf10"}

 

시스템 알림:
curl -H "수락 : application / json"-u "admin : ********"-X GET -k https://xx.xx.xx.xx/api/rest/alert?select=id,event_code,severity,resource_type,generated_timestamp,state,description_l10n

출력 예:

{"id":"008abb47-e72d-4608-b915-b8c01328b64e","event_code":"0x01700304","severity":"주요","resource_type":"remote_system","generated_timestamp":"2026-05-11T01:51:01.280627+00:00","state":"ACTIVE","description_l10n":"원격 시스템 Ghost의 모든 데이터 연결이 끊어졌습니다."},
{"id":"01114811-82a9-484e-8cf9-3da50c0e3d7b","event_code":"0x01701801","severity":"정보","resource_type":"볼륨","generated_timestamp":"2026-07-14T02:15:34.764524+00:00","state":"CLEARED","description_l10n":"HyperV-Node1 리소스에 대해 구성된 Metro Witness가 사용되었습니다."}

 

감사 이벤트:
curl -H "수락 : application / json"-u "admin : ********"-X GET -k https://xx.xx.xx.xx/api/rest/audit_event?select=id,type,timestamp,username,resource_type,resource_action,message_l10n,client_address

출력은 거대할 수 있으며 필터가 필요합니다. 예를 들어 admin 사용자와 관련된 이벤트를 볼 수 있습니다. try:
curl -H "Accept: application/json" -u "admin:********" -X GET -k https://xx.xx.xx.xx/api/rest/audit_event?select=id,type,timestamp,username,resource_type,resource_action,message_l10n,client_address?username=eq.admin

출력 예:

{"id":"111540","type":"Config","timestamp":"2026-03-11T20:25:57.267124+00:00","username":"admin","resource_type":"host","resource_action":"delete","message_l10n":"이름:Thors 183.24(iSCSI) 및 ID: c698f28b-49ac-4268-a9c7-c6da66bdfbc8.","client_address":"10.158.49.47"},
{"id":"111541","type":"구성","timestamp":"2026-03-11T20:25:57.337655+00:00","username":"admin","resource_type":"host","resource_action":"delete"," message_l10n":"호스트 유형 및 ID c698f28b-49ac-4268-a9c7-c6da66bdfbc8인 리소스와 연결된 키[]가 있는 메타데이터를 성공적으로 삭제했습니다.","client_address":"10.158.49.47"}

 

스냅샷 목록:
curl -H "수락 : application / json"-u "admin : ********"-X GET -k https://xx.xx.xx.xx/api/rest/volume_snap_list_cma_view?select=id,name,source_timestamp,description,creation_timestamp

출력 예:{"id"
:"24d7856d-d389-4f05-9752-ebb1de61a6d6","name":"Walid Snaps.PowerTriage-RHEL (Walid DO NOT DELETE)..2026-07-15T00:00:00Z 189403910","source_timestamp":"2026-07-15T00:03:16.096762+00:00","description":"","creation_timestamp":"2026-07-15T00:03:16.096762+00:00"},
{"id":"2cfd727f-b09c-4895-8fd5-93850fd63698","name":"Daily-File.7DSL0M2-1-001.2026-07-14T00:08:08:08Z 281536767","source_timestamp":"2026-07-14T00:08:08.618343+00:00"," 설명":null,"creation_timestamp":"2026-07-14T00:08:08.618343+00:00"}

 

성능 메트릭:
curl -H "Accept: application/json" -H "Content-Type: application/json" -u "admin:********" -X POST -k https://xx.xx.xx.xx/api/rest/metrics/generate -d '{ "entity": "performance_metrics_by_appliance", "entity_id": "A1","interval": "One_Day" }'|jq '.'

출력 예:


{ "appliance_id": "A1",
"타임스탬프": "2026-07-15T00:00:00Z",
"avg_read_latency": 172.76094,
"avg_write_latency": 404.14536,
"avg_mirror_write_latency": 924.59375,
"avg_mirror_overhead_latency": 364.82297,
"avg_latency": 273.2135,
"avg_read_size": 91601.2,
"avg_write_size": 6204.5635,
"avg_io_size": 54527.355,
"avg_read_iops": 9.996701,
"avg_write_iops": 7.669595,
"avg_mirror_write_iops": 0.024386574,
  "avg_total_iops": 17.666296,
"avg_read_bandwidth": 915709.9,
"avg_write_bandwidth": 47586.49,
"avg_mirror_write_bandwidth": 190.67259,
"avg_total_bandwidth": 963296.4,
"avg_io_workload_cpu_utilization": 0.00399437453597784,
"max_avg_read_latency": 401.14688,
"max_avg_write_latency": 1679.9584,
"max_avg_latency": 652.1067,
"max_avg_mirror_write_latency": 3842,
"max_avg_mirror_overhead_latency": 3319,
  "max_avg_read_size": 99656.45,
"max_avg_write_size": 30189.037,
"max_avg_io_size": 85726.97,
"max_read_iops": 161.2,
"max_write_iops": 680.6,
"max_mirror_write_iops": 3.8,
"max_total_iops": 834,
"max_read_bandwidth": 8509440,
"max_write_bandwidth": 8792986,
"max_mirror_write_bandwidth": 22732.8,
"max_total_bandwidth": 17252044,
"max_io_workload_cpu_utilization": 0.2170485556125641,
"repeat_count": 1,

  ...

  "response_definition": "performance_metrics_by_appliance_rollup",
"entity": "performance_metrics_by_appliance"
}

 

Rest API의 일반적인 오류:

curl 명령에 "-v"를 추가하여 오류를 표시합니다. 

예 1: 잘못된 자격 증명입니다.

curl -H "수락 : application / json"-u "admin : wrong_password"-k https://10.241.219.160/api/rest/hardware?select=id,name,type,lifecycle_state?type=eq.Node

* 요청이 완전히 전송되었습니다
* TLSv1.3 (IN), TLS 핸드 셰이크, Newsession 티켓 (4) :
< HTTP / 1.1 401 승인되지 않은
< WWW-인증 : SSOCustom realm = "Cyclone Realm"content-type
< : application / json
< content-length : 0

예 2: httpd가 실행되고 있지 않습니다.

curl -v -H "수락 : application / json"-u "admin : ********"-k https://xx.xx.xx.xx/api/rest/hardware?select=id,name,type,lifecycle_state?type=eq.Node
* xx.xx.xx.xx : 443 시도 중 ...
* xx.xx.xx.xx 포트 59124에서 xx.xx.xx.xx 포트 443에 연결 실패: 연결 시간 초과
* 31939ms 후 xx.xx.xx.xx 포트 443에 연결하지 못함: 서버에
연결할 수 없음* 연결 닫기 #0
컬: (28) 31939ms 후 xx.xx.xx.xx 포트 443에 연결하지 못함: 서버에 연결할 수 없습니다.

예제 3: 콘텐츠 형식이 없는 잘못된 구문입니다.

curl -v -H "Accept: application/json" -u "admin:********" -X POST -k https://xx.xx.xx.xx/api/rest/metrics/generate -d '{ "entity": "performance_metrics_by_appliance", "entity_id": "A1", "interval": "One_Day" }'
{"messages":[{"severity":"Error","code":"0xE04040030001","message_l10n":"유효성 검사 실패: 요청 Content-Type 헤더 '[application/x-www-form-urlencoded]'가 허용된 유형과 일치하지 않습니다. 다음 중 하나여야 함: [application/json]., 요청 본문이 필요하지만 찾을 수 없음..","arguments":[{"delimiter":", ","messages":[{"severity":"오류","code":"validation.request.contentType.notAllowed","message_l10n":"요청 Content-Type 헤더 '[application/x-www-form-urlencoded]'이(가) 허용된 유형과 일치하지 않습니다. 다음 중 하나여야 함: [application/json].","arguments":["[application/x-www-form-urlencoded]","[application/json]"]},{"severity":"오류","code":"validation.request.body.missing","message_l10n":"요청 본문이 필요하지만 찾을 수 없습니다."}]}]}]}

 

유용한 링크:

https://dl.dell.com/content/manual55475248-dell-powerstore-rest-api-developers-guide.pdf?language=en-us

https://< PWST_CLUSTER_IP>/swaggerui/

 

Produits concernés

PowerStore, PowerStoreOS
Propriétés de l’article
Numéro d’article: 000490125
Type d’article: How To
Dernière modification: 31 juil. 2026
Version:  2
Trouvez des réponses à vos questions auprès d’autres utilisateurs Dell
Services de support
Vérifiez si votre appareil est couvert par les services de support.