Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-api
Commits
89e9e7f5
Commit
89e9e7f5
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Update spec.
parent
709bf63b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/rest/swagger/swagger.yaml
+11
-8
11 additions, 8 deletions
src/rest/swagger/swagger.yaml
src/rest/test/test_internal_controller.py
+3
-3
3 additions, 3 deletions
src/rest/test/test_internal_controller.py
src/rest/test/test_public_controller.py
+2
-2
2 additions, 2 deletions
src/rest/test/test_public_controller.py
with
16 additions
and
13 deletions
src/rest/swagger/swagger.yaml
+
11
−
8
View file @
89e9e7f5
openapi
:
3.0.0
info
:
title
:
AURA Engine API
description
:
This is the AURA Engine API.
Read more at https://gitlab.servus.at/aura/engine.
description
:
This is the AURA Engine API.
contact
:
email
:
david.trattnig@subsquare.at
license
:
name
:
AGPL
3.0
url
:
https://www.gnu.org/licenses/agpl-3.0.en.html
version
:
1.0.0
externalDocs
:
description
:
Find more info here
url
:
https://gitlab.servus.at/aura/engine-api
servers
:
-
url
:
'
{protocol}://{api-host}:{port}/api/{version}'
description
:
Engine API
...
...
@@ -74,7 +77,7 @@ paths:
"
400"
:
description
:
bad input parameter
x-openapi-router-controller
:
src.rest.controllers.public_controller
/trackservice/{track
I
d}
:
/trackservice/{track
_i
d}
:
get
:
tags
:
-
public
...
...
@@ -83,7 +86,7 @@ paths:
Retrieves a single track by its ID.
operationId
:
get_track
parameters
:
-
name
:
track
I
d
-
name
:
track
_i
d
in
:
path
description
:
ID of the track-service entry
required
:
true
...
...
@@ -203,7 +206,7 @@ paths:
"
400"
:
description
:
bad input parameter
x-openapi-router-controller
:
src.rest.controllers.internal_controller
/engine/{engine
N
umber}/health
:
/engine/{engine
_n
umber}/health
:
get
:
tags
:
-
internal
...
...
@@ -212,7 +215,7 @@ paths:
Retrieves the most recent health info of the requested engine
operationId
:
get_engine_health
parameters
:
-
name
:
engine
N
umber
-
name
:
engine
_n
umber
in
:
path
description
:
Number of the engine
required
:
true
...
...
@@ -240,7 +243,7 @@ paths:
Logs another health entry for the given engine
operationId
:
log_engine_health
parameters
:
-
name
:
engine
N
umber
-
name
:
engine
_n
umber
in
:
path
description
:
Number of the engine
required
:
true
...
...
@@ -256,7 +259,7 @@ paths:
"
400"
:
description
:
bad input parameter
x-openapi-router-controller
:
src.rest.controllers.internal_controller
/engine/{engine
N
umber}/activate
:
/engine/{engine
_n
umber}/activate
:
put
:
tags
:
-
internal
...
...
@@ -265,7 +268,7 @@ paths:
Activates one engine and deactivates the other
operationId
:
activate_engine
parameters
:
-
name
:
engine
N
umber
-
name
:
engine
_n
umber
in
:
path
description
:
Number of the engine
required
:
true
...
...
This diff is collapsed.
Click to expand it.
src/rest/test/test_internal_controller.py
+
3
−
3
View file @
89e9e7f5
...
...
@@ -20,7 +20,7 @@ class TestInternalController(BaseTestCase):
Set active engine
"""
response
=
self
.
client
.
open
(
'
/api/v1/engine/{engine
N
umber}/activate
'
.
format
(
engine_number
=
2
),
'
/api/v1/engine/{engine
_n
umber}/activate
'
.
format
(
engine_number
=
2
),
method
=
'
PUT
'
)
self
.
assert200
(
response
,
'
Response body is :
'
+
response
.
data
.
decode
(
'
utf-8
'
))
...
...
@@ -42,7 +42,7 @@ class TestInternalController(BaseTestCase):
Get most recent health info
"""
response
=
self
.
client
.
open
(
'
/api/v1/engine/{engine
N
umber}/health
'
.
format
(
engine_number
=
2
),
'
/api/v1/engine/{engine
_n
umber}/health
'
.
format
(
engine_number
=
2
),
method
=
'
GET
'
)
self
.
assert200
(
response
,
'
Response body is :
'
+
response
.
data
.
decode
(
'
utf-8
'
))
...
...
@@ -64,7 +64,7 @@ class TestInternalController(BaseTestCase):
Log health info
"""
response
=
self
.
client
.
open
(
'
/api/v1/engine/{engine
N
umber}/health
'
.
format
(
engine_number
=
2
),
'
/api/v1/engine/{engine
_n
umber}/health
'
.
format
(
engine_number
=
2
),
method
=
'
POST
'
)
self
.
assert200
(
response
,
'
Response body is :
'
+
response
.
data
.
decode
(
'
utf-8
'
))
...
...
This diff is collapsed.
Click to expand it.
src/rest/test/test_public_controller.py
+
2
−
2
View file @
89e9e7f5
...
...
@@ -41,7 +41,7 @@ class TestPublicController(BaseTestCase):
Get a single track by ID
"""
response
=
self
.
client
.
open
(
'
/api/v1/trackservice/{track
I
d}
'
.
format
(
track_id
=
56
),
'
/api/v1/trackservice/{track
_i
d}
'
.
format
(
track_id
=
56
),
method
=
'
GET
'
)
self
.
assert200
(
response
,
'
Response body is :
'
+
response
.
data
.
decode
(
'
utf-8
'
))
...
...
@@ -66,7 +66,7 @@ class TestPublicController(BaseTestCase):
Get next playlist
"""
response
=
self
.
client
.
open
(
'
api/v1/playlist/next
'
,
'
/
api/v1/playlist/next
'
,
method
=
'
GET
'
)
self
.
assert200
(
response
,
'
Response body is :
'
+
response
.
data
.
decode
(
'
utf-8
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment