Does OnceSource Gateway have an API I can use to integrate with other systems?

In this article, get an in depth description of Idencia's available API calls

Overview

The Idencia Public API offers a robust set of GraphQL endpoints to perform various tasks efficiently. This article covers essential operations and configurations available through GraphQL calls:

Authentication

Configure and manage your Idencia account settings and API access.

Handling Errors

Retrieve Data

    • Get a List of Items: Fetch detailed information about items stored in Idencia.

    • Get a List of Projects: Retrieve comprehensive data regarding projects managed within Idencia.

Create Operations

    • Create a New Item Type: Define and add new item types to categorize items effectively.

    • Create a New Item: Initiate the creation of a new item within the Idencia system.

    • Create a New Project: Establish a new project framework within Idencia's project management system.

    • Create a New Custom Item Type: Customize item types within existing projects or independently without a predefined project structure.

    • Create a New Custom Property: Define and assign custom properties to items or projects for enhanced data management.

Update Operations

    • Update an Existing Item: Modify and update details of an item stored in Idencia associated with created organization.

    • Update an Item's Custom Property: Adjust specific custom properties associated with an item for accurate data representation.

    • Update an Existing Project: Modify and update existing project details and configurations.

    • Update an Item Type: Adjust and update the characteristics and attributes of predefined item types within Idencia.

    • Update a Custom Item Type: Modify and refine custom item types associated with ongoing projects or standalone configurations.

By leveraging Idencia's GraphQL API capabilities for these tasks, users can streamline their workflows, enhance data management practices, and maintain operational efficiency within their projects and inventory management processes.

Authentication

Idencia's API utilizes access tokens for authentication. To obtain an access token, you need to authenticate using Idencia's login REST API endpoint. Upon successful authentication, the login endpoint will provide you with an access token.

Access tokens serve as credentials for accessing Idencia's API resources securely. They are scoped to specific permissions based on the user or application making the request.

It is crucial to handle access tokens securely and avoid exposing them in publicly accessible areas like GitHub repositories or client-side code. Always transmit access tokens over HTTPS to protect them from interception.

All API requests to Idencia must be made over HTTPS. Requests made over plain HTTP will be rejected for security reasons. Additionally, API requests without valid access tokens will not be authorized.

By leveraging access tokens generated via Idencia's login REST API endpoint, you ensure secure and authenticated interactions with Idencia's API, maintaining the integrity and confidentiality of your data.

For accessing various API we need to get AccessToken which act as key to call all the available openAPI. Replace "yourusername@gmail.com" and "yoursecretpassword" with the actual credentials which created on Idencia portal and also replace Endpoint with actual Idencia endpoint.

 

Here is example curl for fetching AccessToken 

curl --location 'https://v7uaqzrlgk.execute-api.us-east-2.amazonaws.com/prod/api/v1/login' --header 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' --header 'Content-Type: application/json' --data-raw '{ "username" : "yourusername@gmail.com", // Required "password" : "yoursecretepassword" // Required } '

 

This call returns AccessToken attached with specific user requested through body

 

Response send by server

{ "status": "success", "data": { "ChallengeParameters": {}, "AuthenticationResult": { "AccessToken": "{<AccessToken>}", "ExpiresIn": 86400, "TokenType": "Bearer", "RefreshToken": "{<RefreshToken>}", "IdToken": "{<IdToken>}" } } }

Breakdown of response received after calling login API

An access token is a compact digital artifact, typically in the form of a JSON Web Token (JWT), that grants permissions to a user (the resource owner) to access certain resources. These tokens act as an electronic key, ensuring that the user has the correct permissions to access the data they are requesting

A refresh token is a special token that is used to obtain more access tokens. This allows you to have short-lived access tokens without having to collect credentials every time one expires.

The ID token is a JSON Web Token (JWT) that contains claims about the identity of the authenticated user, such as name, email, and other details. You can use this identity information inside your application. The ID token can also be used to authenticate users to your resource servers or server applications.

Errors in Idencia APIs

Idencia GraphQL API follows standard HTTP response codes to indicate the success or failure of API requests. Here’s how errors are categorized:

  • Success Codes (2xx): Requests that fall within the 2xx range indicate successful operations. These responses confirm that the requested action was completed successfully.

  • Client Errors (4xx): Errors in the 4xx range indicate issues with the request made by the client. These errors can often be resolved by correcting the request parameters or configuration. Examples include:

    • 400 Bad Request: The request was invalid or malformed.

    • 401 Unauthorized: The request lacks valid authentication credentials.

    • 403 Forbidden: The server understood the request but refuses to authorize it.

    • 404 Not Found: The requested resource could not be found.

    • 422 Unprocessable Entity: The server understands the request but cannot process it due to semantic errors (e.g., validation errors).

    Additionally, some 4xx errors include error codes that provide brief explanations of the specific issue encountered, such as missing required parameters or invalid input data.

  • Server Errors (5xx): Errors in the 5xx range indicate problems with Idencia’s servers and are relatively rare. These errors typically require no action from the client other than retrying the request after some time.

Handling Errors

To handle errors effectively when interacting with Idencia's GraphQL API:

  • Programmatic Handling: Implement logic to interpret and handle specific error codes returned in the 4xx range programmatically. For instance, handle scenarios where a resource is not found or a request is unauthorized.

  • Retry Mechanisms: Consider implementing retry mechanisms for 5xx errors, which may indicate temporary server issues.

By adhering to these error handling practices, developers can ensure robust and reliable integration with Idencia's GraphQL API, enhancing the overall stability and resilience of their applications.

Retrieve Data

Get a List of Items Types

Details of parameters in curl.

<ItemType> - Under this tag is all of the information about the Item Type of this Item.

  • <Id> - The internal unique identifier for the item type.  This is a 16 byte GUID.

  • <searchNumber> - The item type's Number field.

  • <searchName> - The item type's Name field

  • <defaultProcessId> - The internal unique identifier for the defaultProcess.  This is a 16 byte GUID.

  • <Type> - The type of ItemType.

  • <ProjectId> - The internal unique identifier for the Project.  This is a 16 byte GUID.

  • <productSegment> -

  • <isActive> - A flag to indicate if the itemType is active or not.  'true' if active, or 'false' if not active.

  • <CreatedAt> - The UTC date/time stamp the item was created.

  • <isDeleted> - A flag to indicate if the item has been deleted.  'true' if deleted, or 'false' if not deleted.

  • <updatedAt> - The UTC date/time stamp the item type was last modified on the server.

  • <QuantityRequired> - The value of the number of quantity required.

  • <quantityProduced> - The value of the number of quantity produced.

  • <organizationID> - The internal unique identifier for the respected organisation id where this itemtype belongs.  This is a 16 byte GUID.

  • <ModifiedBy> - The first and last name of the user who recorded the step.

  • <CustomProperties> - Under this tag are all of the Item Type Custom Properties that have values.

    • <CustomProperty> - (multiple) - Under this tag will be Name and Value pairs for each Item Type Custom property that has a value

      • <Name> - The name of the Custom Property

      • <CustomPropertyValue> - The value of the Custom Property

<Items> - Under this tag will be listed each item within the Item Type

  • <Item> (multiple) - a single item in the list of items that match the request parameters

    • <Id> - The internal unique identifier for the item.  This is a 16 byte GUID.

    • <IsDeleted> - A flag to indicate if the item has been deleted.  'true' if deleted, or 'false' if not deleted.

    • <updatedAt> - The UTC date/time stamp the item was last modified on the server.

    • <CreatedById> - The unique identifier of the user who created the item.

    • <CreatedBy> - The first and last name of the user who created the item.

    • <CreatedAt> - The UTC date/time stamp the item was created.

    • <CurrentPhase> - The name of the most recent Process Phase

    • <CustomProperties> - Under this tag are all of the Item Custom Properties that have values

      • <CustomProperty> - Under this tag will be Name and Value pairs for each Item Custom property that has a value

        • <Name> - The name of the Custom Property

        • <Value> - The value of the Custom Property

    • <HasFailedSteps> - A flag to indicate if the Item has Pass/Fail steps in the current process marked as Failed. 'true' if there are failed steps, 'false' if there are no failed steps.

    • <IsProcessComplete> - A flag to indicate if the Item is currently running a process or not.  'true' if no process is running, or 'false' if a process is running.

    • <SerialNumber> - The serial number assigned to the Item.

    • <searchNumber> - The search number assigned to the Item.

    • <createdAt> - The date/time the Item was created.

    • <itemTypeId> - The internal unique identifier for the itemTypeId.  This is a 16 byte GUID.

    • <projectId> - The internal unique identifier for the project.  This is a 16 byte GUID.

    • <shipmentId> - The internal unique identifier for the Shipment.  This is a 16 byte GUID.

    • <serialNumberType> - The type of Serial Number.

    • <latitude> –

    • <longitude> –

    • <sentToHicams> -

    • <forneyTestPending> -

    • <organizationID> - The internal unique identifier for the associated organization.  This is a 16 byte GUID.

    • <modifiedBy> The internal unique identifier for the associated user who modified.  This is a 16 byte GUID.

    • <deletedAt> The date/time the Item was deleted.

    • <Process> (multiple) - Under this tag is all of the information about a process.  If more than one process has been run on an item, this tag is used for each process.

      • <Name> - The name of the Process.

      • <ProcessPhases> (multiple) - Under this tag are all of the Process Phases

        • <Phase> (multiple) - Under this tag are the Phase properties

          • <Name> - The name of the Phase

          • <Steps> - Under this tag are all of the steps in the Phase

            • <Step> (multiple) - This tag indicates a step within this phase of the process.

              • <Name> - The name of the step.

              • <id> - The internal unique identifier for the associated step. This is a 16 byte GUID.

              • <description> - The description of the step.

              • <phaseID> - The identifier for the phase this step belongs to.

              • <order> - The order of the step within the phase.

              • <type> - The type of step. <isRequired> - Whether the step is required (boolean).

              • <allowFailedStep> - Whether the step can fail (boolean).

              • <hasNotApplicableOption> - Whether the step has a "Not Applicable" option (boolean).

              • <defaultOption> - The default option for the step. <customPassLabel> - Custom label for the "Pass" option.

              • <customPassLabel> Custom label for the "Pass" option.

              • <customFailLabel> - Custom label for the "Fail" option.

              • <customNALabel> - Custom label for the "Not Applicable" option.

              • <customPropertyId> - Identifier for the custom property associated with the step.

              • <defaultValueOfCustomProperty> - Default value for the custom property.

              • <isHidden> - Whether the step is hidden (boolean).

              • <propertyDropdownId> - Identifier for the property dropdown associated with the step.

              • <mask> - Mask applied to the step's input.

              • <isDefaultToCurrentDate> - Whether the step defaults to the current date (boolean).

              • <decimalPlace> - Decimal places allowed for the step's input. <lowerLimit> - Lower limit for the step's input.

              • <lowerLimit> - Lower limit for the step's input.

              • <upperLimit> - Upper limit for the step's input.

              • <isComputedLimits> - Whether the limits are computed (boolean).

              • <lowerLimitFormula> - Formula for computing the lower limit.

              • <upperLimitFormula> - Formula for computing the upper limit.

              • <allowValuesOutsideOfRange> - Whether values outside the range are allowed (boolean).

              • <tagName> - Tag name associated with the step.

              • <organizationID> - Identifier for the organization.

              • <isDeleted> - Whether the step is deleted (boolean).

              • <deletedAt> - The UTC date/time the step was deleted.

              • <createdAt> - The UTC date/time the step was created.

              • <updatedAt> - The UTC date/time stamp the step was last modified on the server.

              • <modifiedBy> - The internal unique identifier for the associated user who modified.  This is a 16 byte GUID.

Requires Parameters in Query

  • organizationID

Here is example curl for fetching a list of Items

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "query ItemTypesByOrganizationID { itemTypesByOrganizationID(organizationID: \"23dfaeba-248d-46db-a2e9-b0b48955ce09\") { items { id number name searchName searchNumber defaultProcessId type projectId productSegment isActive isDeleted deletedAt createdAt updatedAt quantityRequired quantityProduced organizationID modifiedBy ItemTypeCustomProperties { nextToken items { CustomProperties { name } customPropertyValue } } Items { nextToken items { id serialNumber searchNumber itemTypeId processId projectId shipmentId currentPhaseId isProcessComplete hasFailedSteps serialNumberType latitude sentToHicams longitude isDeleted createdAt updatedAt forneyTestPending organizationID createdBy modifiedBy deletedAt Processes { name ProcessPhases { nextToken items { name ProcessSteps { nextToken items { id name description phaseID order type isRequired allowFailedStep hasNotApplicableOption defaultOption customPassLabel customFailLabel customNALabel customPropertyId defaultValueOfCustomProperty isHidden propertyDropdownId mask isDefaultToCurrentDate decimalPlace lowerLimit upperLimit isComputedLimits lowerLimitFormula upperLimitFormula allowValuesOutsideOfRange tagName organizationID isDeleted deletedAt createdAt updatedAt modifiedBy}}}}} ItemsCustomProperties { items { CustomProperties { name } customPropertyValue }}}}}}}" }'

 

Response Example  

{ "data": { "itemTypesByOrganizationID": { "items": [ { "id": "15ac130d-57e7-4afe-b254-b4fd0ef8b9de", "number": "NaN", "name": "cmp3gj", "searchName": "cmp3gj", "searchNumber": "NaN", "defaultProcessId": "042f10e8-61ed-429f-99d2-9ea742194ea3", "type": 0, "projectId": null, "productSegment": 0, "isActive": true, "isDeleted": null, "deletedAt": null, "createdAt": "2024-02-20T08:20:21.245Z", "updatedAt": "2024-02-15T12:49:31.292Z", "quantityRequired": null, "quantityProduced": null, "organizationID": "23dfaeba-248d-46db-a2e9-b0b48955ce09", "modifiedBy": null, "ItemTypeCustomProperties": { "nextToken": null, "items": [] }, "Items": { "nextToken": null, "items": [] } } ] } } }

 

nextToken : It is defined as an identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list

In response we will receive array of all item according to limit which was applied by us.

Get a List of Projects

Requires Parameters in Query

  • organizationID

    Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "query MyQuery { projectsByOrganizationID(organizationID: \"65959370-b79b-4a74-8e0f-6991969bcf69\" ,limit:1) {items { updatedAt organizationID number name modifiedBy isItemLimited isCompleted isDeleted inStock id defaultProcessId customerId createdAt completedAt deletedAt ProjectCustomProperties { items { CustomProperties { name } } }Processes { name }}}}"}'

 

Response Example 

{ "data": { "projectsByOrganizationID": { "items": [ { "updatedAt": "2024-02-28T12:52:59.477Z", "organizationID": "65959370-b79b-4a74-8e0f-6991969bcf69", "number": "7505388688", "name": "y7owup", "modifiedBy": null, "isItemLimited": true, "isCompleted": false, "isDeleted": null, "inStock": true, "id": "a87e81e0-2a6b-40fa-b67e-daff92041bd7", "defaultProcessId": "21b84ef8-05de-4538-ae4f-dec91cf0dc44", "customerId": null, "createdAt": "2024-02-28T12:52:59.477Z", "completedAt": null, "deletedAt": null, "ProjectCustomProperties": { "items": [] }, "Processes": { "name": "g64xml" } } ] } } }

In response we will receive array of all item according to limit which was applied by us.

Mutations

Create a New Item Types

This call will create a new Item Type (not Process specific)

Requires Parameters in Mutations

  • isActive

  • name

  • number

  • type: 10

  • searchNumber

  • searchName

  • organizationID

  • productSegment

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createItemTypes(input: {defaultProcessId: \"21b84ef8-05de-4538-ae4f-dec91cf0dc44\", isActive: true, isDeleted: false, modifiedBy: \"null\", name: \"openAPI\", number: \"43286\", organizationID: \"7505388688\", productSegment: 10, projectId: \"21b84ef8-05de-4538-ae4f-dec91cf0dc44\", quantityProduced: 10, quantityRequired: 10, searchNumber: \"8002676643\", searchName: \"3wfvn\", type: 10}) { id createdAt defaultProcessId deletedAt isActive isDeleted modifiedBy name number organizationID productSegment projectId quantityProduced quantityRequired searchNumber searchName type updatedAt } }" }'

 

Response Example 

{ "data": { "createItemTypes": { "id": "d11d3fe9-65ac-4587-92f6-fd7d914a4e6e", "createdAt": "2024-06-18T12:45:12.732Z", "defaultProcessId": "21b84ef8-05de-4538-ae4f-dec91cf0dc44", "deletedAt": null, "isActive": true, "isDeleted": false, "modifiedBy": "null", "name": "openAPI", "number": "43286", "organizationID": "7505388688", "productSegment": 10, "projectId": "21b84ef8-05de-4538-ae4f-dec91cf0dc44", "quantityProduced": 10, "quantityRequired": 10, "searchNumber": "8002676643", "searchName": "3wfvn", "type": 10, "updatedAt": "2024-06-18T12:45:12.732Z" } } }

Create a New Item

This call will create a new Item with the specified properties.

Requires Parameters in Mutations

  • itemTypeId

  • organizationID

  • searchNumber

  • serialNumber

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createItems(input: {currentPhaseId: \"3BE-C287-4DAC-8D19-29AD03AFB230\", forneyTestPending: true, hasFailedSteps: true, isDeleted: false, isProcessComplete: false, itemTypeId: \"5E06C3BE-C287-4DAC-8D19-29AD03AFB230\", latitude: \"null\", longitude: \"null\", organizationID: \"eea8827-2a0a-4551-b4fd-0485f6dd5ff3\", processId: \"44252977-0806-4A06-A441-D450D619356B\", projectId: \"44252977-080-A06-A441-D450D619356B\", searchNumber: \"open124\", sentToHicams: 10, serialNumber: \"73682\", serialNumberType: 10, shipmentId: \"99u5234r32\"}) { currentPhaseId deletedAt forneyTestPending hasFailedSteps isDeleted isProcessComplete itemTypeId latitude longitude modifiedBy organizationID processId projectId searchNumber sentToHicams serialNumber serialNumberType shipmentId } }" }'

 

Response Example 

{ "data": { "createItems": { "currentPhaseId": "3BE-C287-4DAC-8D19-29AD03AFB230", "deletedAt": null, "forneyTestPending": true, "hasFailedSteps": true, "isDeleted": false, "isProcessComplete": false, "itemTypeId": "5E06C3BE-C287-4DAC-8D19-29AD03AFB230", "latitude": "null", "longitude": "null", "modifiedBy": null, "organizationID": "eea8827-2a0a-4551-b4fd-0485f6dd5ff3", "processId": "44252977-0806-4A06-A441-D450D619356B", "projectId": "44252977-080-A06-A441-D450D619356B", "searchNumber": "open124", "sentToHicams": 10, "serialNumber": "73682", "serialNumberType": 10, "shipmentId": "99u5234r32" } } }

Create a New Project

This call will create new project

Requires Parameters in Mutations

  • name

  • organizationID

  • Number

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createProjects(input: {customerId: \"06EB0A59-B043-4F7F-939F-01757A4161AE\", defaultProcessId: \"DCF0F4CA-A35A-48D2-B983-C2D1DB28C445\", inStock: false, isCompleted: false, isDeleted: false, isItemLimited: true, modifiedBy: \"4e28d2d1-52c8-41ba-a250-5e17db274ccf\", name: \"Sulfur Springs Park\", number: \"2944\", organizationID: \"8eea8827-2a0a-4551-b4fd-0485f6dd5ff3\"}) { id createdAt customerId defaultProcessId deletedAt inStock isCompleted isDeleted isItemLimited modifiedBy name organizationID number updatedAt }}" }'

 

Response Example 

{ "data": { "createProjects": { "id": "c6c2ace7-9bfc-48c1-811a-57b6f53fde64", "completedAt": null, "createdAt": "2024-06-19T06:30:21.485Z", "customerId": "06EB0A59-B043-4F7F-939F-01757A4161AE", "defaultProcessId": "DCF0F4CA-A35A-48D2-B983-C2D1DB28C445", "deletedAt": null, "inStock": false, "isCompleted": false, "isItemLimited": true, "isDeleted": false, "modifiedBy": "4e28d2d1-52c8-41ba-a250-5e17db274ccf", "name": "Sulfur Springs Park", "number": "2944", "organizationID": "8eea8827-2a0a-4551-b4fd-0485f6dd5ff3", "updatedAt": "2024-06-19T06:30:21.485Z" } } }

Create a Item custom properties

This call will insert a new item custom properties without Process.

Requires Parameters in Mutations

  • customPropertyId

  • itemsId

  • organizationID

  • Number

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createItemsCustomProperties(input: {customPropertyId: \"7599AD9E-D891-4F71-964B-344FD5E74E71\", customPropertyValue: \"HC-POST-POUR\", isDeleted: false, itemsId: \"0C3C0824-BDF1-42FF-AF74-4DE3959F44AB\", organizationID: \"48a1037d-bf40-4fbe-a6fd-b16446427b48\", propertyDropdownId: null, requiredProperty: false}) { createdAt customPropertyId deletedAt customPropertyValue id isDeleted itemsId organizationID propertyDropdownId requiredProperty updatedAt }}" }'

 

Response Example 

{ "data": { "createItemsCustomProperties": { "createdAt": "2024-06-19T06:50:54.843Z", "customPropertyId": "7599AD9E-D891-4F71-964B-344FD5E74E71", "deletedAt": null, "customPropertyValue": "HC-POST-POUR", "id": "72aff9b4-24b2-4232-a961-658a9db5e2cb", "isDeleted": false, "itemsId": "0C3C0824-BDF1-42FF-AF74-4DE3959F44AB", "organizationID": "48a1037d-bf40-4fbe-a6fd-b16446427b48", "propertyDropdownId": null, "requiredProperty": false, "updatedAt": "2024-06-19T06:50:54.843Z" } } }

Create new Item Type Custom Properties

This call will insert a new item type custom properties without Process.

Requires Parameters in Mutations

  • customPropertyId

  • itemTypeId

  • organizationID

  • requiredProperty

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createItemTypeCustomProperties(input: {customPropertyId: \"32238480-144E-4FD4-918E-F9EC68E6A789\", customPropertyValue: \"278.79\", itemTypeId: \"E67A963C-1DC1-4C4A-81B7-5887D3925E53\", organizationID: \"48a1037d-bf40-4fbe-a6fd-b16446427b48\", requiredProperty: false, propertyDropdownId: \"9b8612ca-b934-4415-8d18-43a038e85816\"}) { customPropertyId customPropertyValue id itemTypeId organizationID propertyDropdownId requiredProperty createdAt isDeleted deletedAt updatedAt }}" }'

 

Response Example 

{ "data": { "createItemTypeCustomProperties": { "customPropertyId": "32238480-144E-4FD4-918E-F9EC68E6A789", "customPropertyValue": "278.79", "id": "f7a60c0b-9696-42e0-9d4b-0548b439cb83", "itemTypeId": "E67A963C-1DC1-4C4A-81B7-5887D3925E53", "organizationID": "48a1037d-bf40-4fbe-a6fd-b16446427b48", "propertyDropdownId": "9b8612ca-b934-4415-8d18-43a038e85816", "requiredProperty": false, "createdAt": "2024-06-19T07:06:29.311Z", "isDeleted": null, "deletedAt": null, "updatedAt": "2024-06-19T07:06:29.311Z" } } }

Create new Shipments

This call will insert a new Shipments.

Requires Parameters in Mutations

  • name

  • organizationID

  • Number

  • scheduleDate

Here is example curl for fetching Shipments

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createShipments(input: {defaultProcessId: \"46CA59E3-CB9C-4900-97B3-034BE09\", isDeleted: false, isShipped: false, maximumWeight: \"3874\", modifiedBy: null, name: \"McLain Plumbing: Emergency Management (Philadelphia, MS)\", notes: null, number: \"LP171913\", organizationID: \"c-48b8-91b6-97a0d-34dsdd-fd82b614\", projectId: \"77B21B8F-90B3-4661-AFD1-304AEB712A23\", scheduleDate: \"2023-11-30T05:00:00.000Z\", startWith: \"concrete\"}) { defaultProcessId createdAt deletedAt id isDeleted isShipped maximumWeight modifiedBy name notes number organizationID projectId scheduleDate shippedDate startWith updatedAt } }" }'

 

Response Example 

{ "data": { "createShipments": { "defaultProcessId": "46CA59E3-CB9C-4900-97B3-034BE09", "createdAt": "2024-06-19T07:44:40.327Z", "deletedAt": null, "id": "e52e2347-235d-441a-8781-2168fdf0defd", "isDeleted": false, "isShipped": false, "maximumWeight": "3874", "modifiedBy": null, "name": "McLain Plumbing: Emergency Management (Philadelphia, MS)", "notes": null, "number": "LP171913", "organizationID": "c-48b8-91b6-97a0d-34dsdd-fd82b614", "projectId": "77B21B8F-90B3-4661-AFD1-304AEB712A23", "scheduleDate": "2023-11-30T05:00:00.000Z", "shippedDate": null, "startWith": "concrete", "updatedAt": "2024-06-19T07:44:40.327Z" } } }

Create new Property Dropdown

This call will insert a new Property Dropdown

Requires Parameters in Mutations

  • customPropertyId

  • name

  • options

Here is example curl for fetching Property Dropdown

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { createPropertyDropdown(input: { customPropertyId: \"5D5A0A4B-568C-47EA-9B1E-4CE7758C5890\", isDeleted: false, name: \"Area of Steel\", options: \"[{\\\"S\\\": \\\"1\\\"}, {\\\"S\\\": \\\"2\\\"}, {\\\"S\\\": \\\"3\\\"}, {\\\"S\\\": \\\"4\\\"}, {\\\"S\\\": \\\"5\\\"}, {\\\"S\\\": \\\"6\\\"}, {\\\"S\\\": \\\"7\\\"}, {\\\"S\\\": \\\"8\\\"}, {\\\"S\\\": \\\"9\\\"}, {\\\"S\\\": \\\"10\\\"}, {\\\"S\\\": \\\"11\\\"}, {\\\"S\\\": \\\"12\\\"}, {\\\"S\\\": \\\"101\\\"}, {\\\"S\\\": \\\"201\\\"}, {\\\"S\\\": \\\"202\\\"}, {\\\"S\\\": \\\"203\\\"}, {\\\"S\\\": \\\"204\\\"}, {\\\"S\\\": \\\"301\\\"}, {\\\"S\\\": \\\"302\\\"}, {\\\"S\\\": \\\"401\\\"}, {\\\"S\\\": \\\"402\\\"}, {\\\"S\\\": \\\"501\\\"}, {\\\"S\\\": \\\"502\\\"}, {\\\"S\\\": \\\"503\\\"}, {\\\"S\\\": \\\"601\\\"}, {\\\"S\\\": \\\"701\\\"}, {\\\"S\\\": \\\"702\\\"}, {\\\"S\\\": \\\"801\\\"}, {\\\"S\\\": \\\"901\\\"}, {\\\"S\\\": \\\"902\\\"}, {\\\"S\\\": \\\"1001\\\"}, {\\\"S\\\": \\\"1002\\\"}, {\\\"S\\\": \\\"1003\\\"}, {\\\"S\\\": \\\"1004\\\"}]\", organizationID: \"9a581b7d-2d44-4319-9bf1-b00bddb1b72b\"}) { createdAt customPropertyId deletedAt id isDeleted name options organizationID updatedAt } }" }'

 

Response Example 

{ "data": { "createPropertyDropdown": { "createdAt": "2024-06-19T09:14:53.945Z", "customPropertyId": "5D5A0A4B-568C-47EA-9B1E-4CE7758C5890", "deletedAt": null, "id": "e68dcc1f-4e51-45cc-858e-873e7eff2bc1", "isDeleted": false, "name": "Area of Steel", "options": [ "[{\"S\": \"1\"}, {\"S\": \"2\"}, {\"S\": \"3\"}, {\"S\": \"4\"}, {\"S\": \"5\"}, {\"S\": \"6\"}, {\"S\": \"7\"}, {\"S\": \"8\"}, {\"S\": \"9\"}, {\"S\": \"10\"}, {\"S\": \"11\"}, {\"S\": \"12\"}, {\"S\": \"101\"}, {\"S\": \"201\"}, {\"S\": \"202\"}, {\"S\": \"203\"}, {\"S\": \"204\"}, {\"S\": \"301\"}, {\"S\": \"302\"}, {\"S\": \"401\"}, {\"S\": \"402\"}, {\"S\": \"501\"}, {\"S\": \"502\"}, {\"S\": \"503\"}, {\"S\": \"601\"}, {\"S\": \"701\"}, {\"S\": \"702\"}, {\"S\": \"801\"}, {\"S\": \"901\"}, {\"S\": \"902\"}, {\"S\": \"1001\"}, {\"S\": \"1002\"}, {\"S\": \"1003\"}, {\"S\": \"1004\"}]" ], "organizationID": "9a581b7d-2d44-4319-9bf1-b00bddb1b72b", "updatedAt": "2024-06-19T09:14:53.945Z" } }

Updating

Note - In updating only id is required of associated mutation

Update a Existing Item Types

This call will Update a Existing Item Type

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { updateItemTypes(input: {id: \"d11d3fe9-65ac-4587-92f6-fd7d914a4e6e\", name: \"OPEN API 2.0\"}) { id createdAt defaultProcessId deletedAt isActive isDeleted modifiedBy name number organizationID productSegment projectId quantityProduced quantityRequired searchNumber searchName type updatedAt } }" }'

 

Response Example 

{ "data": { "updateItemTypes": { "id": "d11d3fe9-65ac-4587-92f6-fd7d914a4e6e", "createdAt": "2024-06-18T12:45:12.732Z", "defaultProcessId": "21b84ef8-05de-4538-ae4f-dec91cf0dc44", "deletedAt": null, "isActive": true, "isDeleted": false, "modifiedBy": "d11d3fe9-65ac-4587-92f6-fd7d914a4e6e", "name": "OPEN API 2.0", "number": "43286", "organizationID": "7505388688", "productSegment": 10, "projectId": "21b84ef8-05de-4538-ae4f-dec91cf0dc44", "quantityProduced": 10, "quantityRequired": 10, "searchNumber": "8002676643", "searchName": "3wfvn", "type": 10, "updatedAt": "2024-06-18T12:45:12.732Z" } } }

Update a Existing Item

This call will Update a Existing item with the specified properties.

Here is example curl for fetching list of Projects

curl -X POST https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql \ -H "Content-Type: application/json" \ -H "Authorization: Token YOUR_AUTH_TOKEN" \ -d '{"query":"mutation MyMutation { updateItems(input: {id: \"27D91E1B-FE8D-454D-AC75-4ADC0FFAD1DA\", searchNumber: \"200\"}) { createdAt createdBy currentPhaseId deletedAt forneyTestPending hasFailedSteps id isDeleted isProcessComplete latitude itemTypeId longitude modifiedBy organizationID processId projectId searchNumber sentToHicams shipmentId serialNumberType updatedAt serialNumber } }"}'

 

Response Example 

{ "data": { "updateItems": { "createdAt": "2024-02-02T17:52:31.526Z", "createdBy": "20fd017a-a45e-46c9-b61f-97e3b8e61231", "currentPhaseId": null, "deletedAt": null, "forneyTestPending": null, "hasFailedSteps": false, "id": "27D91E1B-FE8D-454D-AC75-4ADC0FFAD1DA", "isDeleted": false, "isProcessComplete": true, "latitude": null, "itemTypeId": "5E06C3BE-C287-4DAC-8D19-29AD03AFB230", "longitude": null, "modifiedBy": "452b1f30-b9fe-4a16-89df-674b84c22ecd", "organizationID": "8eea8827-2a0a-4551-b4fd-0485f6dd5ff3", "processId": "44252977-0806-4A06-A441-D450D619356B", "projectId": null, "searchNumber": "200", "sentToHicams": 1, "shipmentId": "6A1955C3-EF66-4023-ABC3-1107F73F3B1E", "serialNumberType": 1, "updatedAt": "2024-06-27T07:27:40.456Z", "serialNumber": "STY531" } } }

 

Update a Existing Project

This call will Update Existing project

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { updateProjects(input: {id: \"c6c2ace7-9bfc-48c1-811a-57b6f53fde64\", name: \"Sulfur Springs Park updated\"}) { id createdAt customerId defaultProcessId deletedAt inStock isCompleted isDeleted isItemLimited modifiedBy name organizationID number updatedAt }}" }'

 

Response Example 

"data": { "updateProjects": { "id": "c6c2ace7-9bfc-48c1-811a-57b6f53fde64", "completedAt": null, "createdAt": "2024-06-19T06:30:21.485Z", "customerId": "06EB0A59-B043-4F7F-939F-01757A4161AE", "defaultProcessId": "DCF0F4CA-A35A-48D2-B983-C2D1DB28C445", "deletedAt": null, "inStock": false, "isCompleted": false, "isItemLimited": true, "isDeleted": false, "modifiedBy": "4e28d2d1-52c8-41ba-a250-5e17db274ccf", "name": "Sulfur Springs Park updated", "number": "2944", "organizationID": "8eea8827-2a0a-4551-b4fd-0485f6dd5ff3", "updatedAt": "2024-06-19T06:30:21.485Z" } }

Update a Existing Item custom properties

This call will Update Existing item custom properties without Process.

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { updateItemsCustomProperties(input: {id: \"72aff9b4-24b2-4232-a961-658a9db5e2cb\", customPropertyValue: \"HC-POST-POUR-UPDATED\" }) { createdAt customPropertyId deletedAt customPropertyValue id isDeleted itemsId organizationID propertyDropdownId requiredProperty updatedAt }}" }'

 

Response Example 

{ "data": { "updateItemsCustomProperties": { "createdAt": "2024-06-19T06:50:54.843Z", "customPropertyId": "7599AD9E-D891-4F71-964B-344FD5E74E71", "deletedAt": null, "customPropertyValue": "HC-POST-POUR-UPDATED", "id": "72aff9b4-24b2-4232-a961-658a9db5e2cb", "isDeleted": false, "itemsId": "0C3C0824-BDF1-42FF-AF74-4DE3959F44AB", "organizationID": "48a1037d-bf40-4fbe-a6fd-b16446427b48", "propertyDropdownId": null, "requiredProperty": false, "updatedAt": "2024-06-19T06:50:54.843Z" } } }

 

Update Existing Item Type Custom Properties

This call will Update Existing item type custom properties without Process.

Here is example curl for fetching list of Projects

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { updateItemTypeCustomProperties(input: {id: \"f7a60c0b-9696-42e0-9d4b-0548b439cb83\", customPropertyValue: \"378.79\"}) { customPropertyId customPropertyValue id itemTypeId organizationID propertyDropdownId requiredProperty createdAt isDeleted deletedAt updatedAt }}" }'

 

Response Example 

"data": { "updateItemTypeCustomProperties": { "customPropertyId": "32238480-144E-4FD4-918E-F9EC68E6A789", "customPropertyValue": "378.79", "id": "f7a60c0b-9696-42e0-9d4b-0548b439cb83", "itemTypeId": "E67A963C-1DC1-4C4A-81B7-5887D3925E53", "organizationID": "48a1037d-bf40-4fbe-a6fd-b16446427b48", "propertyDropdownId": "9b8612ca-b934-4415-8d18-43a038e85816", "requiredProperty": false, "createdAt": "2024-06-19T07:06:29.311Z", "isDeleted": null, "deletedAt": null, "updatedAt": "2024-06-19T07:06:29.311Z" } }

Update Existing Shipments

This call will Update a Existing new Shipments.

Here is example curl for fetching Shipments

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation2 { updateShipments(input: {id: \"6FB845BE-256A-4A68-B982-446D2A726222\", startWith: \"strat\"}) { createdAt defaultProcessId deletedAt id isDeleted isShipped maximumWeight modifiedBy name notes number organizationID projectId scheduleDate shippedDate startWith updatedAt } }" }'

 

Response Example 

{ "data": { "updateShipments": { "createdAt": "2023-10-23T13:52:22.910Z", "defaultProcessId": null, "deletedAt": null, "id": "6FB845BE-256A-4A68-B982-446D2A726222", "isDeleted": false, "isShipped": true, "maximumWeight": "10860", "modifiedBy": "1629a304-5392-411a-8360-61558ac2df1b", "name": "Monroe Trenching 6002 Mathews Drive Amory, MS", "notes": null, "number": "LP166524", "organizationID": "8eea8827-2a0a-4551-b4fd-0485f6dd5ff3", "projectId": null, "scheduleDate": "2023-10-20T00:00:00.000Z", "shippedDate": "2023-10-23T00:00:00.000Z", "startWith": "strat", "updatedAt": "2024-06-26T06:10:21.467Z" } } }

Update Existing Property Dropdown

This call will Update Existing Property Dropdown

Here is example curl for fetching Property Dropdown

curl --location 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token YOUR_API_TOKEN' \ --data-raw '{ "query": "mutation MyMutation { updatePropertyDropdown(input: { id: \"e68dcc1f-4e51-45cc-858e-873e7eff2bc1\",name : \"Area of Steel updated\"}) { createdAt customPropertyId deletedAt id isDeleted name options organizationID updatedAt } }" }'

 

Response Example 

{ "data": { "updatePropertyDropdown": { "createdAt": "2024-06-19T09:14:53.945Z", "customPropertyId": "5D5A0A4B-568C-47EA-9B1E-4CE7758C5890", "deletedAt": null, "id": "e68dcc1f-4e51-45cc-858e-873e7eff2bc1", "isDeleted": false, "name": "Area of Steel updated", "options": [ "[{\"S\": \"1\"}, {\"S\": \"2\"}, {\"S\": \"3\"}, {\"S\": \"4\"}, {\"S\": \"5\"}, {\"S\": \"6\"}, {\"S\": \"7\"}, {\"S\": \"8\"}, {\"S\": \"9\"}, {\"S\": \"10\"}, {\"S\": \"11\"}, {\"S\": \"12\"}, {\"S\": \"101\"}, {\"S\": \"201\"}, {\"S\": \"202\"}, {\"S\": \"203\"}, {\"S\": \"204\"}, {\"S\": \"301\"}, {\"S\": \"302\"}, {\"S\": \"401\"}, {\"S\": \"402\"}, {\"S\": \"501\"}, {\"S\": \"502\"}, {\"S\": \"503\"}, {\"S\": \"601\"}, {\"S\": \"701\"}, {\"S\": \"702\"}, {\"S\": \"801\"}, {\"S\": \"901\"}, {\"S\": \"902\"}, {\"S\": \"1001\"}, {\"S\": \"1002\"}, {\"S\": \"1003\"}, {\"S\": \"1004\"}]" ], "organizationID": "9a581b7d-2d44-4319-9bf1-b00bddb1b72b", "updatedAt": "2024-06-19T09:14:53.945Z" } } }

 

Filtering read results

GraphQL allows clients to request exactly the data they need, and nothing more. filtering is common requirements for many applications. This documentation will guide you through implementing filtering for reading results in GraphQL.

Query Example

Here are some example queries to demonstrate sorting and filtering.

<anyFields> : We can replace this with any available field associated with that Query we have to filter.

Fields in Response

We can also specify which fields we want in the response in <all the avilable fields>. For example, in the query below, we can request only the hasFailedStep field without retrieving all unnecessary data. This approach is applicable to all queries.

 
 
curl 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Token YOUR_API_TOKEN' \ -d '{ "query": "query ItemTypesByOrganizationID { itemTypesByOrganizationID(organizationID: \"23dfaeba-248d-46db-a2e9-b0b48955ce09\" ,limit:20 ,filter: { number: { eq: \"NaN\" }} ,nextToken :null) { items { id number name searchName searchNumber defaultProcessId type projectId productSegment isActive isDeleted deletedAt createdAt updatedAt quantityRequired quantityProduced organizationID modifiedBy ItemTypeCustomProperties { nextToken items { CustomProperties { name } customPropertyValue } } Items { nextToken items { id serialNumber searchNumber itemTypeId processId projectId shipmentId currentPhaseId isProcessComplete hasFailedSteps serialNumberType latitude sentToHicams longitude isDeleted createdAt updatedAt forneyTestPending organizationID createdBy modifiedBy deletedAt Processes { name ProcessPhases { nextToken items { name ProcessSteps { nextToken items { id name description phaseID order type isRequired allowFailedStep hasNotApplicableOption defaultOption customPassLabel customFailLabel customNALabel customPropertyId defaultValueOfCustomProperty isHidden propertyDropdownId mask isDefaultToCurrentDate decimalPlace lowerLimit upperLimit isComputedLimits lowerLimitFormula upperLimitFormula allowValuesOutsideOfRange tagName organizationID isDeleted deletedAt createdAt updatedAt modifiedBy}}}}} ItemsCustomProperties { items { CustomProperties { name } customPropertyValue }}}}} nextToken}}" }'

We have lots of filtering options in graphQL like

attributeExists: false

  • This filter checks if a specific attribute does not exist in the item.

  • Example: attributeExists: false for the attribute shipDateActual would return items where the shipDateActual attribute is not present.

attributeType: binary

  • This filter checks if an attribute is of a specific type, in this case, binary.

  • Example: attributeType: binary for an attribute would ensure that the attribute is of binary type.

beginsWith: ""

  • This filter checks if the value of an attribute begins with a specific substring.

  • Example: beginsWith: "Item" for the attribute name would return items where the name attribute starts with "Item".

between: ""

  • This filter checks if the value of an attribute is between two specified values.

  • Example: between: ["2023-01-01", "2023-12-31"] for the attribute createDate would return items where the createDate is between January 1, 2023, and December 31, 2023.

contains: ""

  • This filter checks if the value of an attribute contains a specific substring.

  • Example: contains: "urgent" for the attribute description would return items where the description attribute contains the word "urgent".

eq: "" ---

  • This filter checks if the value of an attribute is equal to a specific value.

  • Example: eq: "completed" for the attribute status would return items where the status attribute is "completed".

ge: ""

  • This filter checks if the value of an attribute is greater than or equal to a specific value.

  • Example: ge: "2023-01-01" for the attribute createDate would return items where the createDate is on or after January 1, 2023.

gt: ""

  • This filter checks if the value of an attribute is greater than a specific value.

  • Example: gt: "2023-01-01" for the attribute createDate would return items where the createDate is after January 1, 2023.

le: ""

  • This filter checks if the value of an attribute is less than or equal to a specific value.

  • Example: le: "2023-12-31" for the attribute createDate would return items where the createDate is on or before December 31, 2023.

lt: ""

  • This filter checks if the value of an attribute is less than a specific value.

  • Example: lt: "2023-12-31" for the attribute createDate would return items where the createDate is before December 31, 2023.

ne: ""

  • This filter checks if the value of an attribute is not equal to a specific value.

  • Example: ne: "canceled" for the attribute status would return items where the status attribute is not "canceled".

notContains: ""

  • This filter checks if the value of an attribute does not contain a specific substring.

  • Example: notContains: "urgent" for the attribute description would return items where the description attribute does not contain the word "urgent".

Pagination in results

Pagination in GraphQL is typically handled using arguments in your query that specify how many results to fetch (limit) and where to start fetching (nextToken ). Here’s a basic example of how pagination can be implemented in a GraphQL query:

Usage in cURL

If you were to use this in a cURL command, it would look something like this (assuming the GraphQL endpoint supports pagination):

 
 
curl 'https://xczqyawsr5e53jpjchgpqdnw6e.appsync-api.us-east-2.amazonaws.com/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Token YOUR_API_TOKEN' \ -d '{ "query": "query ItemTypesByOrganizationID { itemTypesByOrganizationID(organizationID: \"23dfaeba-248d-46db-a2e9-b0b48955ce09\" ,limit:20,nextToken : "\") { items { id number name searchName searchNumber defaultProcessId type projectId productSegment isActive isDeleted deletedAt createdAt updatedAt quantityRequired quantityProduced organizationID modifiedBy ItemTypeCustomProperties { nextToken items { CustomProperties { name } customPropertyValue } } Items { nextToken items { id serialNumber searchNumber itemTypeId processId projectId shipmentId currentPhaseId isProcessComplete hasFailedSteps serialNumberType latitude sentToHicams longitude isDeleted createdAt updatedAt forneyTestPending organizationID createdBy modifiedBy deletedAt Processes { name ProcessPhases { nextToken items { name ProcessSteps { nextToken items { id name description phaseID order type isRequired allowFailedStep hasNotApplicableOption defaultOption customPassLabel customFailLabel customNALabel customPropertyId defaultValueOfCustomProperty isHidden propertyDropdownId mask isDefaultToCurrentDate decimalPlace lowerLimit upperLimit isComputedLimits lowerLimitFormula upperLimitFormula allowValuesOutsideOfRange tagName organizationID isDeleted deletedAt createdAt updatedAt modifiedBy}}}}} ItemsCustomProperties { items { CustomProperties { name } customPropertyValue }}}}}}}" }'

Explanation

  • Pagination Mechanism:

    • limit: Specifies how many items to fetch per page.

    • nextToken: Specifies where to start fetching the next page of results. It could be a cursor value indicating the end of the current page.

  • GraphQL Variables:

    • limit and nextToken are GraphQL variables used to pass pagination parameters dynamically to the query.

  • Response:

    • The response from GraphQL will include items, an array of Item objects, and nextToken, a cursor to fetch the next page of results.

This setup allows you to implement basic pagination in GraphQL queries, providing control over the number of items per page and navigation through result sets efficiently. Adjust the limit and nextToken variables as per your specific pagination needs.