REST Resources
/api/space/schema-service/upload-tgz-schema-file
The following operation is supported on this resource:
- POST - Upload .tgz schema file to the Junos Space server
POST /upload-tgz-schema-file | Version 1 |
This API uploads a tgz schema file to the Junos Space server to be, subsequently, used for schema installation. The schema file is passed to the REST API as a multipart/form-data binary and the API returns the schema-location on the server where the file was copied to, along with the device-family and JunOS release. This schema location must then be passed to the /api/space/schema-service/install-schemas API, in order to install the schema on Space.
Sample Usage
POST /upload-tgz-schema-file
- Content-Type Headers:
multipart/form-data - Accept Headers:
application/vnd.net.juniper.space.schema-service.schemas+xml;version=1
application/vnd.net.juniper.space.schema-service.schemas+json;version=1
<schemas total="1" uri="/api/space/schema-service/upload-tgz-schema-file">
<schema>
<device-family>junos</device-family>
<schema-location>/tmp/cmp.SchemaManager_1492700917176</schema-location>
<release>11.4R2.19</release>
</schema>
</schemas>
{
"schemas" : {
"@total" : "1" ,
"@uri" : "/api/space/schema-service/upload-tgz-schema-file" ,
"schema" : [
{
"device-family" : "junos" ,
"schema-location" : "/tmp/cmp.SchemaManager_1492700917176"
,
"release" : "11.4R2.19"
}
]
}
}
Access Control
The following capabilities are required to access this API: GetLatestSchema