/services/upload/development                                       [ POST ]

Uploads a service version of specification and code (if relevant). If the service does not exist, it will call the add/modify service.

The service identifier will be the name of the service directory that must suit the service name policy. See Developing Microservices for more details. Before uploading, you will have to create a zip file of the service directory. This file will be uploaded using these API calls. 

URL Parameters

Valid values
version No string: service version. To upload a service to the standard production version please use the version string: "default" as shown bellow.
Version must be up to 64 characters long, start with a letter and contain only the following characters: A=Za-z0-9._-

File Parameters

Valid values
service_file No full path to a local zip file containing the service directory.

Request Examples

## upload to development sandbox

curl -k -u admin:admin -X POST -F "service_file=@my_zipped_service_directory.zip" https://OPERETOHOST/services/upload/development

## upload to production

curl -k -u admin:admin -X POST -F "service_file=@my_zipped_service_directory.zip" https://OPERETOHOST/services/upload/production/default

curl -k -u admin:admin -X POST -F "service_file=@my_zipped_service_directory.zip" https://OPERETOHOST/services/upload/production/v2.0



Response Examples 

{"status": "success"}


  "status": "fail",
  "message": "Could not find service specification YAML file in the service directory."