Interface SpacesAPI

interface SpacesAPI {
    clearCache: () => void;
    createSpace: (
        body: SpaceCreate,
        options?: ApiCallOptions,
    ) => Promise<CreateSpaceHttpResponse>;
    createSpaceAssignment: (
        spaceId: string,
        body: AssignmentCreate,
        options?: ApiCallOptions,
    ) => Promise<CreateSpaceAssignmentHttpResponse>;
    createSpaceShare: (
        spaceId: string,
        body: ShareCreate,
        options?: ApiCallOptions,
    ) => Promise<CreateSpaceShareHttpResponse>;
    deleteSpace: (
        spaceId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteSpaceHttpResponse>;
    deleteSpaceAssignment: (
        spaceId: string,
        assignmentId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteSpaceAssignmentHttpResponse>;
    deleteSpaceShare: (
        spaceId: string,
        shareId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteSpaceShareHttpResponse>;
    getSpace: (
        spaceId: string,
        options?: ApiCallOptions,
    ) => Promise<GetSpaceHttpResponse>;
    getSpaceAssignment: (
        spaceId: string,
        assignmentId: string,
        options?: ApiCallOptions,
    ) => Promise<GetSpaceAssignmentHttpResponse>;
    getSpaceAssignments: (
        spaceId: string,
        query: {
            assigneeId?: string;
            limit?: number;
            next?: string;
            prev?: string;
            type?: AssignmentType;
        },
        options?: ApiCallOptions,
    ) => Promise<GetSpaceAssignmentsHttpResponse>;
    getSpaces: (
        query: {
            action?: string;
            limit?: number;
            name?: string;
            next?: string;
            ownerId?: string;
            prev?: string;
            sort?: string;
            type?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetSpacesHttpResponse>;
    getSpaceShare: (
        spaceId: string,
        shareId: string,
        options?: ApiCallOptions,
    ) => Promise<GetSpaceShareHttpResponse>;
    getSpaceShares: (
        spaceId: string,
        query: {
            groupId?: string;
            limit?: number;
            name?: string;
            next?: string;
            prev?: string;
            resourceId?: string;
            resourceType?: string;
            type?: ShareType;
            userId?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetSpaceSharesHttpResponse>;
    getSpaceTypes: (
        options?: ApiCallOptions,
    ) => Promise<GetSpaceTypesHttpResponse>;
    patchShare: (
        spaceId: string,
        shareId: string,
        body: SharePatch,
        options?: ApiCallOptions,
    ) => Promise<PatchShareHttpResponse>;
    patchSpace: (
        spaceId: string,
        body: SpacePatch,
        options?: ApiCallOptions,
    ) => Promise<PatchSpaceHttpResponse>;
    updateSpace: (
        spaceId: string,
        body: SpaceUpdate,
        options?: ApiCallOptions,
    ) => Promise<UpdateSpaceHttpResponse>;
    updateSpaceAssignment: (
        spaceId: string,
        assignmentId: string,
        body: AssignmentUpdate,
        options?: ApiCallOptions,
    ) => Promise<UpdateSpaceAssignmentHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for spaces api requests.

Type declaration

    • (): void
    • Clears the cache for spaces api requests.

      Returns void

createSpace: (
    body: SpaceCreate,
    options?: ApiCallOptions,
) => Promise<CreateSpaceHttpResponse>

Creates a space. Spaces names must be unique. Spaces of type data should only be used for Qlik Talend Data Integration projects.

Type declaration

an object with the body content

CreateSpaceHttpError

createSpaceAssignment: (
    spaceId: string,
    body: AssignmentCreate,
    options?: ApiCallOptions,
) => Promise<CreateSpaceAssignmentHttpResponse>

Creates an assignment for a user or group (assignee) to a space with the specified roles. Assignments are not required for space owners, who receive all assignableRoles by default. Only one assignment can exist per space, per user or group.

Type declaration

The ID of the space of the assignment.

an object with the body content

CreateSpaceAssignmentHttpError

createSpaceShare: (
    spaceId: string,
    body: ShareCreate,
    options?: ApiCallOptions,
) => Promise<CreateSpaceShareHttpResponse>

Create a space share

Type declaration

The ID of the space of the share.

an object with the body content

CreateSpaceShareHttpError

deleteSpace: (
    spaceId: string,
    options?: ApiCallOptions,
) => Promise<DeleteSpaceHttpResponse>

Deletes a space. Ensure that you first delete all resources from the space to avoid orphaning content.

Type declaration

The ID of the space to delete.

DeleteSpaceHttpError

deleteSpaceAssignment: (
    spaceId: string,
    assignmentId: string,
    options?: ApiCallOptions,
) => Promise<DeleteSpaceAssignmentHttpResponse>

Deletes an assignment.

Type declaration

The ID of the space of the assignment.

The ID of the assignment to delete.

DeleteSpaceAssignmentHttpError

deleteSpaceShare: (
    spaceId: string,
    shareId: string,
    options?: ApiCallOptions,
) => Promise<DeleteSpaceShareHttpResponse>

Deletes a space share.

Type declaration

The ID of the space to which the share belongs.

The ID of the share to delete.

DeleteSpaceShareHttpError

getSpace: (
    spaceId: string,
    options?: ApiCallOptions,
) => Promise<GetSpaceHttpResponse>

Retrieves a single space by ID.

Type declaration

The ID of the space to retrieve.

GetSpaceHttpError

getSpaceAssignment: (
    spaceId: string,
    assignmentId: string,
    options?: ApiCallOptions,
) => Promise<GetSpaceAssignmentHttpResponse>

Retrieves a single assignment by assignment ID. Use GET /spaces/{spaceId}/assignments to list all users and groups assigned to the space and their assignment ID.

Type declaration

    • (
          spaceId: string,
          assignmentId: string,
          options?: ApiCallOptions,
      ): Promise<GetSpaceAssignmentHttpResponse>
    • Retrieves a single assignment by assignment ID. Use GET /spaces/{spaceId}/assignments to list all users and groups assigned to the space and their assignment ID.

      Parameters

      • spaceId: string

        The ID of the space of the assignment.

      • assignmentId: string

        The ID of the assignment to retrieve.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetSpaceAssignmentHttpResponse>

      GetSpaceAssignmentHttpError

The ID of the space of the assignment.

The ID of the assignment to retrieve.

GetSpaceAssignmentHttpError

getSpaceAssignments: (
    spaceId: string,
    query: {
        assigneeId?: string;
        limit?: number;
        next?: string;
        prev?: string;
        type?: AssignmentType;
    },
    options?: ApiCallOptions,
) => Promise<GetSpaceAssignmentsHttpResponse>

Retrieves the assignments of the space matching the query. Each assignment represents one user or group and their corresponding roles in the space. Assignments are not shown for the owner of a space, who receive all assignableRoles by default.

Type declaration

    • (
          spaceId: string,
          query: {
              assigneeId?: string;
              limit?: number;
              next?: string;
              prev?: string;
              type?: AssignmentType;
          },
          options?: ApiCallOptions,
      ): Promise<GetSpaceAssignmentsHttpResponse>
    • Retrieves the assignments of the space matching the query. Each assignment represents one user or group and their corresponding roles in the space. Assignments are not shown for the owner of a space, who receive all assignableRoles by default.

      Parameters

      • spaceId: string

        The ID of the space of the assignment.

      • query: {
            assigneeId?: string;
            limit?: number;
            next?: string;
            prev?: string;
            type?: AssignmentType;
        }

        an object with query parameters

        • OptionalassigneeId?: string

          Filters assignment for a specific assigneeid.

        • Optionallimit?: number

          Maximum number of assignments to return.

        • Optionalnext?: string

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

        • Optionalprev?: string

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

        • Optionaltype?: AssignmentType

          The type of assignment. Supported values are user or group.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetSpaceAssignmentsHttpResponse>

      GetSpaceAssignmentsHttpError

The ID of the space of the assignment.

an object with query parameters

GetSpaceAssignmentsHttpError

getSpaces: (
    query: {
        action?: string;
        limit?: number;
        name?: string;
        next?: string;
        ownerId?: string;
        prev?: string;
        sort?: string;
        type?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetSpacesHttpResponse>

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

Type declaration

    • (
          query: {
              action?: string;
              limit?: number;
              name?: string;
              next?: string;
              ownerId?: string;
              prev?: string;
              sort?: string;
              type?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetSpacesHttpResponse>
    • Retrieves spaces that the current user has access to and match the query.

      Parameters

      • query: {
            action?: string;
            limit?: number;
            name?: string;
            next?: string;
            ownerId?: string;
            prev?: string;
            sort?: string;
            type?: string;
        }

        an object with query parameters

        • Optionalaction?: string

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

        • 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.

        • 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

an object with query parameters

GetSpacesHttpError

getSpaceShare: (
    spaceId: string,
    shareId: string,
    options?: ApiCallOptions,
) => Promise<GetSpaceShareHttpResponse>

Retrieves a single space share by ID.

Type declaration

The ID of the space to which the share belongs.

The ID of the share to retrieve.

GetSpaceShareHttpError

getSpaceShares: (
    spaceId: string,
    query: {
        groupId?: string;
        limit?: number;
        name?: string;
        next?: string;
        prev?: string;
        resourceId?: string;
        resourceType?: string;
        type?: ShareType;
        userId?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetSpaceSharesHttpResponse>

Retrieves the shares of the space matching the query.

Type declaration

    • (
          spaceId: string,
          query: {
              groupId?: string;
              limit?: number;
              name?: string;
              next?: string;
              prev?: string;
              resourceId?: string;
              resourceType?: string;
              type?: ShareType;
              userId?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetSpaceSharesHttpResponse>
    • Retrieves the shares of the space matching the query.

      Parameters

      • spaceId: string

        The ID of the space containing the shares.

      • query: {
            groupId?: string;
            limit?: number;
            name?: string;
            next?: string;
            prev?: string;
            resourceId?: string;
            resourceType?: string;
            type?: ShareType;
            userId?: string;
        }

        an object with query parameters

        • OptionalgroupId?: string

          The ID of the group to which the resource is shared.

        • Optionallimit?: number

          Maximum number of shares to return.

        • Optionalname?: string

          The name of the shared resource.

        • Optionalnext?: string

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

        • Optionalprev?: string

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

        • OptionalresourceId?: string

          The ID of the shared resource.

        • OptionalresourceType?: string

          The type of the shared resource.

        • Optionaltype?: ShareType

          The type of share. user shares assign to a specific user, group shares assign to a specific group, and link shares provide anonymous access to a resource.

        • OptionaluserId?: string

          The ID of the user to which the resource is shared.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetSpaceSharesHttpResponse>

      GetSpaceSharesHttpError

The ID of the space containing the shares.

an object with query parameters

GetSpaceSharesHttpError

getSpaceTypes: (options?: ApiCallOptions) => Promise<GetSpaceTypesHttpResponse>

Gets a list of distinct space types available for use in the tenant.

Type declaration

GetSpaceTypesHttpError

patchShare: (
    spaceId: string,
    shareId: string,
    body: SharePatch,
    options?: ApiCallOptions,
) => Promise<PatchShareHttpResponse>

Updates properties of a space share (roles, and disabled state for link shares).

Type declaration

    • (
          spaceId: string,
          shareId: string,
          body: SharePatch,
          options?: ApiCallOptions,
      ): Promise<PatchShareHttpResponse>
    • Updates properties of a space share (roles, and disabled state for link shares).

      Parameters

      • spaceId: string

        The ID of the space to which the share belongs.

      • shareId: string

        The ID of the share to update.

      • body: SharePatch

        an object with the body content

      • Optionaloptions: ApiCallOptions

      Returns Promise<PatchShareHttpResponse>

      PatchShareHttpError

The ID of the space to which the share belongs.

The ID of the share to update.

an object with the body content

PatchShareHttpError

patchSpace: (
    spaceId: string,
    body: SpacePatch,
    options?: ApiCallOptions,
) => Promise<PatchSpaceHttpResponse>

Updates one or more properties of a space. To update all properties at once, use PUT /spaces/{spaceId}.

Type declaration

The ID of the space to update.

an object with the body content

PatchSpaceHttpError

updateSpace: (
    spaceId: string,
    body: SpaceUpdate,
    options?: ApiCallOptions,
) => Promise<UpdateSpaceHttpResponse>

Updates a space. To update specific properties, use PATCH /spaces/{spaceId}.

Type declaration

The ID of the space to update.

an object with the body content

UpdateSpaceHttpError

updateSpaceAssignment: (
    spaceId: string,
    assignmentId: string,
    body: AssignmentUpdate,
    options?: ApiCallOptions,
) => Promise<UpdateSpaceAssignmentHttpResponse>

Updates a single assignment by assignment ID. Use GET /spaces/{spaceId}/assignments to list all users and groups assigned to the space and their assignment ID. The complete list of roles must be provided.

Type declaration

    • (
          spaceId: string,
          assignmentId: string,
          body: AssignmentUpdate,
          options?: ApiCallOptions,
      ): Promise<UpdateSpaceAssignmentHttpResponse>
    • Updates a single assignment by assignment ID. Use GET /spaces/{spaceId}/assignments to list all users and groups assigned to the space and their assignment ID. The complete list of roles must be provided.

      Parameters

      • spaceId: string

        The ID of the space of the assignment.

      • assignmentId: string

        The ID of the assignment to update.

      • body: AssignmentUpdate

        an object with the body content

      • Optionaloptions: ApiCallOptions

      Returns Promise<UpdateSpaceAssignmentHttpResponse>

      UpdateSpaceAssignmentHttpError

The ID of the space of the assignment.

The ID of the assignment to update.

an object with the body content

UpdateSpaceAssignmentHttpError