This repository has been archived by the owner on Oct 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
swagger_Service_Mgmnt.yml
147 lines (145 loc) · 4.24 KB
/
swagger_Service_Mgmnt.yml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
swagger: "2.0"
info:
version: "1.2"
title: "Service Management SLR API"
host: "example.service_mgmnt.example"
basePath: "/api/1.2/slr"
paths:
/code:
get:
tags:
- "Operator"
- "Service Management"
description: "Generates, store and returns unique code for the SLR flow"
parameters: []
responses:
200:
description: "Returns the code used in next steps of SLR flow. This is required\
\ on most endpoints that follow."
schema:
$ref: "#/definitions/CodeResponse"
500:
description: "Internal server error. The actual status code and content of the error message may vary depending on error occurred."
schema:
$ref: "#/definitions/errors"
/auth:
post:
tags:
- "Service Management"
- "Service"
description: "Service calls this after user has authenticated. Causes Service\
\ Management to generate surrogate_id for the operator. This endpoint starts a long chain of events."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "code and user_id."
required: true
schema:
$ref: "#/definitions/LoginParams"
responses:
200:
description: "Returns 200 OK so Service Mngmt knows SLR was verified\
\ successfully"
500:
description: "Internal server error. The actual status code and content of the error message may vary depending on error occurred."
schema:
$ref: "#/definitions/errors"
/login:
post:
tags:
- "Operator"
- "Service Management"
description: "Login redirector, this part checks the code validy before sending\
\ the request to Service so it can authenticate the user."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Contains code and user_id"
required: true
schema:
$ref: "#/definitions/LoginParams"
responses:
200:
description: "Returns 200 OK"
500:
description: "Internal server error. The actual status code and content of the error message may vary depending on error occurred."
schema:
$ref: "#/definitions/errors"
/slr:
post:
tags:
- "Service Management"
- "Operator"
description: "Takes SLR signed by account owner at Operator, signs it with own key and sends\
\ to Operator for verification."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "code and user_id, here user_id is mandatory."
required: true
schema:
$ref: "#/definitions/SlrParams"
responses:
200:
description: "Returns 200 OK"
500:
description: "Internal server error. The actual status code and content of the error message may vary depending on error occurred."
schema:
$ref: "#/definitions/errors"
definitions:
errors:
type: object
properties:
status:
type: string
description: HTTP status code as string value.
code:
type: integer
description: HTTP status code
title:
type: string
description: Title of error message.
detail:
type: string
description: Detailed error message.
source:
type: string
description: Source URI
LoginParams:
type: "object"
properties:
code:
type: "string"
description: "string containing code"
user_id:
type: "string"
description: "string containing user_id."
SlrParams:
type: "object"
properties:
data:
type: object
properties:
code:
type: string
description: string containing code
slr:
type: object
description: "See: https://github.com/HIIT/mydata-stack/blob/master/mydata-linking.pdf"
CodeResponse:
properties:
code:
type: "string"