openapi: 3.0.1 info: title: Back4App description: Help users with any IT task by using a development environment. Create and manage Parse Apps under their Back4App accounts. version: v1 servers: - url: https://chatgpt.back4app.com paths: /guides/{guideTitle}: get: operationId: getGuide description: Get a guide on how to perform a sequence of tasks to accomplish a user need. parameters: - in: path name: guideTitle description: Specify the title of the guide. required: true schema: type: string enum: [] responses: 200: description: OK content: application/json: schema: type: object properties: content: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /development-environments: post: operationId: createDevelopmentEnvironment description: Create a new development environment for this current chat. requestBody: content: application/json: schema: type: object properties: chatTitle: type: string required: - chatTitle responses: 201: description: OK content: application/json: schema: type: object properties: id: type: string chatTitle: type: string createdAt: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string get: operationId: getDevelopmentEnvironments description: Get existing development environments. parameters: - in: query name: chat-title description: Filter existing development environments by chat title. required: false schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: type: object properties: id: type: string chatTitle: type: string createdAt: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /development-environments/{developmentEnvironmentId}/commands-executions: post: operationId: executeCommand description: Execute any valid command in the development environment, which is an alpine container running on Docker. parameters: - in: path name: developmentEnvironmentId description: Specify the id of the development environment in which the command will be executed. required: true schema: type: string requestBody: content: application/json: schema: type: object properties: command: type: string responses: 201: description: Created content: application/json: schema: type: object properties: id: type: string stdout: type: string stderr: type: string status: type: string enum: [running, exited] exitCode: type: number 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /development-environments/{developmentEnvironmentId}/commands-executions/{commandExecutionId}: post: operationId: interactWithCommandExecution description: Use this operation to interact with a running execution. You can send stdin and/or exit the execution. parameters: - in: path name: developmentEnvironmentId description: Specify the id of the development environment in which the command to interact with is being executed. required: true schema: type: string - in: path name: commandExecutionId required: true schema: type: string requestBody: content: application/json: schema: type: object properties: stdin: type: string exit: type: boolean responses: 200: description: OK content: application/json: schema: type: object properties: id: type: string stdout: type: string stderr: type: string status: type: string enum: [running, exited] exitCode: type: number 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string get: operationId: inspectCommandExecution description: Use this operation to inspect a running execution. parameters: - in: path name: developmentEnvironmentId description: Specify the id of the development environment in which the command to be inspected is being executed. required: true schema: type: string - in: path name: commandExecutionId schema: type: string required: true responses: 200: description: OK content: application/json: schema: type: object properties: id: type: string stdout: type: string stderr: type: string status: type: string enum: [running, exited] exitCode: type: number 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /github-installation-access-token: post: operationId: createGitHubInstallationAccessToken description: Create a GitHub access token for any of the user's GitHub accounts that have the Back4App GitHub app (https://github.com/apps/back4app-containers) installed in. Use token to access a GitHub repository (e.g. git clone https://x-access-token:@github.com/owner/repo.git). requestBody: content: application/json: schema: type: object properties: accountLogin: type: string responses: 201: description: Created content: application/json: schema: type: object properties: token: type: string expiresAt: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /parse-apps: post: operationId: createParseApp description: Create a new Parse App. After that i) use callParseAPI endpoint to send requests; ii) use deployCloudCode and getCloudCode endpoints to manage cloud code folders and files. requestBody: content: application/json: schema: type: object required: - appName properties: appName: type: string responses: 201: description: Created content: application/json: schema: type: object properties: appId: type: string appName: type: string dashboardURL: type: string apiURL: type: string restKey: type: string javascriptKey: type: string clientKey: type: string dotnetKey: type: string publicWebHostingURL: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string get: operationId: getParseApps description: Get existing Parse Apps. Use getParseApp endpoint to get more details about a specific Parse App. parameters: - in: query name: app-name description: Filter existing Parse Apps by app name. required: false schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: type: object properties: appId: type: string appName: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /parse-apps/{appId}: get: operationId: getParseApp description: Get an existing Parse App (urls, keys, etc). After that i) callParseAPI endpoint retrieves schemas to learn; ii) callParseAPI endpoint sends requests; iii) getCloudCode endpoint retrieves existing cloud code to learn; iv) deployCloudCode endpoint changes cloud code. parameters: - in: path name: appId description: Specify the id of the app to be get. required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: type: object properties: appId: type: string appName: type: string dashboardURL: type: string apiURL: type: string restKey: type: string javascriptKey: type: string clientKey: type: string dotnetKey: type: string publicWebHostingURL: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /parse-apps/{appId}/cloud-code: post: operationId: deployCloudCode description: Learn schemas in callParseAPI and current code in getCloudCode. Use append writeMode to keep code. Files in cloud/ must be required from cloud/main.js and not require Parse SDK. Files in public/ must load https://unpkg.com/parse/dist/parse.min.js. Add functions, pages, etc, one per file. parameters: - in: path name: appId description: Specify the id of the app whose cloud code changes will be deployed. required: true schema: type: string requestBody: description: Create new functions in cloud/chatgpt/functions/ folder, one function per file. Use same logic for jobs, triggers, public files, and so on. In web pages, use Parse JS SDK from https://unpkg.com/parse/dist/parse.min.js. In cloud code, don't require Parse JS SDK. content: application/json: schema: type: object required: - changes properties: changes: type: array items: type: object required: - path - operation properties: path: description: The path of the folder or file to be changed. Create new functions in the cloud/chatgpt/functions/ folder, one function per file, always that possible. Don't forget to append a new entry to the cloud/main.js to require each new file. Do the same for jobs (in cloud/chatgpt/jobs/), triggers (in cloud/chatgpt/triggers/), public static files (in public/chatgpt/), and so on. type: string operation: description: The operation to be perfomed on the folder or file. type: string enum: [write, delete] writeMode: description: When writting to a file, the write mode is required. Use append option always that possible in order to avoid loosing pre-existing code. type: string enum: [overwrite, append] data: description: When writting to a file, the data to be written. When creating web pages, use Parse JS SDK from https://unpkg.com/parse/dist/parse.min.js and remember to initilize the SDK only after the SDK is fully loaded. You don't need to require Parse JS SDK when writting cloud code. type: string responses: 200: description: OK content: application/json: schema: type: object properties: message: type: string warnings: type: array items: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 403: description: Forbidden content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string get: operationId: getCloudCode description: Get the content of a cloud code folder or file. Get current files before deploying cloud code to learn and avoid loosing pre-existing code. Use the recursive option to list all the files in a folder and its subfolders. parameters: - in: path name: appId description: Specify the id of the app whose cloud code folder or file content will be get. required: true schema: type: string - in: query name: path description: Specify the path of the cloud code folder or file whose content will be get. If not sent, the cloud code root folder will be get. required: false schema: type: string - in: query name: recursive description: Specify whether the content of a cloud code folder should be get recursively or not. It defaults to true. It is ignored on files. schema: type: boolean responses: 200: description: OK content: text/plain: schema: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 403: description: Forbidden content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /parse-apps/{appId}/call-parse-api: post: operationId: callParseAPI description: Call Parse Server REST API. The first call must be to fetch schemas and learn the data, classes, and table. Then send multiple requests at once to retrieve create classes, insert data, perform queries, execute cloud code functions or perform any other operation supported by Parse. parameters: - in: path name: appId description: Specify the id of the app whose API will be called. required: true schema: type: string requestBody: content: application/json: schema: type: object required: - requests properties: requests: type: array items: type: object required: - method - url - body properties: method: description: Any HTTP method that is valid according to the Parse Server REST API. type: string url: description: Any URL that is valid according to the Parse Server API. The API is mounted in directly /, therefore do not use /parse/ or /1/ in the beginning of the url. For example, the schemas endpoint responds directly in the url /schemas (and not in /parse/schemas or /1/schemas). type: string body: description: Depending on the method and url, send valid bodies according to the Parse Server REST API. type: object responses: 200: description: OK content: application/json: schema: type: object properties: responses: type: array items: type: object properties: code: type: integer body: type: object 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /parse-apps/{appId}/activate-web-hosting: post: operationId: activateWebHosting description: Activate web hosting creating a back4app subdomain where the content of the cloud code public folder is hosted and can be visited. parameters: - in: path name: appId description: Specify the id of the app whose web hosting will be activated. required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: object properties: publicWebHostingURL: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /web-apps: post: operationId: createWebApp description: Create a new Web App from a GitHub repository to be deployed on Back4App Containers-as-a-Service. The repository must have a dockerfile in the app root folder. requestBody: content: application/json: schema: type: object required: - appName - repositoryOwnerLogin - repositoryName properties: appName: type: string repositoryOwnerLogin: type: string repositoryName: type: string branchName: type: string rootDirPath: type: string environmentVariables: type: array items: type: object properties: key: type: string value: type: string port: type: number healthCheckPath: type: string autoDeploy: type: boolean responses: 201: description: Created content: application/json: schema: type: object properties: appId: type: string appName: type: string dashboardURL: type: string appURL: type: string repositoryOwnerLogin: type: string repositoryName: type: string branchName: type: string rootDirPath: type: string environmentVariablesKeys: type: array items: type: string port: type: number healthCheckPath: type: string autoDeploy: type: boolean status: type: string error: type: string lastDeployment: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string activeDeployment: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string get: operationId: getWebApps description: Get existing Web Apps. Use getWebApp endpoint to get more details about a specific Web App. parameters: - in: query name: app-name description: Filter existing Web Apps by app name. required: false schema: type: string responses: 200: description: OK content: application/json: schema: type: object properties: appId: type: string appName: type: string 401: description: Unauthorized content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /web-apps/{appId}: get: operationId: getWebApp description: Get an existing web app and all its settings. parameters: - in: path name: appId description: Sepecify the id of the app to be get. required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: object properties: appId: type: string appName: type: string dashboardURL: type: string appURL: type: string repositoryOwnerLogin: type: string repositoryName: type: string branchName: type: string rootDirPath: type: string environmentVariablesKeys: type: array items: type: string port: type: number healthCheckPath: type: string autoDeploy: type: boolean status: type: string error: type: string lastDeployment: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string activeDeployment: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string put: operationId: updateWebApp description: Update an existing web app settings. Send only the settings that need to be updated. parameters: - in: path name: appId description: Sepecify the id of the app to be updated. required: true schema: type: string requestBody: content: application/json: schema: type: object properties: branchName: type: string rootDirPath: type: string removeEnvironmentVariablesKeys: type: array items: type: string setEnvironmentVariables: type: array items: type: object properties: key: type: string value: type: string port: type: number healthCheckPath: type: string autoDeploy: type: boolean responses: 200: description: OK content: application/json: schema: type: object properties: appId: type: string appName: type: string dashboardURL: type: string appURL: type: string repositoryOwnerLogin: type: string repositoryName: type: string branchName: type: string rootDirPath: type: string environmentVariablesKeys: type: array items: type: string port: type: number healthCheckPath: type: string autoDeploy: type: boolean status: type: string error: type: string lastDeployment: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string activeDeployment: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /web-apps/{appId}/deployments: post: operationId: startDeployment description: Start a new deployment. parameters: - in: path name: appId description: Sepecify the id of the app to be deployed. required: true schema: type: string responses: 201: description: Created content: application/json: schema: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string 400: description: Bad Request content: text/plain: schema: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string /web-apps/{appId}/deployments/{deploymentId}: get: operationId: getDeployment description: Get an existing deployment and its logs. parameters: - in: path name: appId description: Sepecify the id of the app whose deployment will be get. required: true schema: type: string - in: path name: deploymentId description: Sepecify the id of the deployment that will be get. required: true schema: type: string - in: query name: includeBuildLogs description: Sepecify if the deployment build logs should be included in the response object. required: false schema: type: boolean default: false - in: query name: buildLogsLimit description: Sepecify the limit of rows of deployment build logs to be included in the response object. required: false schema: type: number default: 15 - in: query name: includeContainersLogs description: Sepecify if the deployment containers logs should be included in the response object. required: false schema: type: boolean default: false - in: query name: containersLogsLimit description: Sepecify the limit of rows of deployment containers logs to be included in the response object. required: false schema: type: number default: 15 responses: 200: description: OK content: application/json: schema: type: object properties: id: type: string commitSHA: type: string createdAt: type: string status: type: string error: type: string buildLogs: type: array items: type: object properties: source: type: string message: type: string time: type: string containersLogs: type: array items: type: object properties: source: type: string message: type: string time: type: string 401: description: Unauthorized content: text/plain: schema: type: string 404: description: Not Found content: text/plain: schema: type: string 500: description: Internal Server Error content: text/plain: schema: type: string