@@ -92,6 +92,12 @@ paths:
9292 on the server.
9393 operationId : matchingInstance
9494 parameters :
95+ - in : query
96+ name : Id
97+ description : Id of the instance that is requesting a dependency
98+ required : true
99+ type : integer
100+ format : int64
95101 - name : ComponentType
96102 in : query
97103 description : Type of the instance to be retrieved
@@ -110,6 +116,31 @@ paths:
110116 $ref : ' #/definitions/Instance'
111117 ' 400 ' :
112118 description : Invalid status value
119+ /instance :
120+ get :
121+ tags :
122+ - Basic Operations
123+ summary : Get the instance with the specified id
124+ description : >-
125+ This command retrieves the instance with the specified id from the server.
126+ If that id is not present, 404 will be returned.
127+ operationId : instance
128+ parameters :
129+ - in : query
130+ name : Id
131+ description : Id of the instance
132+ required : true
133+ type : integer
134+ format : int64
135+ responses :
136+ ' 200 ' :
137+ description : The instance that was requested
138+ schema :
139+ $ref : ' #/definitions/Instance'
140+ ' 404 ' :
141+ description : The id was not found on the server
142+ ' 500 ' :
143+ description : Internal server error
113144 /instances :
114145 get :
115146 tags :
@@ -185,7 +216,13 @@ paths:
185216 operationId : matchInstance
186217 parameters :
187218 - in : query
188- name : Id
219+ name : CallerId
220+ description : The ID of the instance that is calling this endpoint
221+ required : true
222+ type : integer
223+ format : int64
224+ - in : query
225+ name : MatchedInstanceId
189226 description : The ID of the instance that the sender was matched to.
190227 required : true
191228 type : integer
@@ -208,7 +245,8 @@ paths:
208245 - Basic Operations
209246 summary : Gets the list of events associated to the specified instance
210247 description : >-
211- This command retrieves a list of events that are associated to the instance with the specified id.
248+ This command retrieves a list of events that are associated to the
249+ instance with the specified id.
212250 operationId : eventList
213251 parameters :
214252 - name : Id
@@ -226,6 +264,98 @@ paths:
226264 $ref : ' #/definitions/Event'
227265 ' 404 ' :
228266 description : Instance not found
267+ /linksFrom :
268+ get :
269+ tags :
270+ - Basic Operations
271+ summary : Retrieves outgoing links from an instance
272+ description : >-
273+ This command retreives a list of outgoing links from the instance with
274+ the specified id.
275+ operationId : linksFrom
276+ parameters :
277+ - name : Id
278+ in : query
279+ description : Id of the instance
280+ required : true
281+ type : integer
282+ format : int64
283+ responses :
284+ ' 200 ' :
285+ description : List of InstanceLinks from the specified instance
286+ schema :
287+ type : array
288+ items :
289+ $ref : ' #/definitions/InstanceLink'
290+ ' 404 ' :
291+ description : Instance not found
292+ /linksTo :
293+ get :
294+ tags :
295+ - Basic Operations
296+ summary : Retrieves incoming links to an instance
297+ description : >-
298+ This command retreives a list of incoming links from the instance with
299+ the specified id.
300+ operationId : linksTo
301+ parameters :
302+ - name : Id
303+ in : query
304+ description : Id of the instance
305+ required : true
306+ type : integer
307+ format : int64
308+ responses :
309+ ' 200 ' :
310+ description : List of InstanceLinks to the specified instance
311+ schema :
312+ type : array
313+ items :
314+ $ref : ' #/definitions/InstanceLink'
315+ ' 404 ' :
316+ description : Instance not found
317+ /network :
318+ get :
319+ tags :
320+ - Basic Operations
321+ summary : Retrieves the current instance network
322+ description : >-
323+ Retrieves the instance network, meaning a list of all instances as well
324+ as a list of all links currently registered at the registry.
325+ operationId : network
326+ responses :
327+ ' 200 ' :
328+ description : The instance network
329+ schema :
330+ $ref : ' #/definitions/InstanceNetwork'
331+ /addLabel :
332+ post :
333+ tags :
334+ - Basic Operations
335+ summary : Add a label to the instance with the specified id
336+ description : >-
337+ This command will add the specified label to the instance with the
338+ specified id.
339+ operationId : addLabel
340+ parameters :
341+ - name : Id
342+ in : query
343+ description : Id of the instance
344+ required : true
345+ type : integer
346+ format : int64
347+ - name : Label
348+ in : query
349+ description : The label to add to the instance
350+ required : true
351+ type : string
352+ responses :
353+ ' 200 ' :
354+ description : Label successfully added
355+ ' 400 ' :
356+ description : ' Bad request, your label exceeded the character limit'
357+ ' 404 ' :
358+ description : ' Not found, the id you specified could not be found'
229359 /deploy :
230360 post :
231361 tags :
@@ -417,9 +547,11 @@ paths:
417547 - Docker Operations
418548 summary : Stops the specified instances' docker container
419549 description : >-
420- This command stops the docker container of the instance with the
421- specified ID. The instance will be properly shut down by calling its
422- /stop command first. Will change the instance state to 'Stopped'.
550+ This command stops the specified instance. If the instance is running
551+ inside a docker container, the container will be stopped. If not, the
552+ instance will be gracefully shut down by calling its /stop endpoint.
553+ Will change the instance state to 'Stopped' for docker containers, will
554+ remove the instance for non-docker instances.
423555 operationId : stop
424556 parameters :
425557 - in : query
@@ -432,9 +564,7 @@ paths:
432564 ' 202 ' :
433565 description : ' Accepted, the operation will be completed in the future.'
434566 ' 400 ' :
435- description : >-
436- Bad request, the instance with the specified ID is either already
437- stopped or not deployed as a docker container at all.
567+ description : ' Bad request, the instance with the specified ID is already stopped.'
438568 ' 404 ' :
439569 description : ID not found on server
440570 ' 500 ' :
@@ -495,7 +625,80 @@ paths:
495625 description : ID not found on server
496626 ' 500 ' :
497627 description : Internal server error
628+ /assignInstance :
629+ post :
630+ tags :
631+ - Docker Operations
632+ summary : Assignes a new dependency to the specified instance
633+ description : >-
634+ This command assignes a new dependency to the instance with the
635+ specified id. Internally, this will stop the instance, assign the new
636+ dependency and start the instance again. This is why this is only
637+ applicable to docker instances.
638+ operationId : assignInstance
639+ parameters :
640+ - in : query
641+ name : Id
642+ description : The ID of the instance whichs dependency should be updated
643+ required : true
644+ type : integer
645+ format : int64
646+ - in : query
647+ name : assignedInstanceId
648+ description : The ID of the instance that should be assigned as dependency
649+ required : true
650+ type : integer
651+ format : int64
652+ responses :
653+ ' 202 ' :
654+ description : ' Accepted, the operation will be completed in the future.'
655+ ' 400 ' :
656+ description : >-
657+ Bad request, the instance with the specified ID is no running inside
658+ a docker container or the assigned instance is of the wrong
659+ component type.
660+ ' 404 ' :
661+ description : One of the ids was not found on the server
662+ ' 500 ' :
663+ description : Internal server error
498664definitions :
665+ InstanceNetwork :
666+ type : object
667+ required :
668+ - instances
669+ - links
670+ properties :
671+ instances :
672+ type : array
673+ items :
674+ $ref : ' #/definitions/Instance'
675+ links :
676+ type : array
677+ items :
678+ $ref : ' #/definitions/InstanceLink'
679+ InstanceLink :
680+ type : object
681+ required :
682+ - idFrom
683+ - idTo
684+ - linkState
685+ properties :
686+ idFrom :
687+ type : integer
688+ format : int64
689+ example : 0
690+ idTo :
691+ type : integer
692+ format : int64
693+ example : 42
694+ linkState :
695+ type : string
696+ description : Valid states for an InstanceLink
697+ example : Assigned
698+ enum :
699+ - Assigned
700+ - Outdated
701+ - Failed
499702 Event :
500703 type : object
501704 required :
@@ -557,3 +760,10 @@ definitions:
557760 - Stopped
558761 - Paused
559762 - NotReachable
763+ labels :
764+ type : array
765+ items :
766+ type : string
767+ example :
768+ - private
769+ - debug
0 commit comments