Request

Response

    Queries

    exchangeByVersions

    GraphQL: Query

    Retrieves a list of Elements in an exchange by version.

    Template for Query:

    query GetExchangeByVersions($exchangeId: ID!, $filter: ExchangeFilterInput!) {
      exchangeByVersions(exchangeId: $exchangeId, filter: $filter) {
        # ExchangeByVersions Fields
      }
    }
    

    Template for Query Variables:

    {
      "exchangeId" : "<SOME-ID-TYPE-SCALAR-VALUE>",
      "filter" : "<SOME-EXCHANGEFILTER-INPUT
    }
    


    Arguments

    exchangeId*
    ID! non-null
    The ID of the exchange.
    filter*Specifies how to filter the elements of an exchange. You can filter by versionId.
    * Required

    Possible Returns

    Value TypeDescription
    Exchange! non-null A specific collection of Elements.


    Examples

    Example 1

    Retrieve elements of specified versions in an exchange by exchangeId.

    Currently, only the versions from ‘latest-1’ to ‘latest’ are supported either in combination or independently.

    The following filters can be used:-

    1. version.fromId==’latest-1’
    2. version.toId==’latest’
    3. version.fromId==’latest-1’ and version.toId==’latest’

    Query:

    query GetElementsInExchangeByVersions ($exchangeId: ID!, $exchangeFilterInput: ExchangeFilterInput!, $elementPagination: PaginationInput){
      exchangeByVersions(exchangeId: $exchangeId, filter: $exchangeFilterInput) {
          id
          name
          elements (pagination: $elementPagination){
              pagination{
                  pageSize
                  cursor
              }
              results{
                  id
                  name
                  properties(filter: {names: ["Operation"]}){
                      results{
                          name
                          value
                      }
                  }
              }
          }
        }
      }
    
    Show More

    Query Variables:

    {
       "exchangeId": "ZXhjfnlwdWFzY1NicWlIT0R1R0s4OUkwTHdfTDJDfjkwMGM5ODY1LWI2ZmMtMzI0Ny04NWUxLTgxMmZhOGY1ZTJkNA",
       "exchangeFilterInput" : {
           "query": "version.fromId==latest-1 and version.toId==latest"
       },
       "elementPagination": {
           "limit": 3,
           "cursor": ""
       }
    }
    
    Show More

    Response:

    {
      "data": {
          "exchangeByVersions": {
              "id": "ZXhjfmNvLmNqbTNjUVBkUkJHS2Z0NklXcVREZFF+NGEwYTI0ZTktYzhjMC0zYjA4LWE1YzgtZjMzMDQxOThjOTYy",
              "name": "FourWalls_3D-0306-ft",
              "elements": {
                  "pagination": {
                      "pageSize": 2,
                      "cursor": "67cff34c-5f48-4741-a906-e25e89ab8570"
                  },
                  "results": [
                      {
                          "id": "18F3A3ECD10B38BFED6C384009E623907BF63BD0",
                          "name": "358688",
                          "properties": {
                              "results": [
                                  {
                                      "name": "Operation",
                                      "value": "REMOVE"
                                  }
                              ]
                          }
                      },
                      {
                          "id": "0D25694A92A20714FF3992D9BCDD86474EBB3D0E",
                          "name": "359330",
                          "properties": {
                              "results": [
                                  {
                                      "name": "Operation",
                                      "value": "REMOVE"
                                  }
                              ]
                          }
                      }
                  ]
              }
          }
        }
     }
    
    Show More