Function getCollections

  • Retrieves the collections that the user has access to. This endpoint does not return the user's favorites collection, which can be retrieved with /v1/collections/favorites.

    Parameters

    • query: {
          creatorId?: string;
          id?: string;
          includeItems?: string;
          limit?: number;
          name?: string;
          next?: string;
          prev?: string;
          query?: string;
          sort?:
              | "-name"
              | "+name"
              | "+createdAt"
              | "-createdAt"
              | "+updatedAt"
              | "-updatedAt";
          type?: CollectionTypes;
          types?: CollectionTypes[];
      }

      an object with query parameters

      • OptionalcreatorId?: string

        The case-sensitive string used to search for a resource by creatorId.

      • Optionalid?: string

        The collection's unique identifier.

      • OptionalincludeItems?: string

        Includes the list of items belonging to the collections. Supported parameters are 'limit', 'sort' and 'resourceType'. Supported formats are json formatted string or deep object style using square brackets.

      • Optionallimit?: number

        The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive).

      • Optionalname?: string

        The case-sensitive string used to search for a collection by name.

      • Optionalnext?: string

        The cursor to the next page of resources. Provide either the next or prev cursor, but not both.

      • Optionalprev?: string

        The cursor to the previous page of resources. Provide either the next or prev cursor, but not both.

      • Optionalquery?: string

        The case-insensitive string used to search for a resource by name or description.

      • Optionalsort?: "-name" | "+name" | "+createdAt" | "-createdAt" | "+updatedAt" | "-updatedAt"

        The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively.

      • Optionaltype?: CollectionTypes

        The case-sensitive string used to filter for a collection by type. Retrieve private collections with private, public collections with publicgoverned, and tags with public.

      • Optionaltypes?: CollectionTypes[]

        A comma-separated case-sensitive string used to filter by multiple types.

    • Optionaloptions: ApiCallOptions

    Returns Promise<GetCollectionsHttpResponse>

    GetCollectionsHttpError