Automated commit 'IDNLANAI-8726: Add api-spec for segment /v3 endpoints (#1272)

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints

* IDNLANAI-8726: Add api-spec for segment /v3 endpoints' by github action: 4939546690
This commit is contained in:
GitHub Action Bot
2023-05-10 17:08:42 +00:00
parent 936b4045d7
commit 9ffde5845c
7 changed files with 305 additions and 1 deletions

View File

@@ -550,7 +550,7 @@ tags:
This ingestion process introduces a latency from when the operational data is created to when it is available in search.
Depending on the system load, this can take a few seconds to a few minutes.
Please keep this latency in mind when you use search.
- name: Segments
- name: Service Desk Integration
description: |
Use this API to build an integration between IdentityNow and a service desk ITSM (IT service management) solution.
@@ -825,6 +825,10 @@ paths:
$ref: "./v3/paths/search-aggregate.yaml"
/search/{index}/{id}:
$ref: "./v3/paths/search-get.yaml"
/segments:
$ref: "./v3/paths/segments.yaml"
/segments/{id}:
$ref: "./v3/paths/segment.yaml"
/service-desk-integrations:
$ref: "./v3/paths/service-desk-integrations.yaml"
/service-desk-integrations/{id}:

160
idn/v3/paths/segment.yaml Normal file
View File

@@ -0,0 +1,160 @@
get:
operationId: getSegment
security:
- oauth2: [ idn:segment:read, idn:segment:manage ]
tags:
- Segments
summary: Get a Segment by ID
description: >-
This API returns the segment specified by the given ID.
A token with ORG_ADMIN or API authority is required to call this API.
parameters:
- in: path
name: id
schema:
type: string
required: true
description: The ID of the Segment to retrieve.
example: ef38f94347e94562b5bb8424a56397d8
responses:
'200':
description: Segment
content:
application/json:
schema:
$ref: '../schemas/Segment.yaml'
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
$ref: '../../v3/responses/403.yaml'
'404':
$ref: '../../v3/responses/404.yaml'
'429':
$ref: '../../v3/responses/429.yaml'
'500':
$ref: '../../v3/responses/500.yaml'
delete:
operationId: deleteSegment
security:
- oauth2: [ idn:segment:manage ]
tags:
- Segments
summary: Delete Segment by ID
description: >-
This API deletes the segment specified by the given ID.
Note that segment deletion may take some time to become effective.
A token with ORG_ADMIN or API authority is required to call this API.
parameters:
- in: path
name: id
schema:
type: string
required: true
description: The ID of the Segment to delete.
example: ef38f94347e94562b5bb8424a56397d8
responses:
'204':
description: No content.
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
$ref: '../../v3/responses/403.yaml'
'404':
$ref: '../../v3/responses/404.yaml'
'429':
$ref: '../../v3/responses/429.yaml'
'500':
$ref: '../../v3/responses/500.yaml'
patch:
operationId: patchSegment
security:
- oauth2: [ idn:segment:manage ]
tags:
- Segments
summary: Update a Segment
description: >-
Allows updating Segment fields using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
Note that changes to a segment may take some time to propagate to all identities, and that segments will have no
effect if segmentation is not enabled for your org.
A token with ORG_ADMIN or API authority is required to call this API.
parameters:
- in: path
name: id
schema:
type: string
required: true
description: The ID of the Segment being modified.
example: ef38f94347e94562b5bb8424a56397d8
requestBody:
required: true
description: |
A list of Segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
The following fields are patchable:
* name
* description
* owner
* visibilityCriteria
* active
content:
application/json-patch+json:
schema:
type: array
items:
type: object
examples:
Set Visibility Criteria:
description: Set the visibility criteria
value:
- op: "replace"
path: "/visibilityCriteria"
value:
expression:
operator: "AND"
children:
- operator: "EQUALS"
attribute: "location"
value:
type: "STRING"
value: "Philadelphia"
- operator: "EQUALS"
attribute: "department"
value:
type: "STRING"
value: "HR"
responses:
'200':
description: >-
Indicates the PATCH operation succeeded, and returns the Segment's new representation.
content:
application/json:
schema:
$ref: '../schemas/Segment.yaml'
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
$ref: '../../v3/responses/403.yaml'
'404':
$ref: '../../v3/responses/404.yaml'
'429':
$ref: '../../v3/responses/429.yaml'
'500':
$ref: '../../v3/responses/500.yaml'

View File

@@ -0,0 +1,72 @@
post:
operationId: createSegment
security:
- oauth2: [ idn:segment:manage ]
tags:
- Segments
summary: Create Segment
description: >-
This API creates a segment.
Note that segment definitions may take time to propagate to all identities.
A token with ORG_ADMIN or API authority is required to call this API.
requestBody:
required: true
content:
application/json:
schema:
$ref: '../schemas/Segment.yaml'
responses:
'201':
description: Segment created
content:
application/json:
schema:
$ref: '../schemas/Segment.yaml'
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
$ref: '../../v3/responses/403.yaml'
'429':
$ref: '../../v3/responses/429.yaml'
'500':
$ref: '../../v3/responses/500.yaml'
get:
operationId: listSegments
security:
- oauth2: [ idn:segment:read, idn:segment:manage ]
tags:
- Segments
summary: List Segments
description: >-
This API returns a list of all segments.
A token with ORG_ADMIN or API authority is required to call this API.
parameters:
- $ref: '../../v3/parameters/limit.yaml'
- $ref: '../../v3/parameters/offset.yaml'
- $ref: '../../v3/parameters/count.yaml'
responses:
'200':
description: List of all Segments
content:
application/json:
schema:
type: array
items:
$ref: '../schemas/Segment.yaml'
'400':
$ref: '../../v3/responses/400.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
$ref: '../../v3/responses/403.yaml'
'429':
$ref: '../../v3/responses/429.yaml'
'500':
$ref: '../../v3/responses/500.yaml'

View File

@@ -0,0 +1,21 @@
type: object
properties:
operator:
type: string
description: Operator for the expression
enum:
- AND
- EQUALS
example: "EQUALS"
attribute:
type: string
description: Name for the attribute
example: "location"
value:
$ref: './Value.yaml'
children:
type: array
description: List of expressions
items:
$ref: './Value.yaml'
example: []

View File

@@ -0,0 +1,33 @@
type: object
properties:
id:
type: string
description: The id of the Segment.
example: "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde"
name:
type: string
description: Segment Business Name
example: "segment-xyz"
created:
type: string
format: date-time
description: The time when this Segment is created
example: "2020-01-01T00:00:00.000000Z"
modified:
type: string
format: date-time
description: The time when this Segment is modified
example: "2020-01-01T00:00:00.000000Z"
description:
type: string
description: Optional description of the Segment
example: "This segment represents xyz"
owner:
$ref: '../../v3/schemas/access/OwnerReference.yaml'
visibilityCriteria:
$ref: './VisibilityCriteria.yaml'
active:
type: boolean
description: Whether the Segment is currently active. Inactive segments have no effect.
default: false
example: true

10
idn/v3/schemas/Value.yaml Normal file
View File

@@ -0,0 +1,10 @@
type: object
properties:
type:
type: string
description: The type of attribute value
example: "STRING"
value:
type: string
description: The attribute value
example: "Austin"

View File

@@ -0,0 +1,4 @@
type: object
properties:
expression:
$ref: './Expression.yaml'