Skip to content

Commit

Permalink
Upd: Add api key endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Oct 18, 2023
1 parent ca444d2 commit 8198991
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 0 deletions.
134 changes: 134 additions & 0 deletions openapi/v2023.8.2/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2441,6 +2441,140 @@ paths:
x-specification-pii-or-sensitive: 'False'
x-specification-scenario: ''
x-specification-usecase: UC-C-PIC-A-004
/config/admin/apikey:
post:
description: CREATE - Create an API key
operationId: configCreateApikey
parameters: []
requestBody:
content:
application/json:
schema:
properties:
apiKey:
$ref: '#/paths/~1config~1admin~1apikey~1%7BapiKeyId%7D/delete/responses/200/content/application~1json/schema'
description: An object of type ApiKey
required:
- apiKey
type: object
responses:
'200':
content:
application/json:
schema:
type: object
properties:
apiKey:
$ref: '#/paths/~1config~1admin~1apikey~1%7BapiKeyId%7D/delete/responses/200/content/application~1json/schema'
description: 'A set consisting of the new ApiKey object created, together with the initial Revision object.'
'400':
description: bad input parameter
security:
- BearerAuth: []
summary: CREATE - Create an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: 'False'
x-specification-scenario: ''
x-specification-usecase: UC-C-PIC-A-001
'/config/admin/apikey/{apiKeyId}':
put:
description: UPDATE - Update an API key
operationId: configUpdateApiKey
parameters:
- description: Unique ID of an object
in: path
name: apiKeyId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
apiKey:
$ref: '#/paths/~1config~1admin~1apikey~1%7BapiKeyId%7D/delete/responses/200/content/application~1json/schema'
description: An object of type ApiKey
required:
- apiKey
type: object
responses:
'200':
content:
application/json:
schema:
type: object
properties:
apiKey:
$ref: '#/paths/~1config~1admin~1apikey~1%7BapiKeyId%7D/delete/responses/200/content/application~1json/schema'
description: ''
'400':
description: bad input parameter
security:
- BearerAuth: []
summary: UPDATE - Update an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: 'False'
x-specification-scenario: ''
x-specification-usecase: UC-C-PIC-A-002
delete:
description: DELETE - Deletes an API key DataAgreement.
operationId: configDeletePolicy
parameters:
- $ref: '#/paths/~1config~1admin~1apikey~1%7BapiKeyId%7D/put/parameters/0'
responses:
'200':
content:
application/json:
schema:
type: object
title: ApiKey
description: Api key
x-not-in-database: false
required:
- scopes
properties:
id:
type: string
format: ''
example: ''
description: API key Id
scopes:
type: array
items:
type: string
enum:
- config
- audit
- service
- onboard
description: Scopes for API key
apiKey:
type: string
format: ''
example: ''
description: API key
expiryInDays:
type: integer
format: ''
default: 30
description: 'Expiry in days. If expiry is 0, then default to 30 days'
description: ''
'400':
description: bad input parameter
security:
- BearerAuth: []
summary: DELETE - Deletes an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: 'False'
x-specification-scenario: ''
x-specification-usecase: UC-C-PIC-A-004
/onboard/admin/login:
post:
tags:
Expand Down
36 changes: 36 additions & 0 deletions openapi/v2023.8.2/definitions/ApiKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
type: object
title: ApiKey
description: "Api key"
x-not-in-database: false

required:
- scopes
properties:
id:
type: string
format: ""
example: ""
description: "API key Id"

scopes:
type: array
items:
type: string
enum:
- config
- audit
- service
- onboard
description: "Scopes for API key"

apiKey:
type: string
format: ""
example: ""
description: "API key"

expiryInDays:
type: integer
format: ""
default: 30
description: "Expiry in days. If expiry is 0, then default to 30 days"
8 changes: 8 additions & 0 deletions openapi/v2023.8.2/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ paths:
$ref: "./paths/configUpdateIdp.yaml"
delete:
$ref: "./paths/configDeleteIdp.yaml"
/config/admin/apikey:
post:
$ref: "./paths/configCreateApikey.yaml"
/config/admin/apikey/{apiKeyId}:
put:
$ref: "./paths/configUpdateApiKey.yaml"
delete:
$ref: "./paths/configDeleteApiKey.yaml"
/onboard/admin/login:
post:
$ref: ./paths/loginOrganisationAdmin.yaml
Expand Down
6 changes: 6 additions & 0 deletions openapi/v2023.8.2/parameters/apiKeyId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Unique ID of an object
in: path
name: apiKeyId
required: true
schema:
type: string
36 changes: 36 additions & 0 deletions openapi/v2023.8.2/paths/configCreateApikey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
description: CREATE - Create an API key
operationId: configCreateApikey
parameters: []
requestBody:
content:
application/json:
schema:
properties:
apiKey:
$ref: ../definitions/ApiKey.yaml
description: An object of type ApiKey
required:
- apiKey
type: object
responses:
'200':
content:
application/json:
schema:
type: object
properties:
apiKey:
$ref: ../definitions/ApiKey.yaml
description: A set consisting of the new ApiKey object created, together with
the initial Revision object.
'400':
description: bad input parameter
security:
- BearerAuth: []
summary: CREATE - Create an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: 'False'
x-specification-scenario: ''
x-specification-usecase: UC-C-PIC-A-001
23 changes: 23 additions & 0 deletions openapi/v2023.8.2/paths/configDeleteApiKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description: DELETE - Deletes an API key
DataAgreement.
operationId: configDeletePolicy
parameters:
- $ref: "../parameters/apiKeyId.yaml"
responses:
"200":
content:
application/json:
schema:
$ref: ../definitions/ApiKey.yaml
description: ""
"400":
description: bad input parameter
security:
- BearerAuth: []
summary: DELETE - Deletes an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: "False"
x-specification-scenario: ""
x-specification-usecase: UC-C-PIC-A-004
25 changes: 25 additions & 0 deletions openapi/v2023.8.2/paths/configReadApiKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
description: READ - Read an API key
operationId: configReadApiKey
parameters:
- $ref: "../parameters/apiKeyId.yaml"
responses:
"200":
content:
application/json:
schema:
type: object
properties:
apiKey:
$ref: ../definitions/ApiKey.yaml
description: ""
"400":
description: bad input parameter
security:
- BearerAuth: []
summary: READ - Read an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: "False"
x-specification-scenario: ""
x-specification-usecase: UC-C-PIC-A-003
36 changes: 36 additions & 0 deletions openapi/v2023.8.2/paths/configUpdateApiKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
description: UPDATE - Update an API key
operationId: configUpdateApiKey
parameters:
- $ref: "../parameters/apiKeyId.yaml"
requestBody:
content:
application/json:
schema:
properties:
apiKey:
$ref: ../definitions/ApiKey.yaml
description: An object of type ApiKey
required:
- apiKey
type: object
responses:
"200":
content:
application/json:
schema:
type: object
properties:
apiKey:
$ref: ../definitions/ApiKey.yaml
description: ""
"400":
description: bad input parameter
security:
- BearerAuth: []
summary: UPDATE - Update an API key
tags:
- config
x-specification-crudl-model: ApiKey
x-specification-pii-or-sensitive: "False"
x-specification-scenario: ""
x-specification-usecase: UC-C-PIC-A-002

0 comments on commit 8198991

Please sign in to comment.