Examples of performing operations using XPRTLC and cURL

Last published : Jun 19, 2026
Following are some examples on performing operations using XPRTLC and cURL:
To get metadata for a host:
  • lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/meta/server/host

-  lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/meta/server/host
To define an extended attribute named department on object type cluster:
  • lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/meta/hadr/cluster
    /add?name=department

-  lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/meta/hadr/cluster
    /add?name=department
Adds and displays the extended attribute department for object type cluster in the Management Server console.
To modify an extended attribute named departmenttoDept_new on object type cluster:
  • lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/meta/hadr/cluster
    /modify?name=department&new_name=Dept_new

-  lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/meta/hadr/cluster
    /modify?name=department&new_name=Dept_new
To delete an extended attribute named Dept_new on object type cluster:
  • lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/meta/hadr/cluster
    /delete?name=dept_new

-  lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/meta/hadr/cluster
    /delete?name=dept_new
When you delete an extended attribute, it is not displayed in the Management Server console.
To update the extended attribute value for a host where the extended attribute is location:
  • lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/update/server/host
    /myhost_id?location=1st floor

-  lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/update/server/host
    /myhost_id?location=1st floor
To filter object disk group whose display type is private:
  • lang=txt
    xprtlc -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/query/server/host
    /myhost_id/diskgroup?display_type=private

-  lang=txt
    curl -g -k -b "session id"
    https://veritasdomain.example.com:14161/vom/api/query/server/host
    /myhost_id/diskgroup?display_type=private
To run a recovery plan:
  • lang=txt
    xprtlc -m POST -b "session id" -l
    'https://veritasdomain.example.com:14161/vom/api/op/hadr/recoveryplan/
    myrplan_id/execute' -d
    'payload={"Tasks": [{"task_order":"1", "IS_SKIP":false},
    {"task_order":"1", "TIMEOUT":"5"},
    {"task_order":"2", "IS_SKIP":false,
    "TIMEOUT":2}], "OfflineSharedSg":true}' -d
    'reason=recovery plan execution for ticket no. 123'

-  lang=txt
    curl -g -k -X POST -b "session id" -l
    'https://veritasdomain.example.com:14161/vom/api/op/hadr/recoveryplan/
    myrplan_id/execute' -d
    'payload={"Tasks": [{"task_order":"1", "IS_SKIP":false},
     {"task_order":"1","TIMEOUT":5},
     {"task_order":"2", "IS_SKIP":false,
     "TIMEOUT":2}], "OfflineSharedSg":true}' -d
    'reason=recovery plan execution for ticket no. 123'
To provision storage using a storage template
  • lang=txt
    xprtlc -b "session id" -m POST -d
    'payload={"HostId":"my_host_id",
     "DiskGroupId":"myDG_id", "VolSize":"vol_size"}' -l
    'https://veritasdomain.example.com:14161/vom/api/op/server/
     template/storage/storage_template_ID/provision'

-  lang=txt
    curl -g -k -X POST -b "session id" -l
    'https://veritasdomain.example.com:14161/vom/api/op/server/
     template/storage/storage_template_ID/provision' -d
    'payload={"HostId": {"my_host_id",
     "DiskGroupId":"myDG_id", "VolSize":"vol_size"}'

-  To move managed host in the Data Center.
   curl -g -k -X POST -b "session id"
   https://veritasdomain.example.com:14161/vom/api/
   op/server/{host_id}/moveto/datacenter/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/
op/server/%7B0002345-5432-4dff-0000-00000000000%7D/moveto/datacenter/
-  To move managed host from an Organization OE1 to child Organization OE3 of Organization OE2.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/
api/op/server/{host_id}/moveto_oe/OE2,OE3/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/
op/server/%7B0002345-5432-4dff-0000-00000000000%7D/moveto_oe/OE2,OE3/
-  To move cluster in the Data Center.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/
api/op/hadr/{cluster_id}/moveto/datacenter/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/rhelclust-42058/moveto/datacenter/
-  To move cluster from an Organization OE1 to child Organization OE3 of Organization OE2.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/
api/op/hadr/{cluster_id}/moveto_oe/OE2,OE3/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/rhelclust-42058/moveto_oe/OE2,OE3/
-  To online service group with the parameters force or propogate.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/host/
{hostname}/{force}/{propogate}/online/
Example: Service group online with parameter force
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/true/false/online
Example: Service group online with parameter propogate
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/false/true/online
-  To offline service group with the parameters force, propogate or probe.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/host/{hostname}/
{force}/{probe}/{propogate}/offline/
Example: Service group offline with parameter force
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/true/false/false/offline
Example: Service group offline with the parameters force and probe
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;
" https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/true/true/false/offline
-  To switch service group.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/host/{hostname}/switch/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/switch/
-  To freeze service group with the parameter persistent.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/{persistent}/freeze/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/
op/hadr/servicegroup/x1@linux_clus-00000/true/freeze/
Example: Freeze a service group without any parameter
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/
op/hadr/servicegroup/x1@linux_clus-00000/false/freeze/
-  To unfreeze service group.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/unfreeze/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/
op/hadr/servicegroup/x1@linux_clus-00000/unfreeze/
-  To clear fault on service group.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/host/{hostname}/clear/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/clear
-  To clear the clearadminwait state for service group.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/host/
{hostname}/{fault}/clearadminwait/
Example: Clear the clearadminwait state and the fault
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/true/clearadminwait
Example: Clear the clearadminwait state without clearing the fault
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/false/clearadminwait
-  To flush service group.
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/
hadr/servicegroup/{service_group_id}/host/{hostname}/flush/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/servicegroup/
x1@linux_clus-00000/host/example.com/flush
To bring a resource in a service group online.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/{force}/online/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/XYZ@sles11sp3-10000X1/host/example-xx00/false/online/
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/{force}/online/
Example
xprtlc -m POST -b "JSESSIONID=EEDA99759F7A2F14DD64A156422C406A;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/XYZ@sles11sp3-20921U1/host/ABCqaesx3-vm00/false/online/
To offline a resource in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/{ignore-parent}/offline/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/XYZ@sles11sp3-10000X1/host/example-xx00/false/offine/
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/{ignore-parent}/offline/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/XYZ@sles11sp3-10000X1/host/example-xx00/false/offline/
To disable a resource in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/disable/
Example
curl -g -k -X POST -b "session id"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/XYZ@sles11sp3-10000X1/disable/
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/disable/
Example
xprtlc -m POST -b "JSESSIONID=EEDA99759F7A2F14DD64A156422C406A;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/{resourceid}/disable/
To enable a resource in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/enable/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/XYZ@sles11sp3-10000X1/enable/
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/enable/
Example
xprtlc -m POST -b "JSESSIONID=EEDA99759F7A2F14DD64A156422C406A;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/
resource/{resourceid}/enable/
To enable all the resources in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    servicegroup/{sgid}/enableallresources/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
servicegroup/my_group%00rhel6_10_58000/enableallresources/
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    servicegroup/{sgid}/enableallresources/
Example
xprtlc -m POST -b "JSESSIONID=EEDA99759F7A2F14DD64A156422C406A;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/
servicegroup/my_group%00rhel6_10_58000/enableallresources/
To disable all the resources in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    servicegroup/{sgid}/disableallresources/
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/
servicegroup/my_group%00rhel6_10_58000/disableallresources/
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    servicegroup/{sgid}/disableallresources/
Example
xprtlc -m POST -b "JSESSIONID=EEDA99759F7A2F14DD64A156422C406A;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/
servicegroup/{my_group%00rhel6_10_58000}/disableallresources/
To clear a resource in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/clear
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/resource/
rhel6_00_00%40rhel6_19-12340File_on_off_00/host/{example.com}/clear
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/clear
Example
xprtlc -m POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/resource/
rhel6_00_00%40rhel6_19-12340File_on_off_00/host/example.com/clear
To probe a resource in a service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/op/hadr/
    resource/{resourceid}/host/{hostname}/probe
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/vom/api/op/hadr/resource/
rhel6_00_00%40rhel6_19-12340File_on_off_00/host/example.com/probe
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/vom/api/op/hadr/resource/
    {resourceid}/host/{hostname}/probe
Example
xprtlc -m POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;" -l
https://veritasdomain.example.com:14161/vom/api/op/hadr/resource/
rhel6_00_00%40rhel6_19-12340File_on_off_00/host/example.com/probe
To show child service group.
  • lang=txt
    curl -g -k -X POST -b "session id"
    https://veritasdomain.example.com:14161/vom/api/query/hadr/
    cluster/{clus_id}/sg/{sg_id}

> **Note:** sg_id is the encoded ID of the cluster.
Example
curl -g -k -X POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;"
https://veritasdomain.example.com:14161/
vom/api/query/hadr/cluster/rhel6_00-012345/sg/grp_0009%00rhel6_00-12345
-  lang=txt
    xprtlc -m POST -b "session id" -l
    https://veritasdomain.example.com:14161/
    vom/api/query/hadr/cluster/{clus_id}/sg/{sg_id}
Example
xprtlc -m POST -b "JSESSIONID=13C8F4E4203BFE96DD6D1LFC69FC7B65;" -l
https://veritasdomain.example.com:14161/vom/api/query/hadr/
cluster/rhel6_00-012345/sg/grp_0009%00rhel6_00-12345
Where, veritasdomain.example.comis the name of your Management Server, server is the Server perspective, hadr is the Availability perspective,myhost_idis the encoded ID of the host,myDG_idis the encoded ID of the disk group,cluster_idis the encoded ID of the cluster, andmyrplan_id is the recovery plan ID.
If "Ask reason for all operations" is enabled under Advanced Authorization in the Management Server perspective, then you need to provide a reason for performing the operation.
Note: The output of thequeryURL for an object displays theencoded_idvalue. You need to use this encoded ID value to update the extended attribute for that object. Similarly the GET request on an operation URL shows a sample URL for executing the operation.
More Information
Related information