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

# Find Order By2

> Execute a Find operation and return a page of results.

The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
NsApiSlow threshold: 5000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-FindAgent.json post /api/v1/Agents/Find/FindOrderBy2
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - FindAgent
  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/Find/FindOrderBy2:
    post:
      tags:
        - Find_Agent
      summary: Find Order By2
      description: "Execute a Find operation and return a page of results.\n\nThe criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.\r\nNsApiSlow threshold: 5000 ms."
      operationId: v1FindAgent_FindOrderBy2
      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.FindCarriers.FindOrderBy2Request
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request
        description: StorageType, ProviderName, StorageKey, PageSize, PageNumber, OrderBy
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.FindResults'
            text/json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.FindResults'
            application/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.FindResults'
            text/xml:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.FindResults'
            application/json-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.FindResults'
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/SuperOffice.CRM.Services.FindResults'
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.FindCarriers.FindOrderBy2Request:
      description: >-
        FindOrderBy2: Execute a Find operation and return a page of results. The
        criteria for the Find are fetched from the restriction storage provider
        according to the given parameters. The columns of the result are
        calculated based on the restriction. The orderby parameter is used for
        sorting the results.<para/>The other variants of the Find method allow
        you greater control over the individual aspects of the process.
      type: object
      properties:
        StorageType:
          type: string
        ProviderName:
          type: string
        StorageKey:
          type: string
        PageSize:
          format: int32
          type: integer
        PageNumber:
          format: int32
          type: integer
        OrderBy:
          type: string
    SuperOffice.CRM.Services.FindResults:
      description: "Result carrier for the Find operation. It contains a set of column specifications, and a set of row, where each row contains the columns. The row set is the result of carrying out some search operation.\r\n<para />\r\nCarrier object for FindResults.\r\nServices for the FindResults Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IFindAgent\">Find Agent</see>."
      type: object
      properties:
        ArchiveColumns:
          description: Array of ColumnInfo column specifications
          type: array
          items:
            $ref: >-
              #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
        ArchiveRows:
          description: >-
            Array of archive list items, i.e., the service layer carrier for
            archive rows. These are the find results, represented as archive
            rows
          type: array
          items:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.ArchiveListItem'
        RowCount:
          format: int32
          description: >-
            Count of rows, independent of paging. If you order up page 1 with
            page size 50, the row count may still be 279, that being the number
            of rows that would have been returned in a  paging-off situation
          type: integer
        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.ArchiveColumnInfo:
      description: "This class carries information about the definition and properties of an archive display column. It is used by the archive\r\nMDO providers to construct column lists for the configuration dialogs, and by the archive control to know what type\r\n(and other properties) each column has. The class is serializable and used on both the application\r\nand Web server sides."
      type: object
      properties:
        DisplayName:
          description: The column name to show, can be a resource identifier string
          type: string
        DisplayTooltip:
          description: >-
            The column tooltip, used in the column list and in the column
            headings
          type: string
        DisplayType:
          description: "Type of column, so that the archive knows how to display it (actual display values are always strings, invariant-culture formatted).\r\nThis name can contain resource tags."
          type: string
        CanOrderBy:
          description: Can this column be used for sorting?
          type: boolean
        Name:
          description: "Unique identity of this column (in this particular context); the name to be used when requesting the column from a provider,\r\nsetting restrictions or order by criteria"
          type: string
        CanRestrictBy:
          description: Can this column be used as a restriction
          type: boolean
        RestrictionType:
          description: >-
            The data type of the restriction; use this to retrieve the legal
            operators for the restriction
          type: string
        RestrictionListName:
          description: >-
            If the restriction data type is 'list', this property contains the
            name of the SoList so that choices can be shown
          type: string
        IsVisible:
          description: Is this column visible to the user in configuration dialogs etc
          type: boolean
        ExtraInfo:
          description: >-
            Example: "navigator" -> Should this column be mapped to a
            hyperlinked navigator text type?
          type: string
        Width:
          description: "The width specification, if the column info has been extended with GUI-based information.\r\nIt is either \"n%\" or \"nc\", where n is an integer. Percent-formatted fields grow and shrink; number-of-characters\r\nformatted fields have constant width when the whole archive width changes."
          type: string
        IconHint:
          description: "Icon hint corresponding to the display name; this icon hint is used in the configuration dialog\r\nand other places where we 'talk about' the columns of the archive. The actual heading\r\nof the archive may also contain icons in lieu of textual names, the icon hint for that\r\nis specified in {SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo.HeadingIconHint} and is a different one."
          type: string
        HeadingIconHint:
          description: "Icon hint for the archive heading only. If this is a nonempty string, the archive header\r\nshould use this icon and ignore the {SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo.DisplayName}. Otherwise, the DisplayName\r\nshould be used as the heading."
          type: string
    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.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.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.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.Find FindOrderBy2Request](/en/api/reference/webapi/SuperOffice.WebApi.Data.Find_FindOrderBy2Request.md)
- [NSFindAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSFindAgent.md)
- [SuperOffice.WebApi.Agents.FindAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.FindAgent.md)
- [SuperOffice.WebApi.Agents.IFindAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IFindAgent.md)
- [Find From Restrictions Columns Order By2](/en/api/reference/restful/agent/find_agent/find-from-restrictions-columns-order-by2.md)
- [SuperOffice.WebApi.Data.Find FindFromRestrictionsColumnsOrderBy2Request](/en/api/reference/webapi/SuperOffice.WebApi.Data.Find_FindFromRestrictionsColumnsOrderBy2Request.md)
