# ==================================================================================
-# Copyright (c) 2019 Nokia
-# Copyright (c) 2018-2019 AT&T Intellectual Property.
+# Copyright (c) 2019-2020 Nokia
+# Copyright (c) 2018-2020 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ==================================================================================
openapi: 3.0.0
info:
- version: 1.0.0
+ version: 2.1.0
title: RIC A1
paths:
'/a1-p/healthcheck':
items:
"$ref": "#/components/schemas/policy_type_id"
example: [20000, 20020]
+ 503:
+ description: "Potentially transient backend database error. Client should attempt to retry later."
'/a1-p/policytypes/{policy_type_id}':
parameters:
'404':
description: >
policy type not found
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
delete:
description: >
Delete this policy type. Can only be performed if there are no instances of this type
'404':
description: >
policy type not found
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
put:
description: >
Create a new policy type .
description: "policy type successfully created"
'400':
description: "illegal ID, or object already existed"
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
'/a1-p/policytypes/{policy_type_id}/policies':
parameters:
items:
"$ref": "#/components/schemas/policy_instance_id"
example: ["3d2157af-6a8f-4a7c-810f-38c2f824bf12", "06911bfc-c127-444a-8eb1-1bffad27cc3d"]
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
'/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}':
'404':
description: >
there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
delete:
description: >
- A1 Mediator
operationId: a1.controller.delete_policy_instance
responses:
- '204':
+ '202':
description: >
- policy instance successfully deleted
+ policy instance deletion initiated
'404':
description: >
- there is no policy instance with this policy_instance_id
- or there is no policy type with this policy_type_id
+ there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
put:
description: >
trigger_threshold: 10
responses:
- '201':
+ '202':
description: >
- Policy instance created
+ Policy instance creation initiated
'400':
description: >
Bad PUT body for this policy instance
'404':
description: >
There is no policy type with this policy_type_id
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
'/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status':
parameters:
get:
description: >
Retrieve the policy instance status across all handlers of the policy
-
+ If this endpoint returns successfully (200), it is either IN EFFECT or NOT IN EFFECT.
+ IN EFFECT is returned if at least one policy handler in the RIC is implementing the policy
+ NOT IN EFFECT is returned otherwise
+ If a policy instance is successfully deleted, this endpoint will return a 404 (not a 200)
tags:
- A1 Mediator
operationId: a1.controller.get_policy_instance_status
responses:
'200':
description: >
- The policy instance status.
- Returns a vector of statuses, where each contains a handler_id (opaque id of a RIC component that implements this policy) and the policy status as returned by that handler
+ successfully retrieved the status
content:
application/json:
schema:
- type: array
- items:
- type: object
- properties:
- handler_id:
- type: string
- status:
- type: string
- example:
- [{"handler_id": "1234-5678", "status" : "OK"}, {"handler_id": "abc-def", "status" : "NOT IMPLEMENTED"}]
+ type: object
+ properties:
+ instance_status:
+ type: string
+ enum:
+ - IN EFFECT
+ - NOT IN EFFECT
+ has_been_deleted:
+ type: boolean
+ created_at:
+ type: string
+ format: date-time
+
'404':
description: >
there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
+ '503':
+ description: "Potentially transient backend database error. Client should attempt to retry later."
+
+ '/data-delivery':
+ post:
+ description: >
+ Deliver data produced by data producer.
+ tags:
+ - A1 EI Data Delivery
+ operationId: a1.controller.data_delivery
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ description: >
+ object to represent data object
+ responses:
+ '200':
+ description: >
+ successfully delivered data from data producer
+
+ '404':
+ description: >
+ no job id defined for this data delivery
components:
schemas:
description: >
represents a policy type identifier. Currently this is restricted to an integer range.
type: integer
- minimum: 20000
- maximum: 21023
+ minimum: 1
+ maximum: 2147483647
policy_instance_id:
description: >
represents a policy instance identifier. UUIDs are advisable but can be any string
type: string
example: "3d2157af-6a8f-4a7c-810f-38c2f824bf12"
-
- downstream_message_schema:
- type: object
- required:
- - operation
- - policy_type_id
- - policy_instance_id
- - payload
- additionalProperties: false
- properties:
- operation:
- description: the operation being performed
- type: string
- enum:
- - CREATE
- - DELETE
- - UPDATE
- - READ
- policy_type_id:
- "$ref": "#/components/schemas/policy_type_id"
- policy_instance_id:
- "$ref": "#/components/schemas/policy_instance_id"
- payload:
- description: payload for this operation
- type: object
- example:
- operation: CREATE
- policy_type_id: 12345678
- policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
- payload:
- enforce: true
- window_length: 10
- blocking_rate: 20
- trigger_threshold: 10
-
- downstream_notification_schema:
- type: object
- required:
- - policy_type_id
- - policy_instance_id
- - handler_id
- - status
- additionalProperties: false
- properties:
- policy_type_id:
- "$ref": "#/components/schemas/policy_type_id"
- policy_instance_id:
- "$ref": "#/components/schemas/policy_instance_id"
- handler_id:
- description: >
- id of the policy handler
- type: string
- status:
- description: >
- the status of this policy instance in this handler
- type: string
- example:
- policy_type_id: 12345678
- policy_instance_id: 3d2157af-6a8f-4a7c-810f-38c2f824bf12
- handler_id: 1234-5678
- status: OK