How do I perform multiple operations on my NetScaler ... - Citrix [PDF]

How do I perform multiple operations on my NetScaler appliance by using single NITRO API call. One of the most basic set

7 downloads 5 Views 51KB Size

Recommend Stories


Citrix NetScaler and Microsoft Sharepoint
Love only grows by sharing. You can only have more for yourself by giving it away to others. Brian

how do i maintain my certification?
Love only grows by sharing. You can only have more for yourself by giving it away to others. Brian

How do I get my instrument?
If you want to go quickly, go alone. If you want to go far, go together. African proverb

How do I install my software program?
Stop acting so small. You are the universe in ecstatic motion. Rumi

How do I Change my Challenge Question
Where there is ruin, there is hope for a treasure. Rumi

How do I change my party affiliation?
If you want to go quickly, go alone. If you want to go far, go together. African proverb

How Do I Share with Multiple Users?
Kindness, like a boomerang, always returns. Unknown

How do I link my tracker? - Jiff Help [PDF]
Feb 23, 2017 - IMPORTANT: If you are re-linking a tracking service, on this final step, do not allow it to automatically sign in using previously cached account credentials. The previously cached credentials are probably wrong which is why you are tr

MEM07007C Perform milling operations
Pretending to not be afraid is as good as actually not being afraid. David Letterman

Idea Transcript


How do I perform multiple operations on my NetScaler appliance by using single NITRO API call One of the most basic sets of API operations used frequently by administrators is one that creates a set of lbvservers, services, and service groups, and adds the necessary bindings. This and similar tasks used to require multiple NITRO API commands, because the NITRO API did not support bulk configuration. Customers needed an API that could reduce network traffic by optimizing the execution of multiple tasks. NetScaler release 11.1 introduced an API resource called macroapi, with which you can configure heterogeneous resources with a single API command. Points to remember: - Only homogenous operations are supported in a single macroapi request. For example, multiple load balancing virtual servers can be created (POST method) but cannot be updated (PUT method) or deleted (DELETE method) in the same macroapi request. - NITRO handles each request in an atomic manner. - Failures can be handled by using the X-NITRO-ONERROR http header, which specifies what to do when any of the calls in the bulk request fails. Possible options are continue, exit (the default), and rollback (for ADD or BIND operations only). - To delete multiple resources when using MACRO API, you must use the POST HTTP method with an action=remove query parameter in the request URL Example1: Request for creation: Add 2 lbvservers, 5 services, and 1 service group, add members to the service group, bind service(s) to the lbvserver(s) and bind the service group to lbvserver(s). • • •



URL: http:///nitro/v1/config/macroapi HTTP Method: POST Request Headers o Content-Type: application/json o X-NITRO-ONERROR: exit Payload: { "lbvserver": [ {"name":"lbvserver1","servicetype":"http"}, {"name":"lbvserver2","servicetype":"http"} ], "service": [ {"name":"service1", "servername":"10.102.216.115", "port":"80", "servicetype":"http"}, {"name":"service2","servername":"10.102.216.108", "port":"80","servicetype":"http"},

{"name":"service3","servername":"10.102.216.109", "port":"80","servicetype":"http"}, {"name":"service4","servername":"10.102.216.54", "port":"80","servicetype":"http"}, {"name":"service5","servername":"10.102.216.175", "port":"80","servicetype":"http"} ], "lbvserver_service_binding": [ {"name":"lbvserver1", "servicename":"service1"}, {"name":"lbvserver1", "servicename":"service2"}, {"name":"lbvserver1", "servicename":"service3"}, {"name":"lbvserver2", "servicename":"service4"}, {"name":"lbvserver2", "servicename":"service5"} ], "serviceGroup": [ { "servicegroupname": "servicegroup1", "servicetype": "HTTP" } ], "servicegroup_servicegroupmember_binding": [ { "servername":"10.105.157.72","servicegroupname":"servicegroup1","port":"80"}, { "servername":"10.105.157.246","servicegroupname":"servicegroup1","port":"80"} ], "lbvserver_servicegroup_binding": [ { "name":"lbvserver1", "servicegroupname":"servicegroup1" } ] } Example2: Request for update operations: Update lbmethod for 2 lbvservers and timeout for servicegroup • • •



URL: http:///nitro/v1/config/macroapi HTTP Method: PUT Request Headers o Content-Type: application/json o X-NITRO-ONERROR: exit Payload: { "lbvserver": [

{"name":"lbvserver1","lbmethod":"roundrobin"}, {"name":"lbvserver2","lbmethod":"roundrobin"} ], "serviceGroup": [ { "servicegroupname": "servicegroup1", "svrtimeout": "10" } ] } Example3: Request for deletion: Delete 2 lbvservers, 5 services and 1 servicegroup • • •





URL: http:///nitro/v1/config/macroapi?action=remove HTTP Method: POST Request Headers o Content-Type: application/json o X-NITRO-ONERROR: exit Payload: { "lbvserver": [ {"name":"lbvserver1"}, {"name":"lbvserver2"} ], "service": [ {"name":"service1"}, {"name":"service2"}, {"name":"service3"}, {"name":"service4"}, {"name":"service5"} ], "serviceGroup": [ { "servicegroupname": "servicegroup1"} ] }

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.