-
Notifications
You must be signed in to change notification settings - Fork 4
/
openapi.yaml
107 lines (102 loc) · 2.81 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
openapi: 3.0.1
info:
title: IP Camera Control API
description: API to access and control an IP camera, allowing users to view the camera feed, move the camera in various directions, and get information about the camera.
version: 1.0.0
servers:
- url: "http://localhost:3333"
paths:
/capture:
get:
operationId: captureFrame
summary: Capture a single frame from the IP camera
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CapturedImage'
"400":
description: Cannot capture frame from the camera
/image/{image_name}:
get:
operationId: serveImage
summary: Retrieve the saved image from the server
parameters:
- in: path
name: image_name
required: true
schema:
type: string
description: The file name of the captured image.
responses:
"200":
description: OK
content:
image/jpeg:
schema:
type: string
format: binary
"404":
description: Image not found
/info:
get:
operationId: getCameraInfo
summary: Get IP camera information
responses:
"200":
description: OK
content:
text/xml:
schema:
$ref: '#/components/schemas/CameraInfo'
"400":
description: All authentication failed for the device
/stream:
get:
operationId: streamVideo
summary: Stream live video from the IP camera
responses:
"200":
description: OK
content:
multipart/x-mixed-replace:
schema:
$ref: '#/components/schemas/VideoStream'
/move/{direction}:
get:
operationId: moveCamera
summary: Move the IP camera in a specified direction
parameters:
- in: path
name: direction
required: true
schema:
type: string
enum:
- up
- down
- left
- right
description: The direction to move the camera (up, down, left, or right).
responses:
"200":
description: Success
"400":
description: Cannot move camera or invalid direction specified
components:
schemas:
CapturedImage:
type: object
properties:
imageUrl:
type: string
description: The URL of the captured image.
CameraInfo:
type: string
description: XML-formatted information about the IP camera.
VideoStream:
type: string
format: binary
description: A live video stream from the IP camera in multipart/x-mixed-replace format.