Previous Topic: create Method (cat Object)Next Topic: get_acl Method (cat Object)


rename Method (cat Object)
Description

Rename global catalog

Syntax
/api/v1/cat/rename?cat=catalog&new_name=new-catalog&vdc=controller-name 
Arguments
cat

Name of the catalog to be renamed

new_name

New name of the catalog

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Rename /test catalog to /test2.

GET http://192.168.123.200/api/v1/cat/rename?cat=/test&new_name=/test2&vdc=mygrid 
Sample Output
XML:
<opt></opt>
JSON:
{} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (cat). - Argument cat=catalog missing in the request.

400.4

Missing required arguments (new_name). - Argument new_name=new-catalog missing in the request.

404.1

Catalog 'test' doesn't exist. - Invalid catalog specified in the request.

404.1

'test' is not a valid catalog. - Invalid new_name specified in the catalog.

migrate Method (cat Object)
Description

Migrate a catalog from a remote grid

Syntax
/api/v1/cat/migrate?cat=catalog&grid=remote-grid&vdc=controller-name 
Arguments
cat

Name of the catalog to migrate

grid

IP or FQDN of the remote grid

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Migrate the test catalog from remote-grid.mygrid.net.

GET http://192.168.123.200/api/v1/cat/migrate?cat=test&grid=remote-grid.mygrid.net&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (cat). - Argument cat=catalog missing in the request.

400.4

Missing required arguments (grid). - Argument grid=remote-grid missing in the request.

Note: To get the status of job, issue a /api/v1/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

export Method (cat Object)
Description

Export a catalog

Syntax
/api/v1/cat/export?cat=catalog&dir=directory&vdc=controller-name 
Arguments
cat

Name of the catalog

dir

Name of exchange directory relative to /vol/_impex where catalog is to be exported to

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Export /test.

GET http://192.168.123.200/api/v1/cat/export?cat=/test&dir=test&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>  
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}

HTTP Error Codes
400.4

Missing required arguments (cat,dir) - Argument cat=cat and dir=dir missing

400.4

Missing required arguments (cat) - Argument cat=cat missing

400.4

Missing required argument (dir) - Argument dir=dir missing

Note: To get the status of job, issue a /api/v1/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

import Method (cat Object)
Description

Import a catalog

Syntax
/api/v1/cat/import?cat=catalog&dir=directory&vdc=controller-name 
Arguments
cat

Name of the catalog

dir

Name of exchange directory relative to /vol/_impex where catalog is to be imported from

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Import /test.

GET http://192.168.123.200/api/v1/cat/import?cat=/test&dir=test&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>   
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (cat,dir) - Argument cat=cat and dir=dir missing

400.4

Missing required arguments (cat) - Argument cat=cat missing

400.4

Missing required argument (dir) - Argument dir=dir missing

Note: To get the status of job, issue a /api/v1/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

get_desc Method (cat Object)
Description

Retrieve catalog package descriptor

Syntax
/api/v1/cat/get_desc?cat=catalog&vdc=controller-name 
Arguments
cat

Name of the catalog

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve package descriptor for /system.

GET http://192.168.123.200/api/v1/cat/get_desc?cat=/system&vdc=mygrid 
Sample Output
XML:
<message>package system 
   { 
   type = catalog 
 
   class HALB : file = HALB.desc 
 
   class IN : file = IN.desc 
 
   class INSSLR : file = INSSLR.desc 
 
   class LINUX5 : file = LINUX5.desc 
 
   class LINUX64 : file = LINUX64.desc 
 
   class LOAD : file = LOAD.desc 
 
   class LUX5 : file = LUX5.desc 
 
   class LUX64 : file = LUX64.desc 
 
   class L3LB : file = L3LB.desc 
 
   class MON : file = MON.desc 
 
   class MYSQLR : file = MYSQLR.desc 
 
   class MYSQLR64 : file = MYSQLR64.desc 
 
   class MYSQL5 : file = MYSQL5.desc 
 
   class NAS : file = NAS.desc 
 
   class NASR : file = NASR.desc 
 
   class NET : file = NET.desc 
 
   class OSOL : file = OSOL.desc 
 
   class OSOL64 : file = OSOL64.desc 
 
   class OUT : file = OUT.desc 
 
   class PGSQL64 : file = PGSQL64.desc 
 
   class PS8 : file = PS8.desc 
 
   class RPL : file = RPL.desc 
 
   class SQUID : file = SQUID.desc 
 
   class TOMCAT : file = TOMCAT.desc 
 
   class TOMCAT64 : file = TOMCAT64.desc 
 
   class URLSW : file = URLSW.desc 
 
   class VPN : file = VPN.desc 
 
   class WEBx4 : file = WEBx4.desc 
 
   class WEBx8 : file = WEBx8.desc 
 
   class WEB5 : file = WEB5.desc 
 
   class WEB64 : file = WEB64.desc 
 
   protocol mysql : filter = &quot;tcp_in:3306&quot; 
   protocol http : filter = &quot;tcp_in:80&quot; 
   protocol https : filter = &quot;tcp_in:443&quot; 
   protocol smtp : filter = &quot;tcp_in:25&quot; 
   protocol pgsql : filter = &quot;tcp_in:5432&quot; 
   protocol pop3 : filter = &quot;tcp_in:110&quot; 
   protocol nfs : filter = &quot;rpc:nfs&quot; 
   protocol syslog : filter = &quot;udp:514&quot; 
   protocol ssh : filter = &quot;tcp_in:22&quot; 
   protocol cce : filter = &quot;grb:90;ccs:91&quot; 
   protocol cifs : filter = &quot;tcp_in:445;udp:445&quot; 
   } 
</message>   
JSON:
{ 
   "message" : "package system\n   {\n   type = catalog\n\n   class HALB : file = HALB.desc\n\n   class IN : file = IN.desc\n\n   class INSSL : file = INSSL.desc\n\n   class INSSLR : file = INSSLR.desc\n\n   class LINUX5 : file = LINUX5.desc\n\n   class LINUX64 : file = LINUX64.desc\n\n   class LOAD : file = LOAD.desc\n\n   class LUX5 : file = LUX5.desc\n\n   class LUX64 : file = LUX64.desc\n\n   class L3LB : file = L3LB.desc\n\n   class MON : file = MON.desc\n\n   class MYSQLR : file = MYSQLR.desc\n\n   class MYSQLR64 : file = MYSQLR64.desc\n\n   class MYSQL5 : file = MYSQL5.desc\n\n   class NAS : file = NAS.desc\n\n   class NASR : file = NASR.desc\n\n   class NET : file = NET.desc\n\n   class OSOL : file = OSOL.desc\n\n   class OSOL64 : file = OSOL64.desc\n\n   class OUT : file = OUT.desc\n\n   class PGSQL64 : file = PGSQL64.desc\n\n   class PS8 : file = PS8.desc\n\n   class RPL : file = RPL.desc\n\n   class SQUID : file = SQUID.desc\n\n   class TOMCAT : file = TOMCAT.desc\n\n   class TOMCAT64 : file = TOMCAT64.desc\n\n   class URLSW : file = URLSW.desc\n\n   class VPN : file = VPN.desc\n\n   class WEBx4 : file = WEBx4.desc\n\n   class WEBx8 : file = WEBx8.desc\n\n   class WEB5 : file = WEB5.desc\n\n   class WEB64 : file = WEB64.desc\n\n   protocol mysql : filter = \"tcp_in:3306\"\n   protocol http : filter = \"tcp_in:80\"\n   protocol https : filter = \"tcp_in:443\"\n   protocol smtp : filter = \"tcp_in:25\"\n   protocol pgsql : filter = \"tcp_in:5432\"\n   protocol pop3 : filter = \"tcp_in:110\"\n   protocol nfs : filter = \"rpc:nfs\"\n   protocol syslog : filter = \"udp:514\"\n   protocol ssh : filter = \"tcp_in:22\"\n   protocol cce : filter = \"grb:90;ccs:91\"\n   protocol cifs : filter = \"tcp_in:445;udp:445\"\n   }\n" 
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (cat) - Argument cat=cat missing

404.1

Request processing failed - Global catalog 'test' not found - Invalid catalog specified

put_desc Method (cat Object)
Description

Replace catalog package descriptor

Syntax
/api/v1/cat/put_desc?vdc=controller-name -F cat=catname -F desc=@descriptor-file
Arguments
cat

Name of the catalog

desc

Name of the descriptor file

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

POST: multipart/form-data

Examples

Replace descriptor for /test

POST http://192.168.123.200/api/v1/cat/put_desc?vdc=mygrid -F cat=cat -F desc=@desc.txt  
Sample Output
XML:
<message></message>   
JSON:
{ 
   "message" : "" 
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (cat) - Argument cat=cat missing

Note: Currently only requests of type “multipart/form-data” are supported. The descriptor file is expected to be UDL compliant.