> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Archive List2

> Get a page of data for an archive using a restriction string.

The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.
NsApiSlow threshold: 5000 ms. 

                Archive Restriction strings are OData or SQL-ish.
                They are parsed and converted into ArchiveRestrictions.
            

            For example:
            <code>
                "name begins 'Super'"
                "category = 3"
                "category in (2,3,4)"
                "xstop set"
                "registered after '2014.3.4'"
                "registered dateBetween ('2014.11.29', '2014.12.25')"
            </code>
            Unary operators:
            <code>"updatedDate lastWeek", "assocId currentAssociate"</code><para /><h2>Brackets and or</h2>
AND and OR can be used to combine terms. AND has a higher priority than OR
<code>"business = 2  AND name contains 'super'"</code>
Brackets can be used for grouping.
<code>"(business = 2 or category = 3) and name contains 'super'"</code><para /><h2>Aggregation operators</h2>

                The column names can encode grouping and summarizing.
                You add functions and modifiers to the column name to trigger aggregation.
            

            Example: group last names together, and inject a header row for each group.
            <code>
                GroupBy(lastName):Header
            </code>
            Example: count instances of middle names, and hide the individual rows, 
            report just the totals for each group using a footer. Note how the modifiers stack.
            <code>
                Count(middleName):HideDetail:Footer
            </code>
            Example: the aggregator functions can nest, so you can say
            <code>
                GroupBy(DatePart(personUpdatedDate):YearMonth):Header
            </code><h2>Strings</h2>

                Use the begins or contains operators to do string searches.
                You can also use the normal = operator to do string exact match checks.
            


                Use backslash to escape single quotes in strings
                (note that backslash needs to be doubled because c# also uses backslash escapes):
            
<code>"department contains 'Bob\\'s'"</code><para />



## OpenAPI

````yaml /openapi/agent/openapi-v3-ArchiveAgent.json post /api/v1/Agents/Archive/GetArchiveList2
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - ArchiveAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/Archive/GetArchiveList2:
    post:
      tags:
        - Archive_Agent
      summary: Get Archive List2
      description: "Get a page of data for an archive using a restriction string.\n\nThe columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.\r\nNsApiSlow threshold: 5000 ms. \r\n\r\n                Archive Restriction strings are OData or SQL-ish.\r\n                They are parsed and converted into ArchiveRestrictions.\r\n            \r\n\r\n            For example:\r\n            <code>\r\n                \"name begins 'Super'\"\r\n                \"category = 3\"\r\n                \"category in (2,3,4)\"\r\n                \"xstop set\"\r\n                \"registered after '2014.3.4'\"\r\n                \"registered dateBetween ('2014.11.29', '2014.12.25')\"\r\n            </code>\r\n            Unary operators:\r\n            <code>\"updatedDate lastWeek\", \"assocId currentAssociate\"</code><para /><h2>Brackets and or</h2>\r\nAND and OR can be used to combine terms. AND has a higher priority than OR\r\n<code>\"business = 2  AND name contains 'super'\"</code>\r\nBrackets can be used for grouping.\r\n<code>\"(business = 2 or category = 3) and name contains 'super'\"</code><para /><h2>Aggregation operators</h2>\r\n\r\n                The column names can encode grouping and summarizing.\r\n                You add functions and modifiers to the column name to trigger aggregation.\r\n            \r\n\r\n            Example: group last names together, and inject a header row for each group.\r\n            <code>\r\n                GroupBy(lastName):Header\r\n            </code>\r\n            Example: count instances of middle names, and hide the individual rows, \r\n            report just the totals for each group using a footer. Note how the modifiers stack.\r\n            <code>\r\n                Count(middleName):HideDetail:Footer\r\n            </code>\r\n            Example: the aggregator functions can nest, so you can say\r\n            <code>\r\n                GroupBy(DatePart(personUpdatedDate):YearMonth):Header\r\n            </code><h2>Strings</h2>\r\n\r\n                Use the begins or contains operators to do string searches.\r\n                You can also use the normal = operator to do string exact match checks.\r\n            \r\n\r\n\r\n                Use backslash to escape single quotes in strings\r\n                (note that backslash needs to be doubled because c# also uses backslash escapes):\r\n            \r\n<code>\"department contains 'Bob\\\\'s'\"</code><para />"
      operationId: v1ArchiveAgent_GetArchiveList2
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request
        description: >-
          GuiName, ProviderName, SortOrder, Restriction, Entities, Page,
          PageSize
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.ArchiveListItem
            text/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.ArchiveListItem
            application/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.ArchiveListItem
            text/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.ArchiveListItem
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.ArchiveListItem
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.Services.ArchiveListItem
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.ArchiveCarriers.GetArchiveList2Request:
      description: >-
        GetArchiveList2: Get a page of data for an archive using a restriction
        string. The columns returned will be those set as chosen columns, using
        either the SetChosenColumns service or the corresponding
        SelectableMDOList.SetSelected.
      type: object
      properties:
        GuiName:
          type: string
        ProviderName:
          type: string
        SortOrder:
          type: string
        Restriction:
          type: string
        Entities:
          type: string
        Page:
          format: int32
          type: integer
        PageSize:
          format: int32
          type: integer
    SuperOffice.CRM.Services.ArchiveListItem:
      description: "Carrier object for ArchiveListItem.\r\nServices for the ArchiveListItem Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IArchiveAgent\">Archive Agent</see>."
      type: object
      properties:
        EntityName:
          description: >-
            The entity name of the ArchiveListItem. An ArchiveList may contain
            rows from different entities.
          type: string
        PrimaryKey:
          format: int32
          description: The  primary key for the row
          type: integer
        ColumnData:
          description: >-
            Dictionary of column name - column data items. Each column data item
            contains a display value, a tooltip hint, a link hint, and an
            orderby value. <para/>The display value is encoded by the
            CultureDataFormatter and can be decoded / localized by that class;
            all other values are optional. <para/>Tooltip hints can be passed to
            the TooltipProvider (Tooltip service) to be translated into an
            actual tootip.
          type: object
          additionalProperties:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnData
        LinkHint:
          description: >-
            Link hint for the row, indicating things like navigation links that
            can be presented as clickable hyperlinks
          type: string
        StyleHint:
          description: >-
            Style hint for the row, for instance 'retired' for associates or
            'private' for appointments. Presentation layers can interpret the
            style hints as they see fit.
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.ArchiveLists.ArchiveColumnData:
      description: "Data carrier class for an item (cell) in an archive. This class contains properties and\r\nmembers for three distinct values: The (visible) display value; the tooltip hint, and the link hint."
      type: object
      properties:
        DisplayValue:
          description: "The visible display value for an archive cell. It is always a string, and other data types\r\nare converted to string according to the invariant culture. Further conversion to the local\r\nculture is the responsibility of the client."
          type: string
        TooltipHint:
          description: "The tooltip hint is either a text to be shown (after resource tag substitution), or a tooltip\r\nkey to be given to the tooltip provider system in order to asynchronoously retrieve the actual\r\ntooltip."
          type: string
        LinkHint:
          description: "The link hint consists of information to construct an actual link; additional information (such\r\nas a view context) must be provided by the client, who is also responsible for building the link.\r\nThe content of the link will generally be one or more ids, such as contact_id=123."
          type: string
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [SuperOffice.WebApi.Data.Archive GetArchiveList2Request](/en/api/reference/webapi/SuperOffice.WebApi.Data.Archive_GetArchiveList2Request.md)
- [NSArchiveAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSArchiveAgent.md)
- [SuperOffice.WebApi.Agents.ArchiveAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ArchiveAgent.md)
- [SuperOffice.WebApi.Agents.IArchiveAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IArchiveAgent.md)
- [Get Archive](/en/api/reference/restful/rest/archive/get-archive.md)
- [Get Archive_ G E T](/en/api/reference/restful/rest/archive/get-archive_-g-e-t.md)
