Hierarchy

  • CommonHttpService
    • DatabaseService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns DatabaseService

Methods

  • Creates a database in the space.

    Permissions required: Permission to view the corresponding space. Permission to create a database in the space.

    Parameters

    • params: {
          private?: boolean;
          requestBody: {
              parentId?: string;
              spaceId: string;
              title?: string;
          } & {
              [key: string]: unknown;
          };
      }
      • Optionalprivate?: boolean

        The database will be private. Only the user who creates this database will have permission to view and edit one.

      • requestBody: {
            parentId?: string;
            spaceId: string;
            title?: string;
        } & {
            [key: string]: unknown;
        }

    Returns Promise<DatabaseSingle & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the database was successfully created.

    POST /databases @scopes-current write:database:confluence

  • Delete a database by id.

    Deleting a database moves the database to the trash, where it can be restored later

    Permissions required: Permission to view the database and its corresponding space. Permission to delete databases in the space.

    Parameters

    • params: {
          id: number;
      }
      • id: number

        The ID of the database to be deleted.

    Returns Promise<void>

    DELETE /databases/{id} @scopes-current delete:database:confluence

  • Returns a specific database.

    Permissions required: Permission to view the database and its corresponding space.

    Parameters

    • params: {
          id: number;
          includeCollaborators?: boolean;
          includeDirectChildren?: boolean;
          includeOperations?: boolean;
          includeProperties?: boolean;
      }
      • id: number

        The ID of the database to be returned

      • OptionalincludeCollaborators?: boolean

        Includes collaborators on the database.

      • OptionalincludeDirectChildren?: boolean

        Includes direct children of the database, as defined in the ChildrenResponse object.

      • OptionalincludeOperations?: boolean

        Includes operations associated with this database in the response, as defined in the Operation object. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

      • OptionalincludeProperties?: boolean

        Includes content properties associated with this database in the response. The number of results will be limited to 50 and sorted in the default sort order. A meta and _links property will be present to indicate if more results are available and a link to retrieve the rest of the results.

    Returns Promise<DatabaseSingle & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested database is returned.

    GET /databases/{id} @scopes-current read:database:confluence

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void