{
  "swagger": "2.0",
  "info": {
    "title": "Connect apps service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "tags": [
    {
      "name": "ConnectAppsService",
      "x-displayName": "Connect apps service",
      "description": "Service for creating and managing Connect Apps",
      "x-errors": [
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "NominalConnectV1:ConnectAppsServiceErrorAppNotFound",
          "message": "Connect app not found"
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "NominalConnectV1:ConnectAppsServiceErrorCommitNotFound",
          "message": "Connect app commit not found"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalConnectV1:ConnectAppsServiceErrorCannotCommitToArchivedConnectApp",
          "message": "Cannot commit to an archived connect app"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalConnectV1:ConnectAppsServiceErrorInvalidSearchToken",
          "message": "Invalid search token"
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "NominalConnectV1:ConnectAppsServiceErrorMissingBundle",
          "message": "Connect app bundle is missing in this commit"
        }
      ]
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/connect/v1/apps": {
      "post": {
        "operationId": "ConnectAppsService_CreateConnectApp",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CreateConnectAppResponse"
            },
            "x-example": {
              "app": {
                "rid": "<rid>",
                "commit": "<commit>",
                "metadata": {
                  "rid": "<rid>",
                  "displayName": "<display name>",
                  "description": "<description>",
                  "labels": [
                    "<labels>"
                  ],
                  "properties": {
                    "<key>": "<value>"
                  },
                  "isArchived": true,
                  "isPublished": true,
                  "createdAt": "2026-01-01T00:00:00Z",
                  "createdBy": "<created by>",
                  "updatedAt": "2026-01-01T00:00:00Z",
                  "workspace": "<workspace>"
                },
                "bundle": {
                  "s3Path": {
                    "s3": "<s3>"
                  },
                  "metadata": {
                    "title": "<title>",
                    "containsExperimentalFeatures": true,
                    "sha256Checksum": "<sha256 checksum>",
                    "connectFilePath": "<connect file path>"
                  }
                },
                "versionNumber": "1"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateConnectAppRequest"
            },
            "x-example": {
              "displayName": "<display name>",
              "description": "<description>",
              "labels": [
                "<labels>"
              ],
              "properties": {
                "<key>": "<value>"
              },
              "isPublished": true,
              "workspace": "<workspace>",
              "bundle": {
                "s3Path": {
                  "s3": "<s3>"
                },
                "metadata": {
                  "title": "<title>",
                  "containsExperimentalFeatures": true,
                  "sha256Checksum": "<sha256 checksum>",
                  "connectFilePath": "<connect file path>"
                }
              },
              "commitMessage": "<commit message>"
            }
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Create connect app",
        "description": "Create a new Connect App, either with a bundle file or as an empty app"
      }
    },
    "/connect/v1/apps/archive": {
      "post": {
        "operationId": "ConnectAppsService_ArchiveConnectApps",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ArchiveConnectAppsResponse"
            },
            "x-example": {
              "rids": [
                "<rids>"
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ArchiveConnectAppsRequest"
            },
            "x-example": {
              "rids": [
                "<rids>"
              ]
            }
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Archive connect apps",
        "description": "Archive Connect Apps"
      }
    },
    "/connect/v1/apps/search": {
      "post": {
        "operationId": "ConnectAppsService_SearchConnectApps",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SearchConnectAppsResponse"
            },
            "x-example": {
              "appMetadata": [
                {
                  "rid": "<rid>",
                  "displayName": "<display name>",
                  "description": "<description>",
                  "labels": [
                    "<labels>"
                  ],
                  "properties": {
                    "<key>": "<value>"
                  },
                  "isArchived": true,
                  "isPublished": true,
                  "createdAt": "2026-01-01T00:00:00Z",
                  "createdBy": "<created by>",
                  "updatedAt": "2026-01-01T00:00:00Z",
                  "workspace": "<workspace>"
                }
              ],
              "nextPageToken": "<next page token>"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SearchConnectAppsRequest"
            },
            "x-example": {
              "query": {
                "searchText": "<search text>"
              },
              "options": {
                "isDescending": true,
                "sortField": "SEARCH_CONNECT_APPS_SORT_FIELD_TITLE"
              },
              "pageSize": 1,
              "nextPageToken": "<next page token>"
            }
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Search connect apps",
        "description": "Searches for Connect Apps, returning paged results. Workspaces the caller lacks workspace:view on are filtered out rather than failing the call."
      }
    },
    "/connect/v1/apps/unarchive": {
      "post": {
        "operationId": "ConnectAppsService_UnarchiveConnectApps",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/UnarchiveConnectAppsResponse"
            },
            "x-example": {
              "rids": [
                "<rids>"
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UnarchiveConnectAppsRequest"
            },
            "x-example": {
              "rids": [
                "<rids>"
              ]
            }
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Unarchive connect apps",
        "description": "Unarchive Connect Apps"
      }
    },
    "/connect/v1/apps/{rid}": {
      "get": {
        "operationId": "ConnectAppsService_GetConnectApp",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetConnectAppResponse"
            },
            "x-example": {
              "app": {
                "rid": "<rid>",
                "commit": "<commit>",
                "metadata": {
                  "rid": "<rid>",
                  "displayName": "<display name>",
                  "description": "<description>",
                  "labels": [
                    "<labels>"
                  ],
                  "properties": {
                    "<key>": "<value>"
                  },
                  "isArchived": true,
                  "isPublished": true,
                  "createdAt": "2026-01-01T00:00:00Z",
                  "createdBy": "<created by>",
                  "updatedAt": "2026-01-01T00:00:00Z",
                  "workspace": "<workspace>"
                },
                "bundle": {
                  "s3Path": {
                    "s3": "<s3>"
                  },
                  "metadata": {
                    "title": "<title>",
                    "containsExperimentalFeatures": true,
                    "sha256Checksum": "<sha256 checksum>",
                    "connectFilePath": "<connect file path>"
                  }
                },
                "versionNumber": "1"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "branchOrCommit.branch",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "branchOrCommit.commit",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Get connect app",
        "description": "Get a Connect App by its RID"
      }
    },
    "/connect/v1/apps/{rid}/bundle-download": {
      "get": {
        "operationId": "ConnectAppsService_GetConnectAppBundleDownloadUrl",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetConnectAppBundleDownloadUrlResponse"
            },
            "x-example": {
              "url": "<url>"
            }
          }
        },
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "branchOrCommit.branch",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "branchOrCommit.commit",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Get connect app bundle download URL",
        "description": "Get a pre-signed URL for downloading the bundle of a Connect App at a specific commit or the latest commit on the main branch"
      }
    },
    "/connect/v1/apps/{rid}/commit": {
      "post": {
        "operationId": "ConnectAppsService_Commit",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CommitResponse"
            },
            "x-example": {
              "app": {
                "rid": "<rid>",
                "commit": "<commit>",
                "metadata": {
                  "rid": "<rid>",
                  "displayName": "<display name>",
                  "description": "<description>",
                  "labels": [
                    "<labels>"
                  ],
                  "properties": {
                    "<key>": "<value>"
                  },
                  "isArchived": true,
                  "isPublished": true,
                  "createdAt": "2026-01-01T00:00:00Z",
                  "createdBy": "<created by>",
                  "updatedAt": "2026-01-01T00:00:00Z",
                  "workspace": "<workspace>"
                },
                "bundle": {
                  "s3Path": {
                    "s3": "<s3>"
                  },
                  "metadata": {
                    "title": "<title>",
                    "containsExperimentalFeatures": true,
                    "sha256Checksum": "<sha256 checksum>",
                    "connectFilePath": "<connect file path>"
                  }
                },
                "versionNumber": "1"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CommitBody"
            },
            "x-example": {
              "bundle": {
                "s3Path": {
                  "s3": "<s3>"
                },
                "metadata": {
                  "title": "<title>",
                  "containsExperimentalFeatures": true,
                  "sha256Checksum": "<sha256 checksum>",
                  "connectFilePath": "<connect file path>"
                }
              },
              "message": "<message>"
            }
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Commit",
        "description": "Commit a bundle to the main branch"
      }
    },
    "/connect/v1/apps/{rid}/metadata": {
      "put": {
        "operationId": "ConnectAppsService_UpdateConnectAppMetadata",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/UpdateConnectAppMetadataResponse"
            },
            "x-example": {
              "appMetadata": {
                "rid": "<rid>",
                "displayName": "<display name>",
                "description": "<description>",
                "labels": [
                  "<labels>"
                ],
                "properties": {
                  "<key>": "<value>"
                },
                "isArchived": true,
                "isPublished": true,
                "createdAt": "2026-01-01T00:00:00Z",
                "createdBy": "<created by>",
                "updatedAt": "2026-01-01T00:00:00Z",
                "workspace": "<workspace>"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateConnectAppMetadataBody"
            },
            "x-example": {
              "displayName": "<display name>",
              "description": "<description>",
              "labels": {
                "labels": [
                  "<labels>"
                ]
              },
              "properties": {
                "properties": {
                  "<key>": "<value>"
                }
              },
              "isArchived": true,
              "isPublished": true
            }
          }
        ],
        "tags": [
          "ConnectAppsService"
        ],
        "summary": "Update connect app metadata",
        "description": "Update metadata fields of a Connect App"
      }
    }
  },
  "definitions": {
    "ArchiveConnectAppsRequest": {
      "type": "object",
      "properties": {
        "rids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "rids": [
          "<rids>"
        ]
      }
    },
    "ArchiveConnectAppsResponse": {
      "type": "object",
      "properties": {
        "rids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CommitResponse": {
      "type": "object",
      "properties": {
        "app": {
          "$ref": "#/definitions/ConnectApp"
        }
      }
    },
    "ConnectApp": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string"
        },
        "commit": {
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/ConnectAppMetadata"
        },
        "bundle": {
          "$ref": "#/definitions/ConnectAppBundle"
        },
        "versionNumber": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "ConnectAppBundle": {
      "type": "object",
      "properties": {
        "s3Path": {
          "$ref": "#/definitions/Handle"
        },
        "metadata": {
          "$ref": "#/definitions/ConnectAppBundleMetadata"
        }
      }
    },
    "ConnectAppBundleMetadata": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "containsExperimentalFeatures": {
          "type": "boolean"
        },
        "sha256Checksum": {
          "type": "string"
        },
        "connectFilePath": {
          "type": "string",
          "title": "name of the .connect file inside the bundle. Will default to app.connect"
        }
      },
      "title": "wrapper message for metadata that will probably be extended in the future"
    },
    "ConnectAppMetadata": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "isArchived": {
          "type": "boolean"
        },
        "isPublished": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdBy": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "workspace": {
          "type": "string"
        }
      }
    },
    "ConnectAppSearchQuery": {
      "type": "object",
      "properties": {
        "searchText": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "property": {
          "$ref": "#/definitions/Property"
        },
        "and": {
          "$ref": "#/definitions/ConnectAppSearchAndQuery"
        },
        "or": {
          "$ref": "#/definitions/ConnectAppSearchOrQuery"
        },
        "workspace": {
          "type": "string"
        },
        "isArchived": {
          "type": "boolean"
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "searchText",
            "label",
            "property",
            "and",
            "or",
            "workspace",
            "isArchived"
          ],
          "required": true
        }
      ],
      "description": "Set exactly one of the fields below.",
      "example": {
        "searchText": "string"
      }
    },
    "ConnectAppSearchAndQuery": {
      "type": "object",
      "properties": {
        "queries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ConnectAppSearchQuery"
          }
        }
      }
    },
    "ConnectAppSearchOrQuery": {
      "type": "object",
      "properties": {
        "queries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ConnectAppSearchQuery"
          }
        }
      }
    },
    "CommitBody": {
      "type": "object",
      "properties": {
        "bundle": {
          "$ref": "#/definitions/ConnectAppBundle"
        },
        "message": {
          "type": "string"
        }
      },
      "title": "only allow commits to the main branch no latest commit id field to bypass conflict detection",
      "example": {
        "bundle": {
          "s3Path": {
            "s3": "<s3>"
          },
          "metadata": {
            "title": "<title>",
            "containsExperimentalFeatures": true,
            "sha256Checksum": "<sha256 checksum>",
            "connectFilePath": "<connect file path>"
          }
        },
        "message": "<message>"
      }
    },
    "UpdateConnectAppMetadataBody": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "labels": {
          "$ref": "#/definitions/LabelUpdateWrapper"
        },
        "properties": {
          "$ref": "#/definitions/PropertyUpdateWrapper"
        },
        "isArchived": {
          "type": "boolean"
        },
        "isPublished": {
          "type": "boolean"
        }
      },
      "example": {
        "displayName": "<display name>",
        "description": "<description>",
        "labels": {
          "labels": [
            "<labels>"
          ]
        },
        "properties": {
          "properties": {
            "<key>": "<value>"
          }
        },
        "isArchived": true,
        "isPublished": true
      }
    },
    "CreateConnectAppRequest": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "title": "separate from the bundle title to allow for creating empty apps",
          "minLength": 1,
          "x-constraints": [
            "At least 1 character."
          ]
        },
        "description": {
          "type": "string"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "isPublished": {
          "type": "boolean"
        },
        "workspace": {
          "type": "string"
        },
        "bundle": {
          "$ref": "#/definitions/ConnectAppBundle",
          "title": "optional to allow for creating \"empty\" in-progress connect apps"
        },
        "commitMessage": {
          "type": "string"
        }
      },
      "example": {
        "displayName": "<display name>",
        "description": "<description>",
        "labels": [
          "<labels>"
        ],
        "properties": {
          "<key>": "<value>"
        },
        "isPublished": true,
        "workspace": "<workspace>",
        "bundle": {
          "s3Path": {
            "s3": "<s3>"
          },
          "metadata": {
            "title": "<title>",
            "containsExperimentalFeatures": true,
            "sha256Checksum": "<sha256 checksum>",
            "connectFilePath": "<connect file path>"
          }
        },
        "commitMessage": "<commit message>"
      }
    },
    "CreateConnectAppResponse": {
      "type": "object",
      "properties": {
        "app": {
          "$ref": "#/definitions/ConnectApp"
        }
      }
    },
    "GetConnectAppBundleDownloadUrlResponse": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        }
      }
    },
    "GetConnectAppResponse": {
      "type": "object",
      "properties": {
        "app": {
          "$ref": "#/definitions/ConnectApp"
        }
      }
    },
    "SearchConnectAppsOptions": {
      "type": "object",
      "properties": {
        "isDescending": {
          "type": "boolean",
          "title": "default is true"
        },
        "sortField": {
          "$ref": "#/definitions/SearchConnectAppsSortField",
          "title": "default is title"
        }
      }
    },
    "SearchConnectAppsRequest": {
      "type": "object",
      "properties": {
        "query": {
          "$ref": "#/definitions/ConnectAppSearchQuery"
        },
        "options": {
          "$ref": "#/definitions/SearchConnectAppsOptions"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 1000,
          "x-constraints": [
            "From 1 to 1,000."
          ]
        },
        "nextPageToken": {
          "type": "string"
        }
      },
      "example": {
        "query": {
          "searchText": "<search text>"
        },
        "options": {
          "isDescending": true,
          "sortField": "SEARCH_CONNECT_APPS_SORT_FIELD_TITLE"
        },
        "pageSize": 1,
        "nextPageToken": "<next page token>"
      }
    },
    "SearchConnectAppsResponse": {
      "type": "object",
      "properties": {
        "appMetadata": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ConnectAppMetadata"
          }
        },
        "nextPageToken": {
          "type": "string"
        }
      }
    },
    "SearchConnectAppsSortField": {
      "type": "string",
      "enum": [
        "SEARCH_CONNECT_APPS_SORT_FIELD_UNSPECIFIED",
        "SEARCH_CONNECT_APPS_SORT_FIELD_TITLE",
        "SEARCH_CONNECT_APPS_SORT_FIELD_CREATED_AT",
        "SEARCH_CONNECT_APPS_SORT_FIELD_DISPLAY_NAME"
      ],
      "default": "SEARCH_CONNECT_APPS_SORT_FIELD_UNSPECIFIED",
      "example": "SEARCH_CONNECT_APPS_SORT_FIELD_TITLE"
    },
    "UnarchiveConnectAppsRequest": {
      "type": "object",
      "properties": {
        "rids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "rids": [
          "<rids>"
        ]
      }
    },
    "UnarchiveConnectAppsResponse": {
      "type": "object",
      "properties": {
        "rids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "UpdateConnectAppMetadataResponse": {
      "type": "object",
      "properties": {
        "appMetadata": {
          "$ref": "#/definitions/ConnectAppMetadata"
        }
      },
      "required": [
        "appMetadata"
      ]
    },
    "Handle": {
      "type": "object",
      "properties": {
        "s3": {
          "type": "string"
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "s3"
          ],
          "required": true
        }
      ],
      "example": {
        "s3": "string"
      }
    },
    "LabelUpdateWrapper": {
      "type": "object",
      "properties": {
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "Wrapper classes to allow for optional fields on update requests"
    },
    "Property": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "PropertyUpdateWrapper": {
      "type": "object",
      "properties": {
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}
