Function getSpaces

  • Retrieves spaces that the current user has access to and match the query.

    Parameters

    • query: {
          action?: string;
          "environment.name"?: string;
          environmentId?: string;
          limit?: number;
          name?: string;
          next?: string;
          ownerId?: string;
          prev?: string;
          roles?: RoleType[];
          sort?: string;
          type?: string;
      }

      an object with query parameters

      • Optionalaction?: string

        Action on space. Supports only "?action=publish".

      • Optionalenvironment.name?: string

        Environment name to filter by. For example, "?environment.name=Development". Use an empty value to return spaces with no environment.

      • OptionalenvironmentId?: string

        Environment ID to filter by. For example, "?environmentId=67f4fba37f7cbb2f04ce727a". Use an empty value to return spaces with no environment.

      • Optionallimit?: number

        Maximum number of spaces to return.

      • Optionalname?: string

        Space name to search and filter for. Case-insensitive open search with wildcards both as prefix and suffix. For example, "?name=fin" will get "finance", "Final" and "Griffin".

      • Optionalnext?: string

        The next page cursor. Next links make use of this.

      • OptionalownerId?: string

        Space ownerId to filter by. For example, "?ownerId=123".

      • Optionalprev?: string

        The previous page cursor. Previous links make use of this.

      • Optionalroles?: RoleType[]

        Comma-separated list of roles to filter spaces by the caller's assignment role. For example, "?roles=publisher,facilitator" returns spaces where the caller has the publisher or facilitator role.

      • Optionalsort?: string

        Field to sort by. Prefix with +/- to indicate asc/desc. For example, "?sort=+name" to sort ascending on Name. Supported fields are "type", "name" and "createdAt".

      • Optionaltype?: string

        Type(s) of space to filter. For example, "?type=managed,shared".

    • Optionaloptions: ApiCallOptions

    Returns Promise<GetSpacesHttpResponse>

    GetSpacesHttpError