blob: 9e710745b967fcfad322f55467c65c188dd7a0d2 [file] [log] [blame]
elinuxhenrik93f015a2020-04-08 11:23:55 +02001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. SPDX-License-Identifier: CC-BY-4.0
3.. Copyright (C) 2020 Nordix
4
5.. _simulator-api:
6
7=============
8Simulator API
9=============
10
11This document describes the API used to manage policy types and manipulate the simulator.
12
maximesson59e2b2a2021-06-02 12:45:34 +020013The simulator supports different versions of the A1 interface. Some functions are common for all versions, and some are
elinuxhenrik93f015a2020-04-08 11:23:55 +020014specific for a certain version.
15
elinuxhenrik93f015a2020-04-08 11:23:55 +020016Common Functions
17================
18
19Health Check
20------------
21
22The status of the simulator.
23
24/
25~~
26
27GET
28+++
29
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020030Returns the status of the simulator.
elinuxhenrik93f015a2020-04-08 11:23:55 +020031
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020032**URL path:**
33 /
elinuxhenrik93f015a2020-04-08 11:23:55 +020034
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020035**Parameters:**
36 None.
elinuxhenrik93f015a2020-04-08 11:23:55 +020037
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020038**Responses:**
39 200:
40 Simulator is living.
elinuxhenrik93f015a2020-04-08 11:23:55 +020041
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020042**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +020043
elinuxhenrik83a40db2020-04-23 07:47:44 +020044**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +020045
elinuxhenrik83a40db2020-04-23 07:47:44 +020046 curl -X GET "http://localhost:8085/"
elinuxhenrik93f015a2020-04-08 11:23:55 +020047
elinuxhenrik83a40db2020-04-23 07:47:44 +020048**Result**:
49
50200: ::
51
52 Simulator is living (OSC_2.1.0 responds OK)
elinuxhenrik93f015a2020-04-08 11:23:55 +020053
54Supported Interfaces
55--------------------
56
57The simulator can support different versions of the A1 interface. With this API the supported versions can be listed.
58
59/container_interfaces
60~~~~~~~~~~~~~~~~~~~~~
61
62GET
63+++
64
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020065Returns the status of the simulator. (Not available for A1 Standard 1.1.3)
elinuxhenrik93f015a2020-04-08 11:23:55 +020066
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020067**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +020068
69/container_interfaces
elinuxhenrik93f015a2020-04-08 11:23:55 +020070
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020071**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +020072
73None.
elinuxhenrik93f015a2020-04-08 11:23:55 +020074
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020075**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +020076
77200:
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020078 List of supported interfaces.
elinuxhenrik93f015a2020-04-08 11:23:55 +020079
elinuxhenrikc67ef9d2020-04-20 17:05:00 +020080**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +020081
elinuxhenrik83a40db2020-04-23 07:47:44 +020082**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +020083
elinuxhenrik83a40db2020-04-23 07:47:44 +020084 curl -X GET "http://localhost:8085/container_interfaces"
elinuxhenrik93f015a2020-04-08 11:23:55 +020085
elinuxhenrik83a40db2020-04-23 07:47:44 +020086
87**Result**:
88
89200: ::
90
91 1.1.x-alpha.2 OSC_2.1.0 STD_1.1.3
elinuxhenrik93f015a2020-04-08 11:23:55 +020092
93Counters
94--------
95
96The simulator keeps counts of different things that can be accessed.
97
98/counter
99~~~~~~~~
100
101GET
102+++
103
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200104Get a counter. Counter-name can be one of the following: 'num_instances', 'num_types' or 'interface'.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200105
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200106**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200107
108/counter/{counter-name}
elinuxhenrik93f015a2020-04-08 11:23:55 +0200109
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200110**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200111
112None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200113
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200114**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200115
116200:
117
118The counter value for the given counter.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200119
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200120**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200121
elinuxhenrik83a40db2020-04-23 07:47:44 +0200122**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200123
elinuxhenrik83a40db2020-04-23 07:47:44 +0200124 curl -X GET "http://localhost:8085/counter/num_instances"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200125
elinuxhenrik83a40db2020-04-23 07:47:44 +0200126**Result**:
127
128200: ::
129
130 10
elinuxhenrik93f015a2020-04-08 11:23:55 +0200131
132Version Specific Functions
133==========================
134
135The methods available to control the simulator depends on the version of the A1 API the simulator is simulating.
136
137OSC_2.1.0
138---------
139
elinuxhenrikb11c3532020-04-22 11:01:08 +0200140This section describes the available administrative functions for the OSC_2.1.0 version of A1.
141
142To see the A1 functions for this version, see `OSC_2.1.0 API`_.
143
144.. _OSC_2.1.0 API: https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=blob;f=near-rt-ric-simulator/api/OSC_2.1.0/openapi.yaml
elinuxhenrik93f015a2020-04-08 11:23:55 +0200145
146/deleteinstances
147~~~~~~~~~~~~~~~~
148
149POST
150++++
151
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200152Delete all policy instances.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200153
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200154**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200155
156/deleteinstances
elinuxhenrik93f015a2020-04-08 11:23:55 +0200157
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200158**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200159
160None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200161
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200162**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200163
164200:
165
166All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200167
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200168**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200169
elinuxhenrik83a40db2020-04-23 07:47:44 +0200170**Call**: ::
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200171
elinuxhenrik83a40db2020-04-23 07:47:44 +0200172 curl -X POST "http://localhost:8085/deleteinstances"
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200173
elinuxhenrik83a40db2020-04-23 07:47:44 +0200174**Result**:
175
176200: ::
177
178 All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200179
elinuxhenrik93f015a2020-04-08 11:23:55 +0200180/deleteall
181~~~~~~~~~~~~~~~~
182
183POST
184++++
185
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200186Full reset.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200187
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200188**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200189
190/deleteall
elinuxhenrik93f015a2020-04-08 11:23:55 +0200191
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200192**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200193
194None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200195
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200196**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200197
198200:
199
200All policy instances and types deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200201
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200202**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200203
elinuxhenrik83a40db2020-04-23 07:47:44 +0200204 **Call**: ::
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200205
elinuxhenrik83a40db2020-04-23 07:47:44 +0200206 curl -X POST "http://localhost:8085/deleteall"
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200207
elinuxhenrik83a40db2020-04-23 07:47:44 +0200208**Result**:
209
210200: ::
211
212 All policy instances and types deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200213
elinuxhenrik93f015a2020-04-08 11:23:55 +0200214/policytype
215~~~~~~~~~~~
216
217PUT
218+++
219
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200220Create a policy type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200221
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200222**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200223
224/policytype?id=<policy-type-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200225
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200226**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200227
228id: (*Required*)
229
230The ID of the policy type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200231
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200232**Body:** (*Required*)
elinuxhenrik83a40db2020-04-23 07:47:44 +0200233
234A JSON object containing the schema for the type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200235
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200236**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200237
238200:
239
240Policy type <policy-type-id> is OK.
241
242201:
243
244Policy type <policy-type-id> is OK.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200245
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200246**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200247
elinuxhenrik83a40db2020-04-23 07:47:44 +0200248**Call**: ::
249
250 curl -X PUT "http://localhost:8085/policytype?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0"
251 -H "Content-Type: application/json"
252 -d '{
253 "$schema": "http://json-schema.org/draft-07/schema#",
254 "title": "STD_PolicyModelUnconstrained_0.2.0",
255 "description": "Standard model of a policy with unconstrained scope id combinations",
256 "type": "object",
257 "properties": {
258 "scope": {
259 "type": "object",
260 "properties": {
261 "ueId": {"type": "string"},
262 "groupId": {"type": "string"},
263 "sliceId": {"type": "string"},
264 "qosId": {"type": "string"},
265 "cellId": {"type": "string"}
elinuxhenrik93f015a2020-04-08 11:23:55 +0200266 },
elinuxhenrik83a40db2020-04-23 07:47:44 +0200267 "minProperties": 1,
268 "additionalProperties": false
elinuxhenrik93f015a2020-04-08 11:23:55 +0200269 },
elinuxhenrik83a40db2020-04-23 07:47:44 +0200270 "qosObjectives": {
271 "type": "object",
272 "properties": {
273 "gfbr": {"type": "number"},
274 "mfbr": {"type": "number"},
275 "priorityLevel": {"type": "number"},
276 "pdb": {"type": "number"}
277 },
278 "additionalProperties": false
279 },
280 "qoeObjectives": {
281 "type": "object",
282 "properties": {
283 "qoeScore": {"type": "number"},
284 "initialBuffering": {"type": "number"},
285 "reBuffFreq": {"type": "number"},
286 "stallRatio": {"type": "number"}
287 },
288 "additionalProperties": false
289 },
290 "resources": {
291 "type": "array",
292 "items": {
293 "type": "object",
294 "properties": {
295 "cellIdList": {
296 "type": "array",
297 "minItems": 1,
298 "uniqueItems": true,
299 "items": {
300 "type": "string"
301 }
302 },
303 "preference": {
304 "type": "string",
305 "enum": [
306 "SHALL",
307 "PREFER",
308 "AVOID",
309 "FORBID"
310 ]
311 },
312 "primary": {"type": "boolean"}
313 },
314 "additionalProperties": false,
315 "required": ["cellIdList", "preference"]
316 }
317 }
318 },
319 "minProperties": 2,
320 "additionalProperties": false,
321 "required": ["scope"]
322 }'
elinuxhenrik93f015a2020-04-08 11:23:55 +0200323
elinuxhenrik83a40db2020-04-23 07:47:44 +0200324**Result**:
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200325
elinuxhenrik83a40db2020-04-23 07:47:44 +0200326201: ::
327
328 Policy type STD_PolicyModelUnconstrained_0.2.0 is OK
elinuxhenrik93f015a2020-04-08 11:23:55 +0200329
330DELETE
331++++++
332
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200333Delete a policy type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200334
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200335**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200336
337/policytype?id=<policy-type-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200338
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200339**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200340
341id: (*Required*)
342
343The ID of the policy type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200344
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200345**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200346
347204:
348
349Policy type <policy-type-id> is OK.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200350
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200351**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200352
elinuxhenrik83a40db2020-04-23 07:47:44 +0200353**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200354
elinuxhenrik83a40db2020-04-23 07:47:44 +0200355 curl -X DELETE "http://localhost:8085/policytype?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200356
elinuxhenrik83a40db2020-04-23 07:47:44 +0200357**Result**:
358
359204: ::
360
361 Policy type STD_PolicyModelUnconstrained_0.2.0 is OK
elinuxhenrik93f015a2020-04-08 11:23:55 +0200362
363/policytypes
364~~~~~~~~~~~~
365
366GET
367+++
368
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200369Get a list of policy types.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200370
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200371**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200372
373/policytypes
elinuxhenrik93f015a2020-04-08 11:23:55 +0200374
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200375**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200376
377None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200378
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200379**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200380
381200:
382
383A list of policy types.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200384
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200385**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200386
elinuxhenrik83a40db2020-04-23 07:47:44 +0200387**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200388
elinuxhenrik83a40db2020-04-23 07:47:44 +0200389 curl -X GET "http://localhost:8085/policytypes"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200390
elinuxhenrik83a40db2020-04-23 07:47:44 +0200391**Result**:
392
393200: ::
394
395 STD_PolicyModelUnconstrained_0.2.0
elinuxhenrik93f015a2020-04-08 11:23:55 +0200396
397/forceresponse
398~~~~~~~~~~~~~~
399
400POST
401++++
402
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200403Force a specific response code for an A1 operation.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200404
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200405**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200406
407/forceresponse?responsecode=<http-response-code>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200408
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200409**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200410
411responsecode: (*Required*)
412
413The HTTP response code to return.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200414
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200415**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200416
417200:
418
419Force response code: <expected code> set for one single A1 response
elinuxhenrik93f015a2020-04-08 11:23:55 +0200420
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200421**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200422
elinuxhenrik83a40db2020-04-23 07:47:44 +0200423**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200424
elinuxhenrik83a40db2020-04-23 07:47:44 +0200425 curl -X POST "http://localhost:8085/forceresponse?responsecode=400"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200426
elinuxhenrik83a40db2020-04-23 07:47:44 +0200427**Result**:
428
429200: ::
430
431 Force response code: 400 set for one single A1 response
elinuxhenrik93f015a2020-04-08 11:23:55 +0200432
433/forcedelay
434~~~~~~~~~~~
435
436POST
437++++
438
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200439Force delayed response of all A1 operations.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200440
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200441**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200442
443/forcedelay?delay=<delay-time-seconds>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200444
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200445**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200446
447delay: (*Required*)
448
449The time in seconds to delay all responses.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200450
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200451**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200452
453200:
454
455Force delay: <expected delay> sec set for all A1 responses
elinuxhenrik93f015a2020-04-08 11:23:55 +0200456
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200457**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200458
elinuxhenrik83a40db2020-04-23 07:47:44 +0200459**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200460
elinuxhenrik83a40db2020-04-23 07:47:44 +0200461 curl -X POST "http://localhost:8085/forcedelay?delay=2"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200462
elinuxhenrik83a40db2020-04-23 07:47:44 +0200463**Result**:
464
465200: ::
466
467 Force delay: 2 sec set for all A1 responses
elinuxhenrik93f015a2020-04-08 11:23:55 +0200468
469/status
470~~~~~~~
471
472PUT
473+++
474
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200475Set status and optional reason, delete and time stamp.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200476
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200477**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200478
479/status?policyid=<policyid>&status=<status>&deleted=<value>&created_at=<time-stamp>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200480
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200481**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200482
483policyid: (*Required*)
484
485The ID of a policy.
486
487status: (*Required*)
488
489The status of a policy.
490
491deleted: (*Optional*)
492
493True or false for real values, but accepts anything for error testing.
494
495created_at: (*Optional*)
496
497Time stamp for the status.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200498
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200499**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200500
501200:
502
503Status set to <status> for policy <policy-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200504
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200505**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200506
elinuxhenrik83a40db2020-04-23 07:47:44 +0200507**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200508
elinuxhenrik83a40db2020-04-23 07:47:44 +0200509 curl -X PUT "http://localhost:8085/policyid=Policy1&status?status=Accepted
elinuxhenrik93f015a2020-04-08 11:23:55 +0200510
elinuxhenrik83a40db2020-04-23 07:47:44 +0200511**Result**:
512
513200: ::
514
515 Status set to Accepted for policy Policy1.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200516
517A1 Standard 1.1.3
518-----------------
519
elinuxhenrikb11c3532020-04-22 11:01:08 +0200520This section describes the available administrative functions for the A1 Standard 1.1.3 version of A1.
521
522To see the A1 functions for this version, see `A1 Standard 1.1.3 API`_.
523
524.. _A1 Standard 1.1.3 API: https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=blob;f=near-rt-ric-simulator/api/STD_1.1.3/STD_A1.yaml
elinuxhenrik93f015a2020-04-08 11:23:55 +0200525
526/deleteinstances
527~~~~~~~~~~~~~~~~
528
529POST
530++++
531
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200532Delete all policy instances.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200533
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200534**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200535
536/deleteinstances
elinuxhenrik93f015a2020-04-08 11:23:55 +0200537
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200538**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200539
540None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200541
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200542**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200543
544200:
545
546All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200547
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200548**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200549
elinuxhenrik83a40db2020-04-23 07:47:44 +0200550**Call**: ::
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200551
elinuxhenrik83a40db2020-04-23 07:47:44 +0200552 curl -X POST "http://localhost:8085/deleteinstances"
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200553
elinuxhenrik83a40db2020-04-23 07:47:44 +0200554**Result**:
555
556200: ::
557
558 All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200559
elinuxhenrik93f015a2020-04-08 11:23:55 +0200560/deleteall
561~~~~~~~~~~
562
563POST
564++++
565
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200566Full reset.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200567
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200568**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200569
570/deleteinstances
elinuxhenrik93f015a2020-04-08 11:23:55 +0200571
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200572**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200573
574None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200575
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200576**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200577
578200:
579
580All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200581
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200582**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200583
elinuxhenrik83a40db2020-04-23 07:47:44 +0200584**Call**: ::
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200585
elinuxhenrik83a40db2020-04-23 07:47:44 +0200586 curl -X POST "http://localhost:8085/deleteall"
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200587
elinuxhenrik83a40db2020-04-23 07:47:44 +0200588**Result**:
589
590200: ::
591
592 All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200593
elinuxhenrik93f015a2020-04-08 11:23:55 +0200594/forceresponse
595~~~~~~~~~~~~~~
596
597POST
598++++
599
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200600Force a specific response code for an A1 operation.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200601
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200602**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200603
604/forceresponse?responsecode=<http-response-code>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200605
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200606**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200607
608responsecode: (*Required*)
609
610The HTTP response code to return.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200611
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200612**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200613
614200:
615
616Force response code: <expected code> set for one single A1 response
elinuxhenrik93f015a2020-04-08 11:23:55 +0200617
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200618**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200619
elinuxhenrik83a40db2020-04-23 07:47:44 +0200620**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200621
elinuxhenrik83a40db2020-04-23 07:47:44 +0200622 curl -X POST "http://localhost:8085/forceresponse?responsecode=400"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200623
elinuxhenrik83a40db2020-04-23 07:47:44 +0200624**Result**:
625
626200: ::
627
628 Force response code: 400 set for one single A1 response
elinuxhenrik93f015a2020-04-08 11:23:55 +0200629
630/forcedelay
631~~~~~~~~~~~
632
633POST
634++++
635
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200636Force delayed response of all A1 operations.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200637
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200638**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200639
640/forcedelay?delay=<delay-time-seconds>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200641
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200642**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200643
644delay: (*Required*)
645
646The time in seconds to delay all responses.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200647
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200648**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200649
650200:
651
652Force delay: <expected delay> sec set for all A1 responses
elinuxhenrik93f015a2020-04-08 11:23:55 +0200653
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200654**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200655
elinuxhenrik83a40db2020-04-23 07:47:44 +0200656**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200657
elinuxhenrik83a40db2020-04-23 07:47:44 +0200658 curl -X POST "http://localhost:8085/forcedelay?delay=2"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200659
elinuxhenrik83a40db2020-04-23 07:47:44 +0200660**Result**:
661
662200: ::
663
664 Force delay: 2 sec set for all A1 responses
elinuxhenrik93f015a2020-04-08 11:23:55 +0200665
666/status
667~~~~~~~
668
669PUT
670+++
671
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200672Set status and optional reason, delete and time stamp.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200673
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200674**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200675
676/status?policyid=<policyid>&status=<status>&reason=<reason>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200677
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200678**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200679
680policyid: (*Required*)
681
682The ID of a policy.
683
684status: (*Required*)
685
686The status of a policy.
687
688reason: (*Optional*)
689
690The reason for the status.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200691
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200692**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200693
694200:
695
696Status set to <status> for policy <policy-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200697
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200698**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200699
elinuxhenrik83a40db2020-04-23 07:47:44 +0200700**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200701
elinuxhenrik83a40db2020-04-23 07:47:44 +0200702 curl -X PUT "http://localhost:8085/status?policyid=Policy1&status=Accepted
elinuxhenrik93f015a2020-04-08 11:23:55 +0200703
elinuxhenrik83a40db2020-04-23 07:47:44 +0200704**Result**:
705
706200: ::
707
708 Status set to Accepted for policy Policy1
elinuxhenrik93f015a2020-04-08 11:23:55 +0200709
710/sendstatus
711~~~~~~~~~~~
712
713POST
714++++
715
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200716Send status for policy.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200717
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200718**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200719
720/sendstatus?policyid=<policy-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200721
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200722**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200723
724policyid: (*Required*)
725
726The ID of the policy to send status for.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200727
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200728**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200729
730200:
731
732Is a JSON with the response of the actual post request to the callback server, whatever that is.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200733
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200734**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200735
elinuxhenrik83a40db2020-04-23 07:47:44 +0200736**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200737
elinuxhenrik83a40db2020-04-23 07:47:44 +0200738 curl -X POST "http://localhost:8085/sendstatus?policyid=Policy2"
739
740**Result**:
741
742200
elinuxhenrik93f015a2020-04-08 11:23:55 +0200743
7441.1.x-alpha.2
745-------------
746
elinuxhenrikb11c3532020-04-22 11:01:08 +0200747This section describes the available administrative functions for the 1.1.x-alpha.2 version of A1.
748
749To see the A1 functions for this version, see `1.1.x-alpha.2 API`_.
750
751.. _1.1.x-alpha.2 API: https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=blob;f=near-rt-ric-simulator/api/1.1.x-alpha.2/a1-openapi.yaml
elinuxhenrik93f015a2020-04-08 11:23:55 +0200752
753/deleteinstances
754~~~~~~~~~~~~~~~~
755
756DELETE
757++++++
758
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200759Delete all policy instances.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200760
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200761**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200762
763/deleteinstances
elinuxhenrik93f015a2020-04-08 11:23:55 +0200764
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200765**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200766
767None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200768
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200769**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200770
771200:
772
773All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200774
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200775**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200776
elinuxhenrik83a40db2020-04-23 07:47:44 +0200777**Call**: ::
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200778
elinuxhenrik83a40db2020-04-23 07:47:44 +0200779 curl -X DELETE "http://localhost:8085/deleteinstances"
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200780
elinuxhenrik83a40db2020-04-23 07:47:44 +0200781**Result**:
782
783200: ::
784
785 All policy instances deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200786
elinuxhenrik93f015a2020-04-08 11:23:55 +0200787/deletetypes
788~~~~~~~~~~~~
789
790DELETE
791++++++
792
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200793Delete all policy types.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200794
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200795**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200796
797/deletetypes
elinuxhenrik93f015a2020-04-08 11:23:55 +0200798
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200799**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200800
801None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200802
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200803**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200804
805200:
806
807All policy types deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200808
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200809**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200810
elinuxhenrik83a40db2020-04-23 07:47:44 +0200811**Call**: ::
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200812
elinuxhenrik83a40db2020-04-23 07:47:44 +0200813 curl -X DELETE "http://localhost:8085/deletetypes"
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200814
elinuxhenrik83a40db2020-04-23 07:47:44 +0200815**Result**:
816
817200: ::
818
819 All policy types deleted.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200820
elinuxhenrik93f015a2020-04-08 11:23:55 +0200821/policytypes
822~~~~~~~~~~~~
823
824PUT
825+++
826
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200827Create or update a policy type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200828
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200829**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200830
831/policytypes/{policy-type-id}
elinuxhenrik93f015a2020-04-08 11:23:55 +0200832
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200833**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200834
835None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200836
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200837**Body:** (*Required*)
elinuxhenrik83a40db2020-04-23 07:47:44 +0200838
839A JSON object containing the schema for the type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200840
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200841**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200842
843200:
844
845The policy type was either created or updated for policy type id: <policy-type-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200846
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200847**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200848
elinuxhenrik83a40db2020-04-23 07:47:44 +0200849**Call**: ::
850
851 curl -X PUT "http://localhost:8085/policytype/Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0"
852 -H "Content-Type: application/json"
853 -d '{
854 "$schema": "http://json-schema.org/draft-07/schema#",
855 "title": "STD_PolicyModelUnconstrained_0.2.0",
856 "description": "Standard model of a policy with unconstrained scope id combinations",
857 "type": "object",
858 "properties": {
859 "scope": {
860 "type": "object",
861 "properties": {
862 "ueId": {"type": "string"},
863 "groupId": {"type": "string"},
864 "sliceId": {"type": "string"},
865 "qosId": {"type": "string"},
866 "cellId": {"type": "string"}
elinuxhenrik93f015a2020-04-08 11:23:55 +0200867 },
elinuxhenrik83a40db2020-04-23 07:47:44 +0200868 "minProperties": 1,
869 "additionalProperties": false
elinuxhenrik93f015a2020-04-08 11:23:55 +0200870 },
elinuxhenrik83a40db2020-04-23 07:47:44 +0200871 "qosObjectives": {
872 "type": "object",
873 "properties": {
874 "gfbr": {"type": "number"},
875 "mfbr": {"type": "number"},
876 "priorityLevel": {"type": "number"},
877 "pdb": {"type": "number"}
878 },
879 "additionalProperties": false
880 },
881 "qoeObjectives": {
882 "type": "object",
883 "properties": {
884 "qoeScore": {"type": "number"},
885 "initialBuffering": {"type": "number"},
886 "reBuffFreq": {"type": "number"},
887 "stallRatio": {"type": "number"}
888 },
889 "additionalProperties": false
890 },
891 "resources": {
892 "type": "array",
893 "items": {
894 "type": "object",
895 "properties": {
896 "cellIdList": {
897 "type": "array",
898 "minItems": 1,
899 "uniqueItems": true,
900 "items": {
901 "type": "string"
902 }
903 },
904 "preference": {
905 "type": "string",
906 "enum": [
907 "SHALL",
908 "PREFER",
909 "AVOID",
910 "FORBID"
911 ]
912 },
913 "primary": {"type": "boolean"}
914 },
915 "additionalProperties": false,
916 "required": ["cellIdList", "preference"]
917 }
918 }
919 },
920 "minProperties": 2,
921 "additionalProperties": false,
922 "required": ["scope"]
923 }'
elinuxhenrik93f015a2020-04-08 11:23:55 +0200924
elinuxhenrik83a40db2020-04-23 07:47:44 +0200925**Result**:
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200926
elinuxhenrik83a40db2020-04-23 07:47:44 +0200927200: ::
928
929 The policy type was either created or updated for policy type id: STD_PolicyModelUnconstrained_0.2.0
elinuxhenrik93f015a2020-04-08 11:23:55 +0200930
931DELETE
932++++++
933
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200934Delete a policy type.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200935
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200936**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200937
938/policytypes/{policy-type-id}
elinuxhenrik93f015a2020-04-08 11:23:55 +0200939
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200940**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200941
942None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200943
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200944**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200945
946200:
947
948policy type successfully deleted for policy type id: <policy-type-id>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200949
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200950**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200951
elinuxhenrik83a40db2020-04-23 07:47:44 +0200952**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200953
elinuxhenrik83a40db2020-04-23 07:47:44 +0200954 curl -X DELETE "http://localhost:8085/policytype?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0"
elinuxhenrik93f015a2020-04-08 11:23:55 +0200955
elinuxhenrik83a40db2020-04-23 07:47:44 +0200956**Result**:
957
958200: ::
959
960 policy type successfully deleted for policy type id: STD_PolicyModelUnconstrained_0.2.0
elinuxhenrik93f015a2020-04-08 11:23:55 +0200961
962/{policyId}/{enforceStatus}
963~~~~~~~~~~~~~~~~~~~~~~~~~~~
964
965PUT
966+++
967
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200968Set a status to a policy instance with an enforceStatus parameter only.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200969
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200970**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200971
972/{policyId}/{enforceStatus}
elinuxhenrik93f015a2020-04-08 11:23:55 +0200973
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200974**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200975
976None.
elinuxhenrik93f015a2020-04-08 11:23:55 +0200977
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200978**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +0200979
980200:
981
982Status updated for policy: <policyId>
elinuxhenrik93f015a2020-04-08 11:23:55 +0200983
elinuxhenrikc67ef9d2020-04-20 17:05:00 +0200984**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +0200985
elinuxhenrik83a40db2020-04-23 07:47:44 +0200986**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +0200987
elinuxhenrik83a40db2020-04-23 07:47:44 +0200988 curl -X PUT "http://localhost:8085/Policy1/ENFORCED
elinuxhenrik93f015a2020-04-08 11:23:55 +0200989
elinuxhenrik83a40db2020-04-23 07:47:44 +0200990**Result**:
991
992200: ::
993
994 Status updated for policy: Policy1
elinuxhenrik93f015a2020-04-08 11:23:55 +0200995
996/{policyId}/{enforceStatus}/{enforceReason}
997~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
998
999PUT
1000++++
1001
elinuxhenrikc67ef9d2020-04-20 17:05:00 +02001002Send a status to a policy instance with both enforceStatus and enforceReason.
elinuxhenrik93f015a2020-04-08 11:23:55 +02001003
elinuxhenrikc67ef9d2020-04-20 17:05:00 +02001004**URL path:**
elinuxhenrik83a40db2020-04-23 07:47:44 +02001005
1006/{policyId}/{enforceStatus}/{enforceReason}
elinuxhenrik93f015a2020-04-08 11:23:55 +02001007
elinuxhenrikc67ef9d2020-04-20 17:05:00 +02001008**Parameters:**
elinuxhenrik83a40db2020-04-23 07:47:44 +02001009
1010None.
elinuxhenrik93f015a2020-04-08 11:23:55 +02001011
elinuxhenrikc67ef9d2020-04-20 17:05:00 +02001012**Responses:**
elinuxhenrik83a40db2020-04-23 07:47:44 +02001013
1014200:
1015
1016Status updated for policy: <policyId>
elinuxhenrik93f015a2020-04-08 11:23:55 +02001017
elinuxhenrikc67ef9d2020-04-20 17:05:00 +02001018**Examples:**
elinuxhenrik93f015a2020-04-08 11:23:55 +02001019
elinuxhenrik83a40db2020-04-23 07:47:44 +02001020**Call**: ::
elinuxhenrik93f015a2020-04-08 11:23:55 +02001021
elinuxhenrik83a40db2020-04-23 07:47:44 +02001022 curl -X PUT "http://localhost:8085/Policy1/NOT_ENFORCED/100"
elinuxhenrik93f015a2020-04-08 11:23:55 +02001023
elinuxhenrik83a40db2020-04-23 07:47:44 +02001024**Result**:
1025
1026200: ::
1027
1028 Status updated for policy: Policy1