Use this object to manage catalogs on a VDC.
|
Method |
Description |
|
Retrieve list of global catalogs |
|
|
Retrieve information for a local application or a global catalog |
|
|
Create a new global catalog |
|
|
Destroy a global or application catalog |
|
|
Rename a global catalog |
|
|
Migrate a catalog from a remote grid |
|
|
Export catalog |
|
|
Import catalog |
|
|
Retrieve catalog package descriptor |
|
|
Replace catalog package descriptor |
|
|
Retrieve global catalog ACL |
|
|
Replace entire catalog ACL |
|
|
Replace portion of catalog ACL |
Retrieve list of global catalog
/api/v2/cat/list?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Retrieve a list of the catalogs.
GET http://192.168.123.200/api/v2/cat/list?vdc=mygrid
<catalogs>
<catalog>
<description></description>
<name>system_ms</name>
</catalog>
<catalog>
<description></description>
<name>system</name>
</catalog>
<catalog>
<description></description>
<name>dynamic</name>
</catalog>
<catalog>
<description></description>
<name>user</name>
</catalog>
<catalog>
<description></description>
<name>OUT_6492</name>
</catalog>
<catalog>
<description></description>
<name>filer</name>
</catalog>
</catalogs>
{
"catalog" : [
{
"name" : "system_ms",
"description" : ""
},
{
"name" : "system",
"description" : ""
},
{
"name" : "dynamic",
"description" : ""
},
{
"name" : "user",
"description" : ""
},
{
"name" : "OUT_6492",
"description" : ""
},
{
"name" : "filer",
"description" : ""
}
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Retrieve information for a local application or a global catalog
/api/v2/cat/info?cat=catalog&vdc=controller-name
Name of the catalog
Name of the target virtual data center
synchronous
GET
Retrieve information for catalog test.
GET http://192.168.123.200/api/v2/cat/info?cat=/test&vdc=mygrid
<catalog> <name>test</name> <description></description> <total_classes>0</total_classes> <total_diskspace>0</total_diskspace> </catalog>
{
"total_classes" : "0",
"name" : "test",
"description" : "",
"total_diskspace" : "0"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat). - Argument cat=catalog missing in the request.
'test' is not a valid catalog - Invalid catalog specified in the request.
Create a new global catalog
/api/v2/cat/create?cat=catalog&vdc=controller-name
Name of the new catalog
Name of the target virtual data center
synchronous
GET
Create a catalog named /test.
GET http://192.168.123.200/api/v2/cat/create?cat=/test&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat). - Argument cat=catalog missing in the request.
'test' is not a valid catalog. - Invalid catalog specified in the request. Only global catalogs can be created.
Destroy a global or application catalog
/api/v2/cat/destroy?cat=catalog&vdc=controller-name
Name of the catalog to be destroyed
Name of the target virtual data center
asynchronous
GET
Destroy a catalog named /test.
GET http://192.168.123.200/api/v2/cat/destroy?cat=/test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat). - Argument cat=catalog missing in the request.
Notes: To get the status of job, issue a /api/v2/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.
Rename global catalog
/api/v2/cat/rename?cat=catalog&new_name=new-catalog&vdc=controller-name
Name of the catalog to be renamed
New name of the catalog
Name of the target virtual data center
synchronous
GET
Rename /test catalog to /test2.
GET http://192.168.123.200/api/v2/cat/rename?cat=/test&new_name=/test2&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat). - Argument cat=catalog missing in the request.
Missing required arguments (new_name). - Argument new_name=new-catalog missing in the request.
Catalog 'test' doesn't exist. - Invalid catalog specified in the request.
'test' is not a valid catalog. - Invalid new_name specified in the catalog.
Migrate a catalog from a remote grid
/api/v2/cat/migrate?cat=catalog&grid=remote-grid&vdc=controller-name
Name of the catalog to migrate
IP or FQDN of the remote grid
Name of the target virtual data center
asynchronous
GET
Migrate the test catalog from remote-grid.mygrid.net.
GET http://192.168.123.200/api/v2/cat/migrate?cat=test&grid=remote-grid.mygrid.net&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat). - Argument cat=catalog missing in the request.
Missing required arguments (grid). - Argument grid=remote-grid missing in the request.
Note: To get the status of job, issue a /api/v2/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 a catalog
/api/v2/cat/export?cat=catalog&dir=directory&vdc=controller-name
Name of the catalog
Name of exchange directory relative to /vol/_impex where catalog is to be exported to
Name of the target virtual data center
asynchronous
GET
Export /test.
GET http://192.168.123.200/api/v2/cat/export?cat=/test&dir=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Missing required arguments (cat,dir) - Argument cat=cat and dir=dir missing
Missing required arguments (cat) - Argument cat=cat missing
Missing required argument (dir) - Argument dir=dir missing
Note: To get the status of job, issue a /api/v2/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 a catalog
/api/v2/cat/import?cat=catalog&dir=directory&vdc=controller-name
Name of the catalog
Name of exchange directory relative to /vol/_impex where catalog is to be imported from
Name of the target virtual data center
asynchronous
GET
Import /test.
GET http://192.168.123.200/api/v2/cat/import?cat=/test&dir=test&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat,dir) - Argument cat=cat and dir=dir missing
Missing required arguments (cat) - Argument cat=cat missing
Missing required argument (dir) - Argument dir=dir missing
Note: To get the status of job, issue a /api/v2/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.
Retrieve catalog package descriptor
/api/v2/cat/get_desc?cat=catalog&vdc=controller-name
Name of the catalog
Name of the target virtual data center
synchronous
GET
Retrieve package descriptor for /system.
GET http://192.168.123.200/api/v2/cat/get_desc?cat=/system&vdc=mygrid
<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 = "tcp_in:3306"
protocol http : filter = "tcp_in:80"
protocol https : filter = "tcp_in:443"
protocol smtp : filter = "tcp_in:25"
protocol pgsql : filter = "tcp_in:5432"
protocol pop3 : filter = "tcp_in:110"
protocol nfs : filter = "rpc:nfs"
protocol syslog : filter = "udp:514"
protocol ssh : filter = "tcp_in:22"
protocol cce : filter = "grb:90;ccs:91"
protocol cifs : filter = "tcp_in:445;udp:445"
}
</message>
{
"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"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat) - Argument cat=cat missing
Request processing failed - Global catalog 'test' not found - Invalid catalog specified
Replace catalog package descriptor
/api/v2/cat/put_desc?vdc=controller-name -F cat=catname -F desc=@descriptor-file
Name of the catalog
Name of the descriptor file
Name of the target virtual data center
synchronous
POST: multipart/form-data
Replace descriptor for /test
POST http://192.168.123.200/api/v2/cat/put_desc?vdc=mygrid -F cat=cat -F desc=@desc.txt
<message></message>
{
"message" : ""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
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.
Retrieve the global catalog ACL, or display that portion of the global catalog ACL which relates to a particular principal.
/api/v2/cat/get_acl?cat=catalog&principal=<principal>&vdc=controller-name
Name of the catalog
A URL-encoded principal
Name of the target virtual data center
synchronous
GET
Example: URL-encoded principal
A URL-encoded principal. E.g. local:user:api@3tera.com should be passed as local%3Auser%3Aapi%403tera.com.
GET http://192.168.123.200/api/v2/cat/get_acl?cat=/test&principal=&vdc=mygrid
{
"acl" : {
"owner" : {
"id" : ""
},
"entries" : [
{
"configure" : 1,
"id" : "778fee4e-9b83-4160-8b79-8bb0e1a87af8"
}
]
}
}
<acl>
<entries>
<entry>
<configure>1</configure>
<id>778fee4e-9b83-4160-8b79-8bb0e1a87af8</id>
</entry>
</entries>
<owner>
<id></id>
</owner>
</acl>
Example: Display ACL data for principal
Display the ACL data for principal local:user:api@3tera.com for catalog test
GET http://192.168.123.200/api/v2/cat/get_acl?cat=/test&principal=local%3Auser%3Aapi%403tera.com&vdc=mygrid
{
"acl" : {
"entries" : [
{
"configure" : 1,
"id" : "778fee4e-9b83-4160-8b79-8bb0e1a87af8"
}
]
}
}
<acl> <entries> <entry> <configure>1</configure> <id>778fee4e-9b83-4160-8b79-8bb0e1a87af8</id> </entry> </entries> </acl>
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat)
- Argument cat=cat missing
Missing required arguments (principal)
- Argument principal=principal missing
Entity not found - Catalog test does not exist.
- A catalog was specified that does not exist on mygrid.
Entity not found - Failed to retrieve application ACL - ACL does not contain principal local user 'test@3tera.com'.
- An invalid principal was specified
Note: This API is available with WS_API_r6-1.0.6-1 and above.
Replace the entire catalog ACL.
/api/v2/cat/put_acl?cat=catlog&owner=<owner>&acl=<ACLs>&vdc=controller-name
Name of the catalog
A URL-encoded owner attribute of the grid ACL to the specified principal
URL-encoded list of principals separated with a slash (/)
synchronous
GET
Replace the entire ACL for catalog test with an owner api@3tera.com
GET http://192.168.123.200/api/v2/cat/put_acl?cat=/test&owner=local%3Auser%3Aapi%403tera.com&acl=&vdc=mygrid
Replace the entire ACL for catalog test with an owner api@3tera.com and principal local:user:api@3tera.com=full
GET http://192.168.123.200/api/v2/cat/put_acl?cat=/test&owner=local%3Auser%3Aapi%403tera.com&acl= local%3Auser%3Aapi%403tera.com%3Dfull&vdc=mygrid
Replace the entire ACL for catalog test with an owner api@3tera.com and principal local:user:api@3tera.com=full/local:user:test@3tera.com=configure.
GET http://192.168.123.200/api/v2/cat/put_acl?cat=/test&owner=local%3Auser%3Aapi%403tera.com&acl=local%3Auser%3Aapi%403tera.com%3Dfull%2Flocal%3Auser%3Atest%403tera.com%3Dconfigure&vdc=mygrid
{
"message" : ""
}
<message></message>
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat)
- Argument cat=cat missing
Missing required arguments (owner)
- Argument owner=owner
Missing required arguments (acl)
- Argument acl=acl missing
Entity not found - Catalog test does not exist.
- A catalog was specified that does not exist on mygrid.
Entity not found - Failed to put catalog ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.
- An invalid owner or acl was specified
Note: This API is available with WS_API_r6-1.0.6-1 and above.
Replace that portion of the catalog ACL which relates to the owner or a principal.
/api/v2/cat/modify_acl?cat=catalog&acl=<ACLs>&vdc=controller-name
Name of the catalog
URL-encoded list of principals separated with a slash (/)
synchronous
GET
Modify the ACL for catalog test by replacing the owner with api@3tera.com
GET http://192.168.123.200/api/v2/cat/modify_acl?cat=/test&acl=local%3Auser%3Aapi%403tera.com%3Downer&vdc=mygrid
Modify the ACL for application test by replacing the owner api@3tera.com and principal local:user:api@3tera.com=full
GET http://192.168.123.200/api/v2/cat/modify_acl?cat=/test&acl=local%3Auser%3Aapi%403tera.com%3Downer%2Flocal%3Auser%3Aapi%403tera.com%3Dfull&vdc=mygrid
Modify the ACL for application by replacing the access levels for test@3tera.com and api@3tera.com and principal local:user:api@3tera.com=configure/local:user:test@3tera.com=read.
GET http://192.168.123.200/api/v2/cat/modify_acl?cat=/test&acl=local%3Auser%3Aapi%403tera.com%3Dconfigure%2Flocal%3Auser%3Atest%403tera.com%3Dread&vdc=mygrid
{
"message" : ""
}
<message></message>
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (cat)
- Argument cat=cat missing
Missing required arguments (acl)
- Argument acl=acl missing
Entity not found - Catalog test does not exist.
- A catalog was specified that does not exist on mygrid.
Entity not found - Failed to put catalog ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.
- An invalid owner or acl was specified
Note: This API is available with WS_API_r6-1.0.6-1 and above.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|