Skip to content

Commit

Permalink
Reintroduce SCIM documentation (gristlabs#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
fflorent committed Dec 17, 2024
1 parent 1ba3eb4 commit 0b7755c
Show file tree
Hide file tree
Showing 8 changed files with 881 additions and 58 deletions.
1 change: 1 addition & 0 deletions api/body.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: REST API reference
is_api: true
comment: spaces in body are important, do not remove without checking result.
toc:
Expand Down
21 changes: 20 additions & 1 deletion api/grist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ openapi: 3.0.0
security:
- ApiKey: []
servers:
- url: https://{subdomain}.getgrist.com/api
- url: https://{gristhost}/api
variables:
subdomain:
description: The team name, or `docs` for personal areas
Expand Down Expand Up @@ -1151,6 +1151,22 @@ paths:
description: "The caller is not allowed to delete this account"
404:
description: "The user is not found"
/scim/v2/Users:
$ref: "./scim/users.yml#/paths/~1scim~1v2~1Users"
/scim/v2/Users/{userId}:
$ref: "./scim/users.yml#/paths/~1scim~1v2~1Users~1{userId}"
/scim/v2/Users/.search:
$ref: "./scim/users.yml#/paths/~1scim~1v2~1Users~1.search"
/scim/v2/Me:
$ref: "./scim/users.yml#/paths/~1scim~1v2~1Me"
/scim/v2/Bulk:
$ref: "./scim/bulk.yml#/paths/~1scim~1v2~1Bulk"
/scim/v2/Schemas:
$ref: "./scim/serviceproviderconfig.yml#/paths/~1scim~1v2~1Schemas"
/scim/v2/ServiceProviderConfig:
$ref: "./scim/serviceproviderconfig.yml#/paths/~1scim~1v2~1ServiceProviderConfig"
/scim/v2/ResourceTypes:
$ref: "./scim/serviceproviderconfig.yml#/paths/~1scim~1v2~1ResourceTypes"

tags:
- name: orgs
Expand All @@ -1175,6 +1191,8 @@ tags:
description: "Sql endpoint to query data from documents."
- name: users
description: "Grist users."
- name: scim
description: "SCIM"
components:
securitySchemes:
ApiKey:
Expand Down Expand Up @@ -2199,3 +2217,4 @@ components:
- label
description: "Format for headers. Labels tend to be more human-friendly while colIds are more normalized."
required: false

47 changes: 47 additions & 0 deletions api/scim/bulk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
paths:
/scim/v2/Bulk:
post:
summary: Bulk operation
operationId: bulkOperation
tags:
- scim
requestBody:
description: Operations to be performed in bulk.
required: true
content:
application/scim+json:
schema:
type: object
properties:
schemas:
type: array
items:
type: string
enum:
- "urn:ietf:params:scim:api:messages:2.0:BulkRequest"
Operations:
type: array
description: List of operations to be executed.
items:
type: object
properties:
method:
type: string
description: HTTP method for the operation.
example: "POST"
path:
type: string
description: Resource path for the operation.
example: "/scim/v2/Users"
data:
type: object
description: Data for the operation.
responses:
'200':
description: Bulk operations executed successfully.
'400':
description: Bad request.
'500':
description: Internal server error.


42 changes: 42 additions & 0 deletions api/scim/serviceproviderconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
paths:
/scim/v2/Schemas:
get:
summary: Retrieve SCIM schemas
operationId: getSchemas
tags:
- scim
responses:
'200':
description: Successfully retrieved schemas.
'401':
description: Unauthenticated
'500':
description: Internal server error.

/scim/v2/ServiceProviderConfig:
get:
summary: Retrieve service provider configuration
operationId: getServiceProviderConfig
tags:
- scim
responses:
'200':
description: Successfully retrieved service provider configuration.
'401':
description: Unauthenticated
'500':
description: Internal server error.

/scim/v2/ResourceTypes:
get:
summary: Retrieve SCIM resource types
operationId: getResourceTypes
tags:
- scim
responses:
'200':
description: Successfully retrieved resource types.
'401':
description: Unauthenticated
'500':
description: Internal server error.
Loading

0 comments on commit 0b7755c

Please sign in to comment.