Table 5.13. Upload a metadata object
Method | URI | Content-Type | Description |
---|---|---|---|
POST | /admin/<object_type>/<path> | multipart/form-data | Submits a new metadata file of a given type. Attribute "file" that points to the uploading file should be in request.FILES section |
POST | /admin/<object_type>/<path>?filename=test.yaml | application/octet-stream | Submits a new metadata file of a given type. Filename parameter is required |
Table 5.14. Parameters
Parameter | Description | Required |
---|---|---|
object_type | identifies the type of the new metadata object. May be one of the following: workflow, scripts, ui, agent, heat, manifests | true |
path | May define a directory (which is present under the root directory of the appropriate type of metadata). If specified, the file will be placed into that dir. If omitted, the file will be placed into the root directory of the given metadata type. This parameter may not be defined for files of type “manifests” | false |
Table 5.15. Error Response Codes
Code | Description |
---|---|
401 | User is not authorized to access this tenant resources |
404 | The object_type is unknown or the path is set to an non-existing directory |
400 | The is no parameter 'file' in request.FILES(for multipart/form-data Content type) or there is no filename parameter in URL(for application/octet-stream) |
Payload
File will be stored on Metadata Repository Server in a directory corresponds to given object type or in it's nested directory
Returns
In case of successful result this call returns a json:
{"result": "success"}