How to create a new CWP in gateway
search cancel

How to create a new CWP in gateway

book

Article ID: 381264

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

How to create a new CWP in gateway using RestMan?

Environment

API Gateway all Supported releases.

Resolution

Perform Postman/restman call ...

Request
POST 1.0/clusterProperties
Body
The cluster property to create
Element l7:ClusterProperty
Content-Type application/xml

 

Sample Body:

<l7:ClusterProperty xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
                 <l7:Name>ping_new1</l7:Name>
                 <l7:Value>testing_cwp</l7:Value>
             </l7:ClusterProperty>

 

Curl code example :

curl -k -v -X PUT https://<MyGatwayIPorName>:8443/restman/1.0/clusterProperties -u admin:7layer -H 'content-type: application/xml' 
--data-raw '<l7:ClusterProperty xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">  <l7:Name>Testcwp01</l7:Name>  <l7:Value>testing_cwp</l7:Value>  </l7:ClusterProperty>'

Graphman code Example :

curl --request POST \
  --url https://<MyGatwayIPorName>:8443/graphman \
  --header 'authorization: Basic YWRtaW46N2xheWVy' \
  --header 'content-type: application/json' \
  --data '{"query":"mutation setClusterProperties ($clusterProperties: [ClusterPropertyInput!]!) {\n    setClusterProperties (input: $clusterProperties) {\n
         detailedStatus {status description}\n        clusterProperties {\n            goid\n            name\n            checksum\n        }\n  
           }\n}","variables":"{\n  \"clusterProperties\": [\n    {\n      \"name\": \"some-cwp\",\n     
            \"description\": \"some cluster property\",\n      \"hiddenProperty\": false,\n      \"value\": \"some-value\"\n    },\n 
               {\n      \"name\": \"some-other-cwp\",\n      \"description\": \"\",\n      \"hiddenProperty\": false,\n      \"value\": \"1234\"\n    }\n  ]\n}"}'

 

 

Additional Information

RestMan documentation: https://<gatewayip/hostname>:8443/restman/1.0/doc/restDoc.html#1.0/clusterProperties