REST Resources
/api/space/schema-service/install-schemas
The following operations are supported on this resource:
POST /install-schemas | Version 1 |
Download and install a DMI schema from a previously configured SVN server.
In order to install the schema from the SVN repository, you must first configure a connection to the SVN Repository using the Space UI. This is described on the following URL page:
When specifying fields in this API request, please note:
- device-family and release are required fields.
- No other fields should be used with this request, since the Space Server will be able to automatically find the schema in the configured SVN Repository.
- Multiple schemas can be specified with a single request, but they must all come from the SVN Repository. Mixing schema locations from SVN and Server Disk is not supported.
Sample Usage
This API makes an asynchronous method call; so, you can optionally specify queue and schedule parameters:
POST /install-schemas?queue=<queue>&schedule=<schedule>
Note: The queue URL denoted by <queue> must have been created already.
- Parameters:
Name Type URI Type Description Required queue Queue URL Query A fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage) N schedule cron-like-expression Query Schedule this API in the future, by specifying a cron-like-expression (See Job Scheduling) N
- Content-Type Headers:
application/vnd.net.juniper.space.schema-service.install-schemas-svn-request+xml;version=1;charset=UTF-8
application/vnd.net.juniper.space.schema-service.install-schemas-svn-request+json;version=1;charset=UTF-8 - Accept Headers:
application/vnd.net.juniper.space.job-management.task+xml;version=1
application/vnd.net.juniper.space.job-management.task+json;version=1
<install-schemas-request>
<schemas>
<schema>
<device-family>junos</device-family>
<release>11.4R2.20</release>
</schema>
</schemas>
</install-schemas-request>
<task href="/api/space/job-management/jobs/2523149">
<id>2523149</id>
</task>
{
"install-schemas-request" : {
"schemas" : {
"schema" : [
{
"device-family" : "junos" ,
"release" : "11.4R2.20"
}
]
}
}
}
{
"task": {
"@href" : "/api/space/job-management/jobs/2523149",
"id" : 2523149
}
}
Access Control
The following capabilities are required to access this API: GetLatestSchema
POST /install-schemas | Version 1 |
Install a previously uploaded DMI schema (.tgz) file on the Space server.
Please Note:
- Before installing a schema from using a tgz file, the client must first upload the tgz file to the Space Server using the /api/space/schema-service/upload-tgz-schema-file API.
- device-family and release are required fields.
Please refer to Supported Device Families for a list of supported
device families.
First select the device-family, which will show a page containing the list of releases which are supported for that device-family.
At the time of this publication, the following device families where supported:
bxos, ive-ic, ive-sa, junos, junos-es, junos-ex, junos-mag, junos-qf, junos-qfx, mssos, tcaos, vse-mcg.
- When installing schema from a local tgz file, value of schema-location element is necessary and should be the full path name of the directory containing the tgz file on the Space server. The value of the schema-location element must be the same as what was returned by the /api/space/schema-service/upload-tgz-schema-file API.
- Multiple schemas can be specified with a single request, but they must all come from the SVN Repository. Mixing schema locations from the SVN and the server disk is not supported.
Sample Usage
This API makes an asynchronous method call; so, you can optionally specify queue and schedule parameters:
POST /install-schemas?queue=<queue>&schedule=<schedule>
Note: The queue URL denoted by <queue> must have been created already.
- Parameters:
Name Type URI Type Description Required queue Queue URL Query A fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage) N schedule cron-like-expression Query Schedule this API in the future, by specifying a cron-like-expression (See Job Scheduling) N
- Content-Type Headers:
application/vnd.net.juniper.space.schema-service.install-schemas-tgz-request+xml;version=1;charset=UTF-8
application/vnd.net.juniper.space.schema-service.install-schemas-tgz-request+json;version=1;charset=UTF-8 - Accept Headers:
application/vnd.net.juniper.space.job-management.task+xml;version=1
application/vnd.net.juniper.space.job-management.task+json;version=1
<install-schemas-request>
<schemas>
<schema>
<schema-location>/tmp/cmp.SchemaManager_1492700917176</schema-location>
<device-family>junos</device-family>
<release>11.4R2.20</release>
</schema>
</schemas>
</install-schemas-request>
<task href="/api/space/job-management/jobs/2523150">
<id>2523150</id>
</task>
{
"install-schemas-request" : {
"schemas" : {
"schema" : {
"schema-location" : "/tmp/cmp.SchemaManager_1492700917176"
,
"device-family" : "junos" ,
"release" : "11.4R2.20"
}
}
}
}
{
"task": {
"@href" : "/api/space/job-management/jobs/2523150",
"id" : 2523150
}
}
Access Control
The following capabilities are required to access this API: GetLatestSchema