Skip to content

Instantly share code, notes, and snippets.

@junedkazi
Last active May 24, 2023 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junedkazi/26b4f78b1cd937386163ed92198ef54c to your computer and use it in GitHub Desktop.
Save junedkazi/26b4f78b1cd937386163ed92198ef54c to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
version: 1.0.0
title: SCIM 2.0 User Schema
description: SCIM 2.0 User Schema API according to RFC7643
servers:
- url: /api/v1/scim
paths:
/Users:
get:
summary: Retrieve a list of users
parameters:
- name: email
in: query
description: Email address to filter by
required: false
schema:
type: string
responses:
'200':
description: A list of users
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
'400':
description: Invalid filter syntax
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
post:
summary: Create a new user
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'201':
description: User created
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Invalid filter syntax
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
/Users/{userId}:
get:
summary: Retrieve a user by ID
parameters:
- name: userId
in: path
required: true
schema:
type: string
responses:
'200':
description: A user
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Invalid filter syntax
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Delete a user by ID
parameters:
- name: userId
in: path
required: true
schema:
type: string
responses:
'204':
description: User deleted successfully
'400':
description: Invalid User ID supplied
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: User not found
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/scim+json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
User:
type: object
properties:
schemas:
type: array
items:
type: string
id:
type: string
meta:
type: object
properties:
resourceType:
type: string
created:
type: string
format: date-time
lastModified:
type: string
format: date-time
location:
type: string
userName:
type: string
name:
type: object
properties:
formatted:
type: string
familyName:
type: string
givenName:
type: string
middleName:
type: string
honorificPrefix:
type: string
honorificSuffix:
type: string
active:
type: boolean
emails:
type: string
groups:
type: array
items:
type: object
properties:
value:
type: string
$ref:
type: string
entitlements:
type: array
items:
type: object
properties:
value:
type: string
type:
type: string
roles:
type: array
items:
type: object
properties:
value:
type: string
type:
type: string
Error:
type: object
properties:
schemas:
type: array
items:
type: string
detail:
type: string
status:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment