Hierarchy

  • CommonHttpService
    • SpaceService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns SpaceService

Methods

  • Creates a Space as specified in the payload.

    Permissions required: Permission to create spaces.

    Parameters

    • params: {
          requestBody: {
              alias?: string;
              copySpaceAccessConfiguration?: number;
              createPrivateSpace?: boolean;
              description?: {
                  representation?: string;
                  value?: string;
              } & {
                  [key: string]: unknown;
              };
              key?: string;
              name: string;
              roleAssignments?: unknown[];
              templateKey?: string;
          } & {
              [key: string]: unknown;
          };
      }
      • requestBody: {
            alias?: string;
            copySpaceAccessConfiguration?: number;
            createPrivateSpace?: boolean;
            description?: {
                representation?: string;
                value?: string;
            } & {
                [key: string]: unknown;
            };
            key?: string;
            name: string;
            roleAssignments?: unknown[];
            templateKey?: string;
        } & {
            [key: string]: unknown;
        }

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

    Returned if the requested space is created.

  • Returns a specific space.

    Permissions required: Permission to view the space.

    Parameters

    • params: {
          descriptionFormat?: SpaceDescriptionBodyRepresentation;
          id: number;
          includeIcon?: boolean;
          includeLabels?: boolean;
          includeOperations?: boolean;
          includePermissions?: boolean;
          includeProperties?: boolean;
          includeRoleAssignments?: boolean;
      }
      • OptionaldescriptionFormat?: SpaceDescriptionBodyRepresentation

        The content format type to be returned in the description field of the response. If available, the representation will be available under a response field of the same name under the description field.

      • id: number

        The ID of the space to be returned.

      • OptionalincludeIcon?: boolean

        If the icon for the space should be fetched or not.

      • OptionalincludeLabels?: boolean

        Includes labels associated with this space 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.

      • OptionalincludeOperations?: boolean

        Includes operations associated with this space 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.

      • OptionalincludePermissions?: boolean

        Includes space permissions associated with this space 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.

      • OptionalincludeProperties?: boolean

        Includes space properties associated with this space 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.

      • OptionalincludeRoleAssignments?: boolean

        Includes role assignments associated with this space in the response. This parameter is only accepted for EAP sites. 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<SpaceSingle & {
        _links?: {
            base?: string;
        } & {
            [key: string]: unknown;
        };
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested space is returned.

    GET /spaces/{id} @scopes-current read:space:confluence

  • Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only spaces that the user has permission to view will be returned.

    Parameters

    • params: {
          cursor?: string;
          descriptionFormat?: SpaceDescriptionBodyRepresentation;
          favoritedBy?: string;
          ids?: number[];
          includeIcon?: boolean;
          keys?: string[];
          labels?: string[];
          limit?: number;
          notFavoritedBy?: string;
          sort?: SpaceSortOrder;
          status?: "current" | "archived";
          type?:
              | "global"
              | "personal"
              | "collaboration"
              | "knowledge_base"
              | "system"
              | "onboarding"
              | "xflow_sample_space";
      } = {}
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • OptionaldescriptionFormat?: SpaceDescriptionBodyRepresentation

        The content format type to be returned in the description field of the response. If available, the representation will be available under a response field of the same name under the description field.

      • OptionalfavoritedBy?: string

        Filter the results to spaces favorited by the user with the specified account ID.

      • Optionalids?: number[]

        Filter the results to spaces based on their IDs. Multiple IDs can be specified as a comma-separated list.

      • OptionalincludeIcon?: boolean

        If the icon for the space should be fetched or not.

      • Optionalkeys?: string[]

        Filter the results to spaces based on their keys. Multiple keys can be specified as a comma-separated list.

      • Optionallabels?: string[]

        Filter the results to spaces based on their labels. Multiple labels can be specified as a comma-separated list.

      • Optionallimit?: number

        Maximum number of spaces per result to return. If more results exist, use the Link response header to retrieve a relative URL that will return the next set of results.

      • OptionalnotFavoritedBy?: string

        Filter the results to spaces NOT favorited by the user with the specified account ID.

      • Optionalsort?: SpaceSortOrder

        Used to sort the result by a particular field.

      • Optionalstatus?: "current" | "archived"

        Filter the results to spaces based on their status.

      • Optionaltype?:
            | "global"
            | "personal"
            | "collaboration"
            | "knowledge_base"
            | "system"
            | "onboarding"
            | "xflow_sample_space"

        Filter the results to spaces based on their type.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: SpaceBulk[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested spaces are returned.

    GET /spaces @scopes-current read:space:confluence

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

    Returns void