add scalar as an app
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2026-01-09 10:33:58 +00:00
parent 8b9b6e798a
commit d6cafc67b2
17 changed files with 5502 additions and 0 deletions

685
scalar/apidocs/admin.json Normal file
View File

@@ -0,0 +1,685 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - Administration Services",
"description": "Administration Services provide APIs that give information about RSE API and the runtime environment of the RSE API server. To use the APIs, the authenticated user must authenticate to localhost and have the administrator role or have *ALLOBJ special authority.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "Administration Services",
"description": "Administration Services provide APIs that give information about RSE API and the runtime environment of the RSE API server. To use the APIs, the authenticated user must authenticate to localhost and have the administrator role or have *ALLOBJ special authority."
}
],
"paths": {
"/v1/admin/memory": {
"get": {
"tags": ["Administration Services"],
"summary": "Get information about server memory usage.",
"description": "Get information about the JVM memory usage of the server running RSE API.",
"operationId": "adminGetMemoryUsage",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"jvmFreeMemory": 17428920,
"jvmMaxMemory": 4294967296,
"jvmTotalMemory": 78249984
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/admin/settings": {
"get": {
"tags": ["Administration Services"],
"summary": "Get the general settings being used for RSE API.",
"description": "The settings are global in nature and include settings for tuning, environment, and administrator override categories.",
"operationId": "adminGetSettings",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"adminUsers": ["USER1", "USER2"],
"includeUsers": ["USER1", "USER2"],
"excludeUsers": [],
"maxFileSize": 3072000,
"maxSessionInactivity": 7200,
"maxSessionLifetime": 21600,
"maxSessionUseCount": 1000,
"maxSessionWaitTime": 300,
"maxSessions": 100,
"maxSessionsPerUser": 20,
"sessionCleanupInterval": 300
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
},
"post": {
"tags": ["Administration Services"],
"summary": "Set settings for RSE API.",
"description": "The settings are global in nature and include settings for tuning, environment, and administrator override categories.",
"operationId": "adminSetSettings",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "The settings for RSE API.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rest4i_Settings"
},
"example": {
"persist": false,
"adminUsers": ["USER1", "USER2"],
"includeUsers": ["USER1", "USER2"],
"excludeUsers": [],
"maxFileSize": 3072000,
"maxSessionInactivity": 7200,
"maxSessionLifetime": 21600,
"maxSessionUseCount": 1000,
"maxSessionWaitTime": 300,
"maxSessions": 100,
"maxSessionsPerUser": 20,
"sessionCleanupInterval": 300
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Successful request, no content."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/admin/environment": {
"get": {
"tags": ["Administration Services"],
"summary": "Get information about server environment.",
"description": "Get information about server environment, such as host, operating system, Java version, and port.",
"operationId": "adminGetEnvironment",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"rest4iBasepath": "rest4i",
"rest4iHostname": "UT30P44",
"rest4iPort": 2012,
"rest4iVersion": "1.0.6",
"osName": "OS/400",
"osVersion": "V7R5M0",
"javaVersion": "1.8.0_351"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/admin/serverinfo": {
"get": {
"tags": ["Administration Services"],
"summary": "Get server information.",
"description": "Get basic server information including hostname, port, version, and base path.",
"operationId": "adminGetServerInfo",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"rest4iBasepath": "rest4i",
"rest4iHostname": "UT30P44",
"rest4iPort": 2012,
"rest4iVersion": "1.0.6"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/admin/sessions": {
"get": {
"tags": ["Administration Services"],
"summary": "Get information about sessions.",
"description": "Get information about sessions. The information that is returned applies to active sessions on the server. Active sessions may include sessions that are expired but have not been reclaimed by RSE API.",
"operationId": "adminGetSessions",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"totalSessions": 3,
"sessions": [
{
"userid": "USER1",
"sessionCount": 1
},
{
"userid": "USER2",
"sessionCount": 2
}
]
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
},
"delete": {
"tags": ["Administration Services"],
"summary": "Delete sessions.",
"description": "Delete sessions. You can delete all active sessions or only sessions tied to a user ID. Sessions that are deleted are marked as expired.",
"operationId": "adminClearSessions",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "user",
"in": "query",
"description": "The session(s) to delete. Specify the user ID to delete all sessions created by the user, or the special value of *ALL to delete all sessions for all users.",
"schema": {
"type": "string",
"default": "*ALL"
}
}
],
"responses": {
"204": {
"description": "Successful request, no content."
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
}
},
"components": {
"schemas": {
"rest4i_Settings": {
"type": "object",
"properties": {
"persist": {
"type": "boolean",
"description": "Save settings to property file in persistent storage (hard disk).",
"default": false
},
"adminUsers": {
"type": "array",
"description": "User IDs that will be designated as an RSE API administrator.",
"items": {
"type": "string"
}
},
"includeUsers": {
"type": "array",
"description": "User IDs allowed to use RSE API.",
"items": {
"type": "string"
}
},
"excludeUsers": {
"type": "array",
"description": "User IDs not allowed to use RSE API.",
"items": {
"type": "string"
}
},
"maxFileSize": {
"maximum": 15360000,
"minimum": 0,
"type": "integer",
"description": "Maximum size of IFS file data that can be processed (reading or writing) by RSE API.",
"format": "int64",
"default": 3072000
},
"maxSessions": {
"minimum": -1,
"type": "integer",
"description": "Maximum number of total sessions. The value of -1 indicates there is no limit.",
"format": "int64",
"default": 100
},
"maxSessionsPerUser": {
"type": "integer",
"description": "Maximum number of sessions allowed on a per-user basis. The value of -1 indicates there is no limit.",
"format": "int64",
"default": 20
},
"maxSessionInactivity": {
"maximum": 7200,
"minimum": 30,
"type": "integer",
"description": "Maximum amount of inactive time, in seconds, before an available session is invalidated.",
"format": "int64",
"default": 7200
},
"maxSessionLifetime": {
"type": "integer",
"description": "Maximum life, in seconds, for a session. The value of -1 indicates there is no limit.",
"format": "int64",
"default": -1
},
"maxSessionUseCount": {
"type": "integer",
"description": "Maximum number of times a session can be used before it is invalidated. The value of -1 indicates there is no limit.",
"format": "int64",
"default": -1
},
"maxSessionWaitTime": {
"minimum": -1,
"type": "integer",
"description": "Maximum time, in seconds, to wait on a session to become available. The value of -1 indicates there is no limit.",
"format": "int64",
"default": 300
},
"sessionCleanupInterval": {
"maximum": 900,
"minimum": 30,
"type": "integer",
"description": "The time interval, in seconds, for how often the session maintenance daemon is run.",
"format": "int64",
"default": 300
}
},
"description": "Global settings for RSE API."
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

351
scalar/apidocs/cl.json Normal file
View File

@@ -0,0 +1,351 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - CL Command Services",
"description": "CL Command Services provide APIs for running CL commands.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "CL Command Services",
"description": "CL Command Services provide APIs for running CL commands."
}
],
"paths": {
"/v1/cl": {
"post": {
"tags": ["CL Command Services"],
"summary": "Run one or more CL commands on the server.",
"description": "Run one or more CL commands on the server. Accepts both JSON and form-urlencoded content types. If a command fails, any messages relating to the error is returned. If the command succeeds, no data is returned.",
"operationId": "clRunCLCommand",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "List of CL commands to run.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rest4i_CLCommands"
},
"example": {
"continueOnError": true,
"includeMessageOnSuccess": true,
"includeMessageHelpText": false,
"clCommands": [
"qsys/crtlib lib1",
"qsys/crtsrcpf lib1/qrpglesrc"
]
}
},
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"continueOnError": {
"type": "boolean",
"description": "Continue processing if error encountered",
"default": false
},
"includeMessageOnSuccess": {
"type": "boolean",
"description": "Return messages on success",
"default": false
},
"includeMessageHelpText": {
"type": "boolean",
"description": "Return message help text",
"default": false
},
"clCommands": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of CL command strings to execute"
}
},
"required": ["clCommands"]
}
}
}
},
"responses": {
"200": {
"description": "Command(s) issued successfully, error(s) may have occurred.",
"content": {
"application/json": {
"example": {
"totalIssued": 2,
"totalSuccesses": 1,
"totalFailures": 1,
"commandOutputList": [
{
"success": false,
"command": "qsys/crtlib lib1",
"output": ["CPF2111: Library LIB1 already exists."]
},
{
"success": true,
"command": "qsys/crtsrcpf lib1/qrpglesrc",
"output": ["CPC7301: File QRPGLESRC created in library LIB1."]
}
]
}
}
}
},
"204": {
"description": "All command(s) issued successfully, no content."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/cl/{commandname}": {
"get": {
"tags": ["CL Command Services"],
"summary": "Retrieves the command definition for the specified CL command.",
"description": "Retrieves the command definition for the specified CL command. The command definition is returned as an XML document. The generated command information XML source is called Command Definition Markup Language or CDML. See the Document Type Definition (DTD) in /QIBM/XML/DTD/QcdCLCmd.dtd for the definition of the CDML tag language returned by this API.",
"operationId": "clGetCommandDefinition",
"parameters": [
{
"name": "Authorization",
"in": "header",
"schema": {
"type": "string"
}
},
{
"name": "library",
"in": "query",
"description": "The library name. Valid values are a specific name, or one of the following special values: *CURLIB - The current library is searched. *LIBL - The library list is searched. This is the default.",
"schema": {
"type": "string",
"default": "*LIBL"
}
},
{
"name": "ignorecase",
"in": "query",
"description": "Boolean indicating whether case should be ignored. The default value is 'true'. If set to 'false', the library and command name will not be uppercased.",
"schema": {
"type": "boolean",
"default": true
}
},
{
"name": "commandname",
"in": "path",
"description": "The CL command name.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"definition": "<QcdCLCmd DTDVersion=\"1.0\">...</QcdCLCmd>"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "The specified resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
}
},
"components": {
"schemas": {
"rest4i_CLCommands": {
"required": ["clCommands"],
"type": "object",
"properties": {
"continueOnError": {
"type": "boolean",
"description": "Continue processing CL commands if an error is encountered.",
"default": false
},
"includeMessageOnSuccess": {
"type": "boolean",
"description": "Return CL command messages on success.",
"default": false
},
"includeMessageHelpText": {
"type": "boolean",
"description": "Return message help text for CL command messages.",
"default": false
},
"clCommands": {
"type": "array",
"description": "CL command to run.",
"items": {
"type": "string"
}
}
},
"description": "List of CL commands to run."
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

View File

@@ -0,0 +1,394 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - Database Services",
"description": "Enhanced database services with connection pooling and multiple output formats. Execute SQL queries with support for JSON, XML, CSV, HTML, and Excel output formats.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "Database Services",
"description": "Enhanced database services with connection pooling and multiple output formats."
}
],
"paths": {
"/v1/database/query": {
"post": {
"tags": ["Database Services"],
"summary": "Execute SQL query with multiple output formats",
"description": "Execute a SQL query against the IBM i database with support for multiple output formats including JSON, XML, CSV, HTML, and Excel.",
"operationId": "executeQuery",
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
],
"requestBody": {
"description": "The SQL query and formatting options",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatabaseQueryRequest"
},
"example": {
"sql": "SELECT * FROM QSYS2.SYSTABLES FETCH FIRST 10 ROWS ONLY",
"format": "json",
"treatWarningsAsErrors": false,
"alwaysReturnSQLStateInformation": false
}
}
}
},
"responses": {
"200": {
"description": "SQL query executed successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiResponse"
},
"example": {
"success": true,
"data": {
"rowCount": 2,
"data": [
{
"TABLE_SCHEMA": "QSYS2",
"TABLE_NAME": "SYSTABLES",
"TABLE_TYPE": "SYSTEM TABLE"
}
]
},
"message": "Query executed successfully",
"timestamp": "2024-01-15T10:30:00Z"
}
},
"application/xml": {
"example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><result><success>true</success><data><row><TABLE_SCHEMA>QSYS2</TABLE_SCHEMA></row></data></result>"
},
"text/csv": {
"example": "TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE\n\"QSYS2\",\"SYSTABLES\",\"SYSTEM TABLE\""
}
}
},
"400": {
"description": "Bad request - invalid SQL or parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiResponse"
},
"example": {
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"timestamp": "2024-01-15T10:30:00Z",
"validationErrors": [
{
"field": "sql",
"message": "SQL query is required"
}
]
}
}
}
}
},
"401": {
"description": "Unauthorized request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "Forbidden - dangerous SQL detected",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
},
"get": {
"tags": ["Database Services"],
"summary": "Execute SQL query via GET with multiple output formats",
"description": "Execute a SQL query via GET request with support for multiple output formats.",
"operationId": "executeQueryGet",
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
],
"parameters": [
{
"name": "sql",
"in": "query",
"description": "The SQL query to execute",
"required": true,
"schema": {
"type": "string"
},
"example": "SELECT * FROM QSYS2.SYSTABLES FETCH FIRST 10 ROWS ONLY"
},
{
"name": "format",
"in": "query",
"description": "Output format: json, xml, csv, html, excel",
"schema": {
"type": "string",
"enum": ["json", "xml", "csv", "html", "excel"],
"default": "json"
}
}
],
"responses": {
"200": {
"description": "SQL query executed successfully"
},
"400": {
"description": "Bad request - invalid SQL or parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "Forbidden - dangerous SQL detected",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"DatabaseQueryRequest": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The SQL query to execute",
"example": "SELECT * FROM QSYS2.SYSTABLES FETCH FIRST 10 ROWS ONLY"
},
"format": {
"type": "string",
"enum": ["json", "xml", "csv", "html", "excel"],
"default": "json",
"description": "Output format for the query results"
},
"treatWarningsAsErrors": {
"type": "boolean",
"default": false,
"description": "Whether to treat SQL warnings as errors"
},
"alwaysReturnSQLStateInformation": {
"type": "boolean",
"default": false,
"description": "Whether to always return SQL state information"
}
},
"required": ["sql"]
},
"ApiResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Indicates if the operation was successful"
},
"data": {
"description": "The response data (varies by endpoint)"
},
"error": {
"$ref": "#/components/schemas/ErrorInfo"
},
"pagination": {
"$ref": "#/components/schemas/PaginationInfo"
},
"message": {
"type": "string",
"description": "Success or informational message"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO-8601 formatted timestamp of the response"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "Additional metadata about the response"
}
},
"required": ["success", "timestamp"]
},
"ErrorInfo": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Error code identifying the type of error"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"details": {
"type": "string",
"description": "Additional error details"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO-8601 formatted timestamp when error occurred"
},
"validationErrors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"description": "List of validation errors if applicable"
}
},
"required": ["code", "message"]
},
"ValidationError": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "The field that failed validation"
},
"message": {
"type": "string",
"description": "The validation error message"
},
"rejectedValue": {
"description": "The value that was rejected during validation"
}
},
"required": ["field", "message"]
},
"PaginationInfo": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "Current page number (0-based)"
},
"size": {
"type": "integer",
"description": "Number of elements per page"
},
"totalPages": {
"type": "integer",
"description": "Total number of pages"
},
"totalElements": {
"type": "integer",
"format": "int64",
"description": "Total number of elements across all pages"
}
}
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

404
scalar/apidocs/files.json Normal file
View File

@@ -0,0 +1,404 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - File Operations Services",
"description": "Enhanced file operations services supporting both IFS and SMB file operations with improved error handling and response formatting.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "File Operations Services",
"description": "Enhanced file operations services supporting both IFS and SMB file operations."
}
],
"paths": {
"/v1/files/list": {
"get": {
"tags": ["File Operations Services"],
"summary": "List directory contents",
"description": "List files and directories at specified path using SMB/CIFS or IFS",
"operationId": "listFiles",
"parameters": [
{
"name": "path",
"in": "query",
"required": true,
"description": "Directory path to list",
"schema": {
"type": "string"
},
"example": "/home/user/documents"
}
],
"responses": {
"200": {
"description": "Directory listing successful",
"content": {
"application/json": {
"example": {
"success": true,
"data": {
"path": "/home/user/documents",
"files": [
{
"name": "report.pdf",
"size": 102400,
"isDirectory": false
},
{
"name": "archive",
"size": 0,
"isDirectory": true
}
]
}
}
}
}
}
}
}
},
"/v1/files/download": {
"get": {
"tags": ["File Operations Services"],
"summary": "Download a file",
"description": "Downloads a file from the specified SMB path.",
"operationId": "downloadFile",
"parameters": [
{
"name": "path",
"in": "query",
"required": true,
"description": "The SMB path to the file",
"schema": {
"type": "string"
}
},
{
"name": "domain",
"in": "query",
"description": "SMB domain",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "query",
"description": "SMB username",
"schema": {
"type": "string"
}
},
{
"name": "password",
"in": "query",
"description": "SMB password",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "File downloaded successfully",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Bad request - path parameter required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "File not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
},
"/v1/files/upload": {
"post": {
"tags": ["File Operations Services"],
"summary": "Upload a file",
"description": "Uploads a file to the specified SMB path.",
"operationId": "uploadFile",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadRequest"
}
}
}
},
"responses": {
"200": {
"description": "File uploaded successfully",
"content": {
"application/json": {
"example": {
"success": true,
"message": "File uploaded successfully",
"folder": "/upload/path",
"filename": "document.pdf"
}
}
}
},
"400": {
"description": "Bad request - missing required parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
},
"/v1/files/zip": {
"get": {
"tags": ["File Operations Services"],
"summary": "Zip directory contents",
"description": "Creates a ZIP archive of all files in the specified directory.",
"operationId": "zipDirectory",
"parameters": [
{
"name": "path",
"in": "query",
"required": true,
"description": "The SMB path to the directory",
"schema": {
"type": "string"
}
},
{
"name": "domain",
"in": "query",
"description": "SMB domain",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "query",
"description": "SMB username",
"schema": {
"type": "string"
}
},
{
"name": "password",
"in": "query",
"description": "SMB password",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Directory zipped successfully",
"content": {
"application/zip": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Bad request - path parameter required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "Directory not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
},
"/v1/files/exists": {
"get": {
"tags": ["File Operations Services"],
"summary": "Check if file or directory exists",
"description": "Checks whether a file or directory exists at the specified SMB path.",
"operationId": "checkExists",
"parameters": [
{
"name": "path",
"in": "query",
"required": true,
"description": "The SMB path to check",
"schema": {
"type": "string"
}
},
{
"name": "domain",
"in": "query",
"description": "SMB domain",
"schema": {
"type": "string"
}
},
{
"name": "username",
"in": "query",
"description": "SMB username",
"schema": {
"type": "string"
}
},
{
"name": "password",
"in": "query",
"description": "SMB password",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Existence check completed",
"content": {
"application/json": {
"example": {
"success": true,
"path": "/path/to/check",
"exists": true
}
}
}
},
"400": {
"description": "Bad request - path parameter required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"UploadRequest": {
"type": "object",
"properties": {
"folder": {
"type": "string",
"description": "The target folder path for upload"
},
"filename": {
"type": "string",
"description": "The name of the file to upload"
},
"domain": {
"type": "string",
"description": "SMB domain"
},
"username": {
"type": "string",
"description": "SMB username"
},
"password": {
"type": "string",
"description": "SMB password"
},
"fileContent": {
"type": "string",
"format": "byte",
"description": "Base64 encoded file content"
}
},
"required": ["folder", "filename", "fileContent"]
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

View File

@@ -0,0 +1,76 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - Health Services",
"description": "Health check endpoints for service monitoring and liveness probes.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "Health",
"description": "Health check endpoints for service monitoring and liveness probes."
}
],
"paths": {
"/v1/health/ping": {
"get": {
"tags": ["Health"],
"summary": "Ping",
"description": "Lightweight liveness check.",
"operationId": "get_api_v1_health_ping",
"responses": {
"200": {
"description": "Service is alive",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": ["ok"]
},
"examples": {
"ok": {
"value": {
"ok": true
}
}
}
}
}
}
},
"security": [
{
"basicAuth": []
}
]
}
}
},
"components": {
"schemas": {},
"securitySchemes": {
"basicAuth": {
"type": "http",
"scheme": "basic"
}
}
}
}

530
scalar/apidocs/ifs.json Normal file
View File

@@ -0,0 +1,530 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - IFS Services",
"description": "Integrated File System (IFS) Services provide APIs for accessing objects in a way that is like personal computer and UNIX operating systems. This includes listing objects in directories, reading from files, and writing to files.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "IFS Services",
"description": "Integrated File System (IFS) Services provide APIs for accessing objects in a way that is like personal computer and UNIX operating systems."
}
],
"paths": {
"/v1/ifs/{path}": {
"get": {
"tags": ["IFS Services"],
"summary": "Get the content of a file.",
"description": "Get the content of a file. The content is returned in a JSON object.",
"operationId": "ifsGetFileContent",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "ETag",
"in": "header",
"description": "Whether to return checksum for the file.",
"schema": {
"type": "boolean"
}
},
{
"name": "path",
"in": "path",
"description": "Path to file for which the data is to be read.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"ccsid": 819,
"content": "Hello world\n"
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "The specified resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
},
"put": {
"tags": ["IFS Services"],
"summary": "Write a string to a file.",
"description": "Write a string to a file. The file must exist and its contents will be replaced by the string specified in the request.",
"operationId": "ifsPutFileContent",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "If-Match",
"in": "header",
"description": "If the If-Match HTTP header is passed, RSE API will check to see if the Etag (MD5 hash of the object content) matches the provided Etag value. If this value matches, the operation will proceed. If the match fails, the system will return a 412 (Precondition Failed) error.",
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "path",
"description": "Path to file in which the data will be written.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "File content.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rest4i_FileContent"
},
"example": {
"content": "some data that will be written to file."
}
},
"text/plain": {
"schema": {},
"example": "some data that will be written to file.\n"
}
},
"required": true
},
"responses": {
"204": {
"description": "Successful request, no content."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "The specified resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"412": {
"description": "Precondition failed."
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/ifs/list": {
"get": {
"tags": ["IFS Services"],
"summary": "Gets a list of objects in the specified path.",
"description": "Gets a list of objects in the specified path. The information returned includes the name, whether object is a directory, the description, and the object subtype. For objects that are not in the QSYS.LIB file system, any part of the path may contain an asterisk (*), which is a wildcard that means zero or more instances of any character.",
"operationId": "ifsListDir",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "query",
"description": "The working directory. For example, /u/IBM/test",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "subtype",
"in": "query",
"description": "Subtype of objects to return. Valid values include a specific object type (*LIB, *FILE, *PGM, *OUTQ, etc.) or *ALL.",
"schema": {
"type": "string"
}
},
{
"name": "includehidden",
"in": "query",
"description": "Whether to show hidden files.",
"schema": {
"type": "boolean",
"default": false
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"objects": [
{
"path": "/QSYS.LIB/USER1.LIB/QCLSRC.FILE",
"description": "\"test\"",
"isDir": true,
"subType": "PF-SRC"
},
{
"path": "/QSYS.LIB/USER1.LIB/QCSRC.FILE",
"description": "",
"isDir": true,
"subType": "PF-SRC"
}
]
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "The specified resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
},
"/v1/ifs/{path}/info": {
"get": {
"tags": ["IFS Services"],
"summary": "Returns information about the object referenced by the path.",
"description": "Returns information about the object referenced by the path. The information returned includes the name, whether object is a directory, the description, the object subtype, CCSID, size, last modified timestamp, and object subtype.",
"operationId": "ifsGetFileInfo",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "path",
"in": "path",
"description": "Path to object for which information is to be returned.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"path": "/qsys.lib/user1.lib",
"description": "user1's lib",
"isDir": true,
"subType": "PROD",
"owner": "USER1",
"ccsid": 37,
"lastModified": 1680559633,
"size": 401408,
"recordLength": -1,
"numberOfRecords": -1
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "The specified resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
}
},
"components": {
"schemas": {
"rest4i_FileContent": {
"required": ["content"],
"type": "object",
"properties": {
"content": {
"type": "string"
}
},
"description": "The file content."
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

149
scalar/apidocs/index.json Normal file
View File

@@ -0,0 +1,149 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i API Specifications Index",
"description": "This index lists all available OpenAPI specification files for the REST4i API. Each category has its own specification file for easier navigation and consumption.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"specifications": [
{
"name": "Administration Services",
"file": "admin.json",
"description": "Administration Services provide APIs that give information about RSE API and the runtime environment of the RSE API server.",
"endpoints": 7,
"paths": [
"/v1/admin/memory",
"/v1/admin/settings",
"/v1/admin/environment",
"/v1/admin/serverinfo",
"/v1/admin/sessions"
]
},
{
"name": "CL Command Services",
"file": "cl.json",
"description": "CL Command Services provide APIs for running CL commands.",
"endpoints": 2,
"paths": [
"/v1/cl",
"/v1/cl/{commandname}"
]
},
{
"name": "SQL Services",
"file": "sql.json",
"description": "SQL Services provide APIs associated with performing SQL operations.",
"endpoints": 1,
"paths": [
"/v1/sql"
]
},
{
"name": "IFS Services",
"file": "ifs.json",
"description": "Integrated File System (IFS) Services provide APIs for accessing objects in a way that is like personal computer and UNIX operating systems.",
"endpoints": 4,
"paths": [
"/v1/ifs/{path}",
"/v1/ifs/list",
"/v1/ifs/{path}/info"
]
},
{
"name": "QSYS Services",
"file": "qsys.json",
"description": "QSYS Services provide APIs for accessing QSYS objects.",
"endpoints": 1,
"paths": [
"/v1/qsys/search/{objectName}"
]
},
{
"name": "Session Services",
"file": "session.json",
"description": "Session Services provide APIs for authenticating a user and managing sessions.",
"endpoints": 4,
"paths": [
"/v1/session"
]
},
{
"name": "Database Services",
"file": "database.json",
"description": "Enhanced database services with connection pooling and multiple output formats.",
"endpoints": 2,
"paths": [
"/v1/database/query"
]
},
{
"name": "File Operations Services",
"file": "files.json",
"description": "Enhanced file operations services supporting both IFS and SMB file operations.",
"endpoints": 5,
"paths": [
"/v1/files/list",
"/v1/files/download",
"/v1/files/upload",
"/v1/files/zip",
"/v1/files/exists"
]
},
{
"name": "PDF Services",
"file": "pdf.json",
"description": "PDF processing services for creating, manipulating, and extracting data from PDF documents.",
"endpoints": 4,
"paths": [
"/v1/pdf/convert",
"/v1/pdf/merge",
"/v1/pdf/rotate",
"/v1/pdf/unprotect"
]
},
{
"name": "Security Services",
"file": "security.json",
"description": "Security Services provide APIs relating to digital certificate management and TLS system information.",
"endpoints": 14,
"paths": [
"/v1/security/dcm/cert/delete",
"/v1/security/dcm/cert/export",
"/v1/security/dcm/cert/info",
"/v1/security/dcm/cert/list",
"/v1/security/dcm/cert/import",
"/v1/security/dcm/appdef/associate",
"/v1/security/dcm/appdef/disassociate",
"/v1/security/dcm/appdef/list",
"/v1/security/dcm/appdef/trust",
"/v1/security/dcm/appdef/untrust",
"/v1/security/dcm/certstore/changepassword",
"/v1/security/tls",
"/v1/security/tls/stats"
]
},
{
"name": "Health Services",
"file": "health.json",
"description": "Health check endpoints for service monitoring and liveness probes.",
"endpoints": 1,
"paths": [
"/v1/health/ping"
]
}
],
"summary": {
"totalSpecFiles": 11,
"totalEndpoints": 45,
"version": "1.0.7-rest4i",
"masterSpec": "../scalar.json"
}
}

287
scalar/apidocs/pdf.json Normal file
View File

@@ -0,0 +1,287 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - PDF Services",
"description": "PDF processing services for creating, manipulating, and extracting data from PDF documents on IBM i systems.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "PDF Services",
"description": "PDF processing services for creating, manipulating, and extracting data from PDF documents."
}
],
"paths": {
"/v1/pdf/convert": {
"post": {
"tags": ["PDF Services"],
"summary": "Convert HTML to PDF",
"description": "Convert HTML content to PDF document",
"operationId": "convertToPdf",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConvertRequest"
},
"example": {
"html": "<html><body><h1>Report</h1><p>Content here</p></body></html>",
"size": "A4",
"orientation": "portrait"
}
}
}
},
"responses": {
"200": {
"description": "PDF generated successfully",
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/v1/pdf/merge": {
"post": {
"tags": ["PDF Services"],
"summary": "Merge PDF files",
"description": "Merges multiple PDF files into a single PDF document.",
"operationId": "mergePdfs",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MergeRequest"
}
}
}
},
"responses": {
"200": {
"description": "PDFs merged successfully",
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Bad request - at least one PDF file is required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
},
"/v1/pdf/rotate": {
"post": {
"tags": ["PDF Services"],
"summary": "Rotate PDF pages",
"description": "Rotates all pages in a PDF document by the specified angle.",
"operationId": "rotatePdf",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RotateRequest"
}
}
}
},
"responses": {
"200": {
"description": "PDF rotated successfully",
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Bad request - PDF file is required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
},
"/v1/pdf/unprotect": {
"post": {
"tags": ["PDF Services"],
"summary": "Remove PDF protection",
"description": "Removes protection from a PDF document by converting it to images and back to PDF.",
"operationId": "unprotectPdf",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnprotectRequest"
}
}
}
},
"responses": {
"200": {
"description": "PDF unprotected successfully",
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Bad request - PDF file is required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ConvertRequest": {
"type": "object",
"properties": {
"html": {
"type": "string",
"description": "HTML content to convert to PDF"
},
"size": {
"type": "string",
"description": "Page size for the PDF",
"default": "A4",
"enum": ["A1", "A2", "A3", "A4", "A5", "A6", "A7"]
},
"orientation": {
"type": "string",
"description": "Page orientation",
"default": "portrait",
"enum": ["portrait", "landscape"]
}
},
"required": ["html"]
},
"MergeRequest": {
"type": "object",
"properties": {
"pdfFiles": {
"type": "array",
"items": {
"type": "string",
"format": "byte"
},
"description": "Array of Base64 encoded PDF files to merge"
}
},
"required": ["pdfFiles"]
},
"RotateRequest": {
"type": "object",
"properties": {
"pdfFile": {
"type": "string",
"format": "byte",
"description": "Base64 encoded PDF file to rotate"
},
"rotation": {
"type": "integer",
"description": "Rotation angle (90, 180, 270, 360/0)",
"default": 90,
"enum": [90, 180, 270, 360, 0]
}
},
"required": ["pdfFile"]
},
"UnprotectRequest": {
"type": "object",
"properties": {
"pdfFile": {
"type": "string",
"format": "byte",
"description": "Base64 encoded protected PDF file"
}
},
"required": ["pdfFile"]
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

225
scalar/apidocs/qsys.json Normal file
View File

@@ -0,0 +1,225 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - QSYS Services",
"description": "QSYS Services provide APIs for accessing QSYS objects.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "QSYS Services",
"description": "QSYS Services provide APIs for accessing QSYS objects."
}
],
"paths": {
"/v1/qsys/search/{objectName}": {
"get": {
"tags": ["QSYS Services"],
"summary": "Returns a list of QSYS.LIB objects that match the search criteria.",
"description": "Returns a list of QSYS.LIB objects that match the search criteria. The filter is the object name, and may be a value of *ALL, in which case all objects that match the search criteria is returned, or a generic name. A generic name is a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, all objects that have names with the same prefix as the generic name are returned.",
"operationId": "qsysGetQsysObjects",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "objectLibrary",
"in": "query",
"description": "The library or set of libraries that are searched for objects. Valid values are a specific name, or one of the following special values: *ALL - All libraries are searched. *ALLUSR - All user libraries are searched. *CURLIB - The current library is searched. *LIBL - The library list is searched. *USRLIBL - The user portion of the library list is searched.",
"schema": {
"type": "string",
"default": "*USRLIBL"
}
},
{
"name": "objectType",
"in": "query",
"description": "The type of object to search. Valid values include: *FILE, *PGM, *LIB, etc., or *ALL.",
"schema": {
"type": "string",
"default": "*ALL"
}
},
{
"name": "objectSubtype",
"in": "query",
"description": "Object subtype. For example, PF-SRC, PF-DTA, SAVF, etc., or *ALL. Note that not all objects have subtypes.",
"schema": {
"type": "string",
"default": "*ALL"
}
},
{
"name": "memberName",
"in": "query",
"description": "The member name to match for objects of type PF-SRC or PF-DTA. Valid values are a specific name, or an extended generic name where the asterisk (*) may be placed in any part of the name, or *ALL.",
"schema": {
"type": "string",
"default": ""
}
},
{
"name": "memberType",
"in": "query",
"description": "The member type to match for members of objects of type PF-SRC or PF-DTA. Valid values are a specific name, such as C, CBLLE, RPGLE, SQLRPGLE, etc., or *ALL.",
"schema": {
"type": "string",
"default": "*ALL"
}
},
{
"name": "objectName",
"in": "path",
"description": "The object name. Valid values are a specific name, a generic name (for example, AM*), or one of the following special values: *ALL - All object names are searched. *ALLUSR - All objects that are libraries in QSYS or the library list are searched.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"objects": [
{
"path": "/QSYS.LIB/USER1.LIB/AXISLIBS.FILE",
"description": "",
"isDir": false,
"subType": "SAVF"
},
{
"path": "/QSYS.LIB/USER1.LIB/DEALER.FILE",
"description": "",
"isDir": true,
"subType": "PF-DTA"
},
{
"path": "/QSYS.LIB/USER1.LIB/QCLSRC.FILE",
"description": "\"test\"",
"isDir": true,
"subType": "PF-SRC"
}
]
}
}
}
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"404": {
"description": "The specified resource was not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
}
},
"components": {
"schemas": {
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

1585
scalar/apidocs/security.json Normal file

File diff suppressed because it is too large Load Diff

477
scalar/apidocs/session.json Normal file
View File

@@ -0,0 +1,477 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - Session Services",
"description": "Session Services provide APIs for authenticating a user and managing sessions that are tied to an authenticated user. The user must have a user profile on the IBM i server to be accessed. Once authenticated, a bearer token is returned and must be submitted on requests when invoking protected APIs in an HTTP authorization header.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "Session Services",
"description": "Session Services provide APIs for authenticating a user and managing sessions that are tied to an authenticated user."
}
],
"paths": {
"/v1/session": {
"get": {
"tags": ["Session Services"],
"summary": "Get information about the session.",
"description": "Get information about the session. The information returned includes session settings in addition to information about any host server jobs tied to the session.",
"operationId": "sessionQuery",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
},
{
"name": "envvars",
"in": "query",
"description": "Comma separated list of environment variables to return from the remote command host server job.",
"schema": {
"type": "string"
}
},
{
"name": "maxjoblogrecords",
"in": "query",
"description": "Maximum number of message log records to return from the remote command host server job.",
"schema": {
"type": "integer",
"default": 0
}
},
{
"name": "joblogfilter",
"in": "query",
"description": "Comma separated list of message IDs. Only remote command host server job log messages that do not match the filter message IDs will be returned.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful request.",
"content": {
"application/json": {
"example": {
"sessionInfo": {
"userID": "user1",
"host": "localhost",
"expiration": "2023-04-04T00:56:35Z",
"creation": "2023-04-03T22:04:50Z",
"lastUsed": "2023-04-03T22:56:35Z",
"domain": "rest4i",
"expired": false
},
"sessionSettings": {
"libraryList": [],
"clCommands": [],
"envVariables": {},
"sqlDefaultSchema": null,
"sqlTreatWarningsAsErrors": false,
"sqlProperties": {},
"sqlStatements": []
}
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
}
]
},
"put": {
"tags": ["Session Services"],
"summary": "Refresh session settings.",
"description": "Refresh session settings. The settings affect the remote command and database host server jobs that are tied to the session. Refreshing session settings may result in the ending of existing host server jobs.",
"operationId": "sessionRefresh",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "The settings for the session.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rest4i_SessionSettings"
},
"example": {
"resetSettings": true,
"continueOnError": true,
"libraryList": ["lib1", "lib2"],
"clCommands": ["QSYS/CLRLIB LIB(BUILD)"],
"envVariables": {
"var1": "var1val",
"var2": "var2val"
},
"sqlDefaultSchema": "lib1",
"sqlProperties": {
"auto commit": "true",
"ignore warnings": "01003,0100C,01567"
},
"sqlStatements": ["SET PATH = LIB1, LIB2"]
}
}
},
"required": true
},
"responses": {
"204": {
"description": "Successful request, no content."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
}
]
},
"post": {
"tags": ["Session Services"],
"summary": "Authenticate with user credentials and return an embedded token.",
"description": "Authenticate with user credentials and return an embedded token to access different RSE APIs. On successful authentication, a token is returned in the Authorization HTTP header. The client must send this token in the Authorization HTTP header when making requests to protected RSE APIs.",
"operationId": "sessionLogin",
"requestBody": {
"description": "The user credentials to be authenticated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rest4i_LoginCredentials"
},
"example": {
"host": "localhost",
"userid": "user",
"password": "pwd"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful request, new resource created."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
}
},
"delete": {
"tags": ["Session Services"],
"summary": "Logout, releasing resources tied to the session.",
"description": "Logout, releasing resources tied to the session. If a logout is not performed, it will be discarded after a period of idle time (default is 2 hours).",
"operationId": "sessionLogout",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Successful request, no content."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
}
]
}
}
},
"components": {
"schemas": {
"rest4i_LoginCredentials": {
"required": ["password", "userid"],
"type": "object",
"properties": {
"host": {
"type": "string",
"description": "The IBM i server from which objects are to be accessed.",
"default": "localhost"
},
"userid": {
"type": "string",
"description": "The user ID."
},
"password": {
"type": "string",
"description": "The password."
}
},
"description": "The login credentials."
},
"rest4i_SessionSettings": {
"type": "object",
"properties": {
"resetSettings": {
"type": "boolean",
"description": "Replace existing sessions attributes. A value of false will merge settings in request with existing session settings.",
"default": false
},
"continueOnError": {
"type": "boolean",
"description": "Continue with session processing if an error occurs.",
"default": false
},
"libraryList": {
"type": "array",
"description": "Library to be added to library list of the remote command host server job tied to session.",
"items": {
"type": "string"
}
},
"clCommands": {
"type": "array",
"description": "CL command to be run in remote command host server job tied to session.",
"items": {
"type": "string"
}
},
"envVariables": {
"type": "object",
"description": "Environment variable to set in remote command host server job tied to session.",
"additionalProperties": {
"type": "string"
}
},
"sqlDefaultSchema": {
"type": "string",
"description": "Default SQL schema to use when running SQL statements in database host server job."
},
"sqlTreatWarningsAsErrors": {
"type": "boolean",
"description": "Treat SQL warnings as errors.",
"default": false
},
"sqlProperties": {
"type": "object",
"description": "Java toolbox JDBC property.",
"additionalProperties": {
"type": "string"
}
},
"sqlStatements": {
"type": "array",
"description": "SQL statement to be run in database host server job tied to session.",
"items": {
"type": "string"
}
}
},
"description": "The settings for the session."
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

207
scalar/apidocs/sql.json Normal file
View File

@@ -0,0 +1,207 @@
{
"openapi": "3.0.0",
"info": {
"title": "REST4i - SQL Services",
"description": "SQL Services provide APIs associated with performing SQL operations.",
"version": "1.0.7-rest4i",
"contact": {
"name": "API Support",
"url": "https://github.com/rest4i"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "/rest4i/api"
}
],
"tags": [
{
"name": "SQL Services",
"description": "SQL Services provide APIs associated with performing SQL operations."
}
],
"paths": {
"/v1/sql": {
"put": {
"tags": ["SQL Services"],
"summary": "Run a SQL statement on the server.",
"description": "Run a SQL statement on the server. If SQL statement fails, any messages relating to the error is returned. SQL state information is returned only if errors are detected. You have the option of indicating whether the state information is returned on all responses. By default, if a SQL statement is run successfully and there is no result set to return, no data is returned in the response.",
"operationId": "runSQLStatements",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "The authorization HTTP header.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "The SQL statement to be run on the server.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rest4i_SQLRequest"
},
"example": {
"alwaysReturnSQLStateInformation": false,
"treatWarningsAsErrors": false,
"sqlStatement": "select * from QIWS.QCUSTCDT"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "SQL statements(s) issued.",
"content": {
"application/json": {
"example": {
"resultSet": [
{
"CUSNUM": 938472,
"LSTNAM": "Henning",
"INIT": "G K",
"STREET": "4859 Elm Ave",
"CITY": "Dallas",
"STATE": "TX",
"ZIPCOD": 75217,
"CDTLMT": 5000,
"CHGCOD": 3,
"BALDUE": 37,
"CDTDUE": 0
},
{
"CUSNUM": 839283,
"LSTNAM": "Jones",
"INIT": "B D",
"STREET": "21B NW 135 St",
"CITY": "Clay",
"STATE": "NY",
"ZIPCOD": 13041,
"CDTLMT": 400,
"CHGCOD": 1,
"BALDUE": 100,
"CDTDUE": 0
}
]
}
}
}
},
"204": {
"description": "SQL statement(s) issued successfully, no content."
},
"400": {
"description": "Bad request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"401": {
"description": "Unauthorized request was made.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"403": {
"description": "The request is forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
},
"500": {
"description": "Unable to process the request due to an internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
}
}
},
"security": [
{
"bearerHttpAuthentication": []
},
{
"basicHttpAuthentication": []
}
]
}
}
},
"components": {
"schemas": {
"rest4i_SQLRequest": {
"required": ["sqlStatement"],
"type": "object",
"properties": {
"alwaysReturnSQLStateInformation": {
"type": "boolean",
"description": "Always return SQL state information. Default value is whatever has been set for the session."
},
"treatWarningsAsErrors": {
"type": "boolean",
"description": "Treat SQL warnings as errors. Default value is whatever has been set for the session."
},
"sqlStatement": {
"type": "string",
"description": "The SQL statement to be run."
}
},
"description": "SQL request to run."
},
"Problem": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "object"
}
}
}
},
"securitySchemes": {
"bearerHttpAuthentication": {
"type": "http",
"description": "Bearer token authentication.",
"scheme": "bearer",
"bearerFormat": "Bearer [token]"
},
"basicHttpAuthentication": {
"type": "http",
"description": "Basic authentication.",
"scheme": "basic"
}
}
}
}

41
scalar/config.json Normal file
View File

@@ -0,0 +1,41 @@
{
"id": "scalar",
"name": "scalar",
"urn": "scalar:_user",
"available": true,
"categories": [
"utilities"
],
"description": "Custom application: scalar",
"short_desc": "User-created custom app",
"author": "User",
"source": "",
"website": "",
"exposable": true,
"no_gui": false,
"supported_architectures": [
"amd64",
"arm64"
],
"tipi_version": 1,
"version": "1.0.0",
"dynamic_config": true,
"deprecated": false,
"force_expose": false,
"generate_vapid_keys": false,
"form_fields": [
{
"type": "text",
"label": "API Config",
"env_variable": "FORM_API_REFERENCE_CONFIG",
},
"type": "text",
"label": "Cors Proxy Url",
"env_variable": "FORM_PROXY_URL",
"default": "https://cors.alexzaw.dev?url="
],
"https": false,
"created_at": 1767952070034,
"updated_at": 1767952070034,
"force_pull": false
}

View File

@@ -0,0 +1,36 @@
{
"services": [
{
"_id": "service-9v11i7b",
"name": "api-reference",
"image": "scalarapi/api-reference:latest",
"isMain": true,
"internalPort": "8080",
"volumes": [
{
"containerPath": "/docs",
"hostPath": "/etc/runtipi/apps/_user/scalar/apidocs",
"readOnly": false,
"shared": false,
"private": false
}
],
"hostname": "scalar-api",
"environment": [
{
"key": "API_REFERENCE_CONFIG",
"value": "{FORM_API_REFERENCE_CONFIG}"
}
],
"addPorts": [
{
"containerPort": "8090",
"hostPort": "8090",
"tcp": true,
"udp": true
}
]
}
],
"schemaVersion": 2
}

45
scalar/docker-compose.yml Normal file
View File

@@ -0,0 +1,45 @@
services:
api-reference:
image: scalarapi/api-reference:latest
restart: unless-stopped
networks:
scalar__user_network:
gw_priority: 0
tipi_main_network:
gw_priority: 1
environment:
API_REFERENCE_CONFIG: "{API_REFERENCE_CONFIG}"
ports:
- 8090:8090/tcp
- 8090:8090/udp
- ${APP_PORT}:8080
volumes:
- /etc/runtipi/apps/_user/scalar/apidocs:/docs
labels:
generated: true
traefik.enable: true
traefik.docker.network: runtipi_tipi_main_network
traefik.http.middlewares.scalar-_user-web-redirect.redirectscheme.scheme: https
traefik.http.services.scalar-_user.loadbalancer.server.port: "8080"
traefik.http.routers.scalar-_user-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.scalar-_user-insecure.entrypoints: web
traefik.http.routers.scalar-_user-insecure.service: scalar-_user
traefik.http.routers.scalar-_user-insecure.middlewares: scalar-_user-web-redirect
traefik.http.routers.scalar-_user.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.scalar-_user.entrypoints: websecure
traefik.http.routers.scalar-_user.service: scalar-_user
traefik.http.routers.scalar-_user.tls.certresolver: myresolver
runtipi.managed: true
runtipi.appurn: scalar:_user
hostname: scalar-api
networks:
tipi_main_network:
name: runtipi_tipi_main_network
external: true
scalar__user_network:
name: scalar__user_network
external: false
ipam:
config:
- subnet: 10.128.22.0/24

View File

@@ -0,0 +1,10 @@
---
name: scalar
short_desc: User-created custom app
version: 1.0.0
---
# scalar
This is a user-created custom application.

BIN
scalar/metadata/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB