Creating a Dependency Between Services
Function
This API is used to create a dependency between services. For consumer, version must be a confirmed version and serviceName cannot be *. consumer must be an existing service while provider can be a service that has not been created.
URI
PUT /v4/{project_id}/registry/dependencies
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Fixed value: default. |
Request
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
dependencies |
Array of objects |
Yes |
Set of rules. See Table 3. The array can contain 1–100 objects. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
consumer |
Object |
Yes |
Consumer microservice. For details, see DependencyMicroService. |
providers |
Array of objects |
No |
Provider microservice. For details, see DependencyMicroService. |
Response
Response parameters
None
Example
Example request
{ "dependencies": [ { "consumer": { "environment": "string", "appId": "string", "serviceName": "string", "version": "string" }, "providers": [ { "environment": "string", "appId": "string", "serviceName": "string", "version": "string" } ] } ] }
Example response
None
Status Code
See Status Codes.
Error Code
See CSE Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot