Scalar access-groups API
The access-groups API from Scalar — 5 operation(s) for access-groups.
The access-groups API from Scalar — 5 operation(s) for access-groups.
openapi: 3.1.1
info:
title: Core access-groups API
description: Core services for Scalar
version: 1.0.1
contact:
name: Marc from Scalar
url: https://scalar.com
email: support@scalar.com
security:
- BearerAuth: []
tags:
- name: access-groups
paths:
/v1/access-groups/{slug}:
get:
tags:
- access-groups
description: Get an access group by slug
operationId: getv1AccessGroupsSlug
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
uid:
default: nanoid()
$ref: '#/components/schemas/nanoid'
name:
default: ''
$ref: '#/components/schemas/access-group-name'
slug:
default: randomAccessGroupSlug()
$ref: '#/components/schemas/slug'
allowedDomains:
default: []
allowedEmails:
default: []
required:
- uid
- name
- slug
- allowedDomains
- allowedEmails
additionalProperties: false
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
parameters:
- schema:
type: string
in: path
name: slug
required: true
/v1/access-groups:
post:
tags:
- access-groups
description: Creates an access group
operationId: postv1AccessGroups
responses:
'200':
description: Default Response
content:
application/json:
schema:
$ref: '#/components/schemas/access-group'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
$ref: '#/components/schemas/access-group-name'
slug:
$ref: '#/components/schemas/slug'
allowedDomains: {}
allowedEmails: {}
additionalProperties: false
required: true
/v1/access-groups/{uid}:
delete:
tags:
- access-groups
description: Deletes an access group by UID
operationId: deletev1AccessGroupsUid
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
parameters:
- schema:
$ref: '#/components/schemas/nanoid'
in: path
name: uid
required: true
patch:
tags:
- access-groups
description: Updates an access group by UID
operationId: patchv1AccessGroupsUid
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
$ref: '#/components/schemas/access-group-name'
slug:
$ref: '#/components/schemas/slug'
additionalProperties: false
required: true
parameters:
- schema:
$ref: '#/components/schemas/nanoid'
in: path
name: uid
required: true
/v1/access-groups/{uid}/emails:
post:
tags:
- access-groups
description: Adds a new email to an access group
operationId: postv1AccessGroupsUidEmails
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
$ref: '#/components/schemas/email'
required:
- email
additionalProperties: false
required: true
parameters:
- schema:
$ref: '#/components/schemas/nanoid'
in: path
name: uid
required: true
delete:
tags:
- access-groups
description: Removes an existing email from an access group
operationId: deletev1AccessGroupsUidEmails
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
$ref: '#/components/schemas/email'
required:
- email
additionalProperties: false
required: true
parameters:
- schema:
$ref: '#/components/schemas/nanoid'
in: path
name: uid
required: true
/v1/access-groups/{uid}/domains:
post:
tags:
- access-groups
description: Adds a new domain to an access group
operationId: postv1AccessGroupsUidDomains
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
domain:
$ref: '#/components/schemas/email-domain'
required:
- domain
additionalProperties: false
required: true
parameters:
- schema:
$ref: '#/components/schemas/nanoid'
in: path
name: uid
required: true
delete:
tags:
- access-groups
description: Removes an existing domain from an access group
operationId: deletev1AccessGroupsUidDomains
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
domain:
$ref: '#/components/schemas/email-domain'
required:
- domain
additionalProperties: false
required: true
parameters:
- schema:
$ref: '#/components/schemas/nanoid'
in: path
name: uid
required: true
components:
schemas:
access-group-name:
type: string
maxLength: 40
email-domain:
type: string
maxLength: 253
pattern: ^([A-Za-z0-9]+(-[A-Za-z0-9]+)*\.)+[A-Za-z]{2,}$
access-group:
type: object
properties:
uid:
default: nanoid()
$ref: '#/components/schemas/nanoid'
createdAt:
default: unixTimestamp()
$ref: '#/components/schemas/timestamp'
updatedAt:
default: unixTimestamp()
$ref: '#/components/schemas/timestamp'
name:
default: ''
$ref: '#/components/schemas/access-group-name'
slug:
default: randomAccessGroupSlug()
$ref: '#/components/schemas/slug'
allowedEmails:
default: []
allowedDomains:
default: []
required:
- uid
- createdAt
- updatedAt
- name
- slug
- allowedEmails
- allowedDomains
additionalProperties: false
nanoid:
type: string
minLength: 5
'404':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
'401':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
slug:
type: string
minLength: 3
maxLength: 60
pattern: ^[a-z](?:[a-z0-9-]*[a-z0-9])?$
'500':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
email:
type: string
format: email
pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
'400':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
'403':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
timestamp:
type: integer
minimum: 0
maximum: 9007199254740991
'422':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT