mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 11:24:35 +00:00
1112 lines
38 KiB
YAML
1112 lines
38 KiB
YAML
components:
|
|
examples: {}
|
|
headers: {}
|
|
parameters: {}
|
|
requestBodies: {}
|
|
responses: {}
|
|
schemas:
|
|
AuthorizeResponse:
|
|
properties:
|
|
code:
|
|
type: string
|
|
description: 'Authorization code'
|
|
example: someRandomCryptoString
|
|
required:
|
|
- code
|
|
type: object
|
|
additionalProperties: false
|
|
AuthorizePayload:
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: 'Username for user'
|
|
example: secretuser
|
|
password:
|
|
type: string
|
|
description: 'Password for user'
|
|
example: secretpassword
|
|
clientId:
|
|
type: string
|
|
description: 'Client ID'
|
|
example: clientID1
|
|
required:
|
|
- username
|
|
- password
|
|
- clientId
|
|
type: object
|
|
additionalProperties: false
|
|
TokenResponse:
|
|
properties:
|
|
accessToken:
|
|
type: string
|
|
description: 'Access Token'
|
|
example: someRandomCryptoString
|
|
refreshToken:
|
|
type: string
|
|
description: 'Refresh Token'
|
|
example: someRandomCryptoString
|
|
required:
|
|
- accessToken
|
|
- refreshToken
|
|
type: object
|
|
additionalProperties: false
|
|
TokenPayload:
|
|
properties:
|
|
clientId:
|
|
type: string
|
|
description: 'Client ID'
|
|
example: clientID1
|
|
code:
|
|
type: string
|
|
description: 'Authorization code'
|
|
example: someRandomCryptoString
|
|
required:
|
|
- clientId
|
|
- code
|
|
type: object
|
|
additionalProperties: false
|
|
InfoJWT:
|
|
properties:
|
|
clientId:
|
|
type: string
|
|
userId:
|
|
type: number
|
|
format: double
|
|
required:
|
|
- clientId
|
|
- userId
|
|
type: object
|
|
additionalProperties: false
|
|
ClientPayload:
|
|
properties:
|
|
clientId:
|
|
type: string
|
|
description: 'Client ID'
|
|
example: someFormattedClientID1234
|
|
clientSecret:
|
|
type: string
|
|
description: 'Client Secret'
|
|
example: someRandomCryptoString
|
|
required:
|
|
- clientId
|
|
- clientSecret
|
|
type: object
|
|
additionalProperties: false
|
|
ExecuteSASCodePayload:
|
|
properties:
|
|
code:
|
|
type: string
|
|
description: 'Code of SAS program'
|
|
example: '* SAS Code HERE;'
|
|
required:
|
|
- code
|
|
type: object
|
|
additionalProperties: false
|
|
MemberType.folder:
|
|
enum:
|
|
- folder
|
|
type: string
|
|
FolderMember:
|
|
properties:
|
|
name:
|
|
type: string
|
|
type:
|
|
$ref: '#/components/schemas/MemberType.folder'
|
|
members:
|
|
items:
|
|
anyOf:
|
|
-
|
|
$ref: '#/components/schemas/FolderMember'
|
|
-
|
|
$ref: '#/components/schemas/ServiceMember'
|
|
type: array
|
|
required:
|
|
- name
|
|
- type
|
|
- members
|
|
type: object
|
|
additionalProperties: false
|
|
MemberType.service:
|
|
enum:
|
|
- service
|
|
type: string
|
|
ServiceMember:
|
|
properties:
|
|
name:
|
|
type: string
|
|
type:
|
|
$ref: '#/components/schemas/MemberType.service'
|
|
code:
|
|
type: string
|
|
required:
|
|
- name
|
|
- type
|
|
- code
|
|
type: object
|
|
additionalProperties: false
|
|
FileTree:
|
|
properties:
|
|
members:
|
|
items:
|
|
anyOf:
|
|
-
|
|
$ref: '#/components/schemas/FolderMember'
|
|
-
|
|
$ref: '#/components/schemas/ServiceMember'
|
|
type: array
|
|
required:
|
|
- members
|
|
type: object
|
|
additionalProperties: false
|
|
DeployResponse:
|
|
properties:
|
|
status:
|
|
type: string
|
|
message:
|
|
type: string
|
|
example:
|
|
$ref: '#/components/schemas/FileTree'
|
|
required:
|
|
- status
|
|
- message
|
|
type: object
|
|
additionalProperties: false
|
|
DeployPayload:
|
|
properties:
|
|
appLoc:
|
|
type: string
|
|
fileTree:
|
|
$ref: '#/components/schemas/FileTree'
|
|
required:
|
|
- fileTree
|
|
type: object
|
|
additionalProperties: false
|
|
GetFileResponse:
|
|
properties:
|
|
status:
|
|
type: string
|
|
fileContent:
|
|
type: string
|
|
message:
|
|
type: string
|
|
required:
|
|
- status
|
|
type: object
|
|
additionalProperties: false
|
|
UpdateFileResponse:
|
|
properties:
|
|
status:
|
|
type: string
|
|
message:
|
|
type: string
|
|
required:
|
|
- status
|
|
type: object
|
|
additionalProperties: false
|
|
FilePayload:
|
|
properties:
|
|
filePath:
|
|
type: string
|
|
description: 'Path of the file'
|
|
example: /Public/somefolder/some.file
|
|
fileContent:
|
|
type: string
|
|
description: 'Contents of the file'
|
|
example: 'Contents of the File'
|
|
required:
|
|
- filePath
|
|
- fileContent
|
|
type: object
|
|
additionalProperties: false
|
|
TreeNode:
|
|
properties:
|
|
name:
|
|
type: string
|
|
relativePath:
|
|
type: string
|
|
absolutePath:
|
|
type: string
|
|
children:
|
|
items:
|
|
$ref: '#/components/schemas/TreeNode'
|
|
type: array
|
|
required:
|
|
- name
|
|
- relativePath
|
|
- absolutePath
|
|
- children
|
|
type: object
|
|
additionalProperties: false
|
|
GetFileTreeResponse:
|
|
properties:
|
|
status:
|
|
type: string
|
|
tree:
|
|
$ref: '#/components/schemas/TreeNode'
|
|
required:
|
|
- status
|
|
- tree
|
|
type: object
|
|
additionalProperties: false
|
|
UserResponse:
|
|
properties:
|
|
id:
|
|
type: number
|
|
format: double
|
|
username:
|
|
type: string
|
|
displayName:
|
|
type: string
|
|
required:
|
|
- id
|
|
- username
|
|
- displayName
|
|
type: object
|
|
additionalProperties: false
|
|
UserDetailsResponse:
|
|
properties:
|
|
id:
|
|
type: number
|
|
format: double
|
|
displayName:
|
|
type: string
|
|
username:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
isAdmin:
|
|
type: boolean
|
|
required:
|
|
- id
|
|
- displayName
|
|
- username
|
|
- isActive
|
|
- isAdmin
|
|
type: object
|
|
additionalProperties: false
|
|
UserPayload:
|
|
properties:
|
|
displayName:
|
|
type: string
|
|
description: 'Display name for user'
|
|
example: 'John Snow'
|
|
username:
|
|
type: string
|
|
description: 'Username for user'
|
|
example: johnSnow01
|
|
password:
|
|
type: string
|
|
description: 'Password for user'
|
|
isAdmin:
|
|
type: boolean
|
|
description: 'Account should be admin or not, defaults to false'
|
|
example: 'false'
|
|
isActive:
|
|
type: boolean
|
|
description: 'Account should be active or not, defaults to true'
|
|
example: 'true'
|
|
required:
|
|
- displayName
|
|
- username
|
|
- password
|
|
type: object
|
|
additionalProperties: false
|
|
GroupResponse:
|
|
properties:
|
|
groupId:
|
|
type: number
|
|
format: double
|
|
name:
|
|
type: string
|
|
description:
|
|
type: string
|
|
required:
|
|
- groupId
|
|
- name
|
|
- description
|
|
type: object
|
|
additionalProperties: false
|
|
GroupDetailsResponse:
|
|
properties:
|
|
groupId:
|
|
type: number
|
|
format: double
|
|
name:
|
|
type: string
|
|
description:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
users:
|
|
items:
|
|
$ref: '#/components/schemas/UserResponse'
|
|
type: array
|
|
required:
|
|
- groupId
|
|
- name
|
|
- description
|
|
- isActive
|
|
- users
|
|
type: object
|
|
additionalProperties: false
|
|
GroupPayload:
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: 'Name of the group'
|
|
example: DCGroup
|
|
description:
|
|
type: string
|
|
description: 'Description of the group'
|
|
example: 'This group represents Data Controller Users'
|
|
isActive:
|
|
type: boolean
|
|
description: 'Group should be active or not, defaults to true'
|
|
example: 'true'
|
|
required:
|
|
- name
|
|
- description
|
|
type: object
|
|
additionalProperties: false
|
|
ExecuteReturnJsonResponse:
|
|
properties:
|
|
status:
|
|
type: string
|
|
_webout:
|
|
type: string
|
|
log:
|
|
type: string
|
|
message:
|
|
type: string
|
|
required:
|
|
- status
|
|
- _webout
|
|
type: object
|
|
additionalProperties: false
|
|
ExecuteReturnJsonPayload:
|
|
properties:
|
|
_program:
|
|
type: string
|
|
description: 'Location of SAS program'
|
|
example: /Public/somefolder/some.file
|
|
type: object
|
|
additionalProperties: false
|
|
securitySchemes:
|
|
bearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
info:
|
|
title: api
|
|
version: 0.0.1
|
|
description: 'Api of SASjs server'
|
|
contact:
|
|
name: 'Analytium Ltd'
|
|
openapi: 3.0.0
|
|
paths:
|
|
/SASjsApi/auth/authorize:
|
|
post:
|
|
operationId: Authorize
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AuthorizeResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {code: someRandomCryptoString}
|
|
summary: 'Accept a valid username/password, plus a CLIENT_ID, and return an AUTH_CODE'
|
|
tags:
|
|
- Auth
|
|
security: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AuthorizePayload'
|
|
/SASjsApi/auth/token:
|
|
post:
|
|
operationId: Token
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/TokenResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {accessToken: someRandomCryptoString, refreshToken: someRandomCryptoString}
|
|
summary: 'Accepts client/auth code and returns access/refresh tokens'
|
|
tags:
|
|
- Auth
|
|
security: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/TokenPayload'
|
|
/SASjsApi/auth/refresh:
|
|
post:
|
|
operationId: Refresh
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/TokenResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {accessToken: someRandomCryptoString, refreshToken: someRandomCryptoString}
|
|
summary: 'Returns new access/refresh tokens'
|
|
tags:
|
|
- Auth
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
/SASjsApi/auth/logout:
|
|
post:
|
|
operationId: Logout
|
|
responses:
|
|
'204':
|
|
description: 'No content'
|
|
summary: 'Logout terminate access/refresh tokens and returns nothing'
|
|
tags:
|
|
- Auth
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
/SASjsApi/client:
|
|
post:
|
|
operationId: CreateClient
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ClientPayload'
|
|
examples:
|
|
'Example 1':
|
|
value: {clientId: someFormattedClientID1234, clientSecret: someRandomCryptoString}
|
|
summary: 'Create client with the following attributes: ClientId, ClientSecret. Admin only task.'
|
|
tags:
|
|
- Client
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ClientPayload'
|
|
/SASjsApi/code/execute:
|
|
post:
|
|
operationId: ExecuteSASCode
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: string
|
|
description: 'Execute SAS code.'
|
|
summary: 'Run SAS Code and returns log'
|
|
tags:
|
|
- CODE
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ExecuteSASCodePayload'
|
|
/SASjsApi/drive/deploy:
|
|
post:
|
|
operationId: Deploy
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DeployResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: success, message: 'Files deployed successfully to @sasjs/server.'}
|
|
'400':
|
|
description: 'Invalid Format'
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DeployResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: failure, message: 'Provided not supported data format.'}
|
|
'500':
|
|
description: 'Execution Error'
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DeployResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: failure, message: 'Deployment failed!'}
|
|
summary: 'Creates/updates files within SASjs Drive using provided payload.'
|
|
tags:
|
|
- Drive
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DeployPayload'
|
|
/SASjsApi/drive/file:
|
|
get:
|
|
operationId: GetFile
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GetFileResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: success, fileContent: 'Contents of the File'}
|
|
'400':
|
|
description: 'Unable to get File'
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GetFileResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: failure, message: 'File request failed.'}
|
|
summary: 'Get file from SASjs Drive'
|
|
tags:
|
|
- Drive
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
in: query
|
|
name: filePath
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: /Public/somefolder/some.file
|
|
post:
|
|
operationId: SaveFile
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UpdateFileResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: success}
|
|
'400':
|
|
description: 'File already exists'
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UpdateFileResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: failure, message: 'File request failed.'}
|
|
summary: 'Create a file in SASjs Drive'
|
|
tags:
|
|
- Drive
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/FilePayload'
|
|
patch:
|
|
operationId: UpdateFile
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UpdateFileResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: success}
|
|
'400':
|
|
description: 'Unable to get File'
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UpdateFileResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {status: failure, message: 'File request failed.'}
|
|
summary: 'Modify a file in SASjs Drive'
|
|
tags:
|
|
- Drive
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/FilePayload'
|
|
/SASjsApi/drive/filetree:
|
|
get:
|
|
operationId: GetFileTree
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GetFileTreeResponse'
|
|
summary: 'Fetch file tree within SASjs Drive.'
|
|
tags:
|
|
- Drive
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
/SASjsApi/user:
|
|
get:
|
|
operationId: GetAllUsers
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
items:
|
|
$ref: '#/components/schemas/UserResponse'
|
|
type: array
|
|
examples:
|
|
'Example 1':
|
|
value: [{id: 123, username: johnusername, displayName: John}, {id: 456, username: starkusername, displayName: Stark}]
|
|
summary: 'Get list of all users (username, displayname). All users can request this.'
|
|
tags:
|
|
- User
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
post:
|
|
operationId: CreateUser
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserDetailsResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {id: 1234, displayName: 'John Snow', username: johnSnow01, isAdmin: false, isActive: true}
|
|
summary: 'Create user with the following attributes: UserId, UserName, Password, isAdmin, isActive. Admin only task.'
|
|
tags:
|
|
- User
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserPayload'
|
|
'/SASjsApi/user/{userId}':
|
|
get:
|
|
operationId: GetUser
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserDetailsResponse'
|
|
summary: 'Get user properties - such as group memberships, userName, displayName.'
|
|
tags:
|
|
- User
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The user''s identifier'
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: 1234
|
|
patch:
|
|
operationId: UpdateUser
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserDetailsResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {id: 1234, displayName: 'John Snow', username: johnSnow01, isAdmin: false, isActive: true}
|
|
summary: 'Update user properties - such as displayName. Can be performed either by admins, or the user in question.'
|
|
tags:
|
|
- User
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The user''s identifier'
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: '1234'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserPayload'
|
|
delete:
|
|
operationId: DeleteUser
|
|
responses:
|
|
'204':
|
|
description: 'No content'
|
|
summary: 'Delete a user. Can be performed either by admins, or the user in question.'
|
|
tags:
|
|
- User
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The user''s identifier'
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: 1234
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
password:
|
|
type: string
|
|
type: object
|
|
/SASjsApi/group:
|
|
get:
|
|
operationId: GetAllGroups
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
items:
|
|
$ref: '#/components/schemas/GroupResponse'
|
|
type: array
|
|
examples:
|
|
'Example 1':
|
|
value: [{groupId: 123, name: DCGroup, description: 'This group represents Data Controller Users'}]
|
|
summary: 'Get list of all groups (groupName and groupDescription). All users can request this.'
|
|
tags:
|
|
- Group
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
post:
|
|
operationId: CreateGroup
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GroupDetailsResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {groupId: 123, name: DCGroup, description: 'This group represents Data Controller Users', isActive: true, users: []}
|
|
summary: 'Create a new group. Admin only.'
|
|
tags:
|
|
- Group
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GroupPayload'
|
|
'/SASjsApi/group/{groupId}':
|
|
get:
|
|
operationId: GetGroup
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GroupDetailsResponse'
|
|
summary: 'Get list of members of a group (userName). All users can request this.'
|
|
tags:
|
|
- Group
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The group''s identifier'
|
|
in: path
|
|
name: groupId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: 1234
|
|
delete:
|
|
operationId: DeleteGroup
|
|
responses:
|
|
'204':
|
|
description: 'No content'
|
|
summary: 'Delete a group. Admin task only.'
|
|
tags:
|
|
- Group
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The group''s identifier'
|
|
in: path
|
|
name: groupId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: 1234
|
|
'/SASjsApi/group/{groupId}/{userId}':
|
|
post:
|
|
operationId: AddUserToGroup
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GroupDetailsResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {groupId: 123, name: DCGroup, description: 'This group represents Data Controller Users', isActive: true, users: []}
|
|
summary: 'Add a user to a group. Admin task only.'
|
|
tags:
|
|
- Group
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The group''s identifier'
|
|
in: path
|
|
name: groupId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: '1234'
|
|
-
|
|
description: 'The user''s identifier'
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: '6789'
|
|
delete:
|
|
operationId: RemoveUserFromGroup
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GroupDetailsResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {groupId: 123, name: DCGroup, description: 'This group represents Data Controller Users', isActive: true, users: []}
|
|
summary: 'Remove a user to a group. Admin task only.'
|
|
tags:
|
|
- Group
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
description: 'The group''s identifier'
|
|
in: path
|
|
name: groupId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: '1234'
|
|
-
|
|
description: 'The user''s identifier'
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
schema:
|
|
format: double
|
|
type: number
|
|
example: '6789'
|
|
/SASjsApi/session:
|
|
get:
|
|
operationId: Session
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserResponse'
|
|
examples:
|
|
'Example 1':
|
|
value: {id: 123, username: johnusername, displayName: John}
|
|
summary: 'Get session info (username).'
|
|
tags:
|
|
- Session
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters: []
|
|
/SASjsApi/stp/execute:
|
|
get:
|
|
operationId: ExecuteReturnRaw
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: string
|
|
description: "Trigger a SAS program using it's location in the _program parameter.\nEnable debugging using the _debug parameter.\nAdditional URL parameters are turned into SAS macro variables.\nAny files provided are placed into the session and\ncorresponding _WEBIN_XXX variables are created."
|
|
summary: 'Execute Stored Program, return raw content'
|
|
tags:
|
|
- STP
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
in: query
|
|
name: _program
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: /Public/somefolder/some.file
|
|
post:
|
|
operationId: ExecuteReturnJson
|
|
responses:
|
|
'200':
|
|
description: Ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ExecuteReturnJsonResponse'
|
|
description: "Trigger a SAS program using it's location in the _program parameter.\nEnable debugging using the _debug parameter.\nAdditional URL parameters are turned into SAS macro variables.\nAny files provided are placed into the session and\ncorresponding _WEBIN_XXX variables are created."
|
|
summary: 'Execute Stored Program, return JSON'
|
|
tags:
|
|
- STP
|
|
security:
|
|
-
|
|
bearerAuth: []
|
|
parameters:
|
|
-
|
|
in: query
|
|
name: _program
|
|
required: false
|
|
schema:
|
|
type: string
|
|
example: /Public/somefolder/some.file
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ExecuteReturnJsonPayload'
|
|
servers:
|
|
-
|
|
url: /
|
|
tags:
|
|
-
|
|
name: Session
|
|
description: 'Get Session information'
|
|
-
|
|
name: User
|
|
description: 'Operations about users'
|
|
-
|
|
name: Client
|
|
description: 'Operations about clients'
|
|
-
|
|
name: Auth
|
|
description: 'Operations about auth'
|
|
-
|
|
name: Drive
|
|
description: 'Operations about drive'
|
|
-
|
|
name: Group
|
|
description: 'Operations about group'
|
|
-
|
|
name: STP
|
|
description: 'Operations about STP'
|
|
-
|
|
name: CODE
|
|
description: 'Operations on SAS code'
|