Linx
Linx 6
Linx 6
  • Get Started
  • Installing
    • Install Linx Designer
    • Install Linx Server
  • Main Concepts
    • Introduction
    • Plugins
    • Functions
    • Types
    • Properties
    • Expressions
    • Control Flow
    • Scope
    • Services
    • Server
  • First Applications
    • Backend (REST)
    • Automation (Timer)
  • Reference
    • Designer
      • User Interface
      • Expression Editor
      • Debugging
    • Server
      • Quick Start
      • User Interface
    • Services
      • Available Services
    • Plugins
      • Linx
        • Content
          • AddToList
          • Boolean
          • Byte
          • ClearList
          • DateTime
          • Decimal
          • Double
          • DoWhile
          • ForEach
          • IfElse
          • Integer
          • List<Type>
          • Return
          • SetValue
          • StartService
          • StopService
          • String
          • ThrowException
          • TryCatch
      • Async
        • Content
          • RunTask
          • Task
          • Task<Type>
          • Wait
          • WaitAll
          • WaitAny
      • Compression
        • Content
          • Zip
          • Unzip
      • Cryptography
        • Content
          • Create ECDSA Keys
          • Create JWT
          • Decrypt
          • Encrypt
          • Generate ECDSA Signature
          • Generate HASH
          • Generate HMAC
          • Generate Random
          • Verify ECDSA Signature
          • Verify JWT
      • CSharp
        • Content
          • CSharpFunction
      • Database
        • Conventions
        • Content
          • BeginTransaction
          • DB Bulk Copy
          • ExecuteSQL
          • Execute Stored Procedure
          • MongoDB Read
          • MongoDB Write
        • Shared Properties
          • Connection Editor
          • SQL Editor
      • Email
        • Content
          • Read Email
          • Send Email
      • Excel
        • Excel Open
        • Excel Read
        • Excel Write
      • File
        • Content
          • Binary File Read
          • Binary File Write
          • Create Temp File
          • Directory Copy
          • Directory Delete
          • Directory Exists
          • Directory List
          • Directory Move
          • Directory Watch
          • File Copy
          • File Delete
          • File Exists
          • File List
          • File Move
          • File Open
          • Robocopy
          • Text File Read
          • Text File Write
      • FTP
        • Content
          • Directory Create
          • Directory Delete
          • Directory Exists
          • File Delete
          • File Exists
          • File Move
          • FTP Download
          • FTP List
          • FTP Upload
        • Shared Properties
          • Connection Editor
      • GoogleDrive
        • Content
          • About
            • GetAbout
          • Changes
            • GetStartPageToken
            • ListChanges
          • Comments
            • CreateComment
            • DeleteComment
            • GetComment
            • ListComments
            • UpdateComment
          • Files
            • CopyFile
            • CreateFile
            • DeleteFile
            • EmptyTrash
            • ExportFile
            • GenerateFieldIds
            • GetFile
            • ListFiles
            • UpdateFile
          • Permissions
            • Createpermission
            • Deletepermission
            • Getpermission
            • Listpermissions
            • Updatepermission
          • Replies
            • Createreply
            • Deletereply
            • Getreply
            • Listreplies
            • Updatereply
          • Revisions
            • Deleterevision
            • Getrevision
            • Listrevisions
            • Updaterevision
          • Types
            • Contenthintsdata
            • humbnaildata
      • GoogleSheets
        • Content
          • DeveloperMetaData
            • GetDeveloperMetaData
            • SearchDeveloperMetaData
          • Sheets
            • CopySheetsTo
          • SpreadSheets
            • BatchUpdateheet
            • GoogleSheets Create
            • GoogleSheets Get
            • GoogleSheets GetByDataFilter
          • Types
            • DataFilter
            • DataFilterValueRange
            • Request
            • Spreadsheet
            • ValueRange
          • Values
            • AppendValues
            • BatchClearValues
            • BatchClearValuesByDataFilter
            • BatchGetValues
            • BatchGetValuesByDataFilter
            • BatchUpdate
            • BatchUpdateByDataFilter
            • ClearValues
            • GetValues
            • UpdateValues
      • GraphQL
        • Content
          • GraphQLQuery
          • GraphQLServer
      • JobScheduler
        • Content
          • JobScheduler Service
      • JSON
        • Content
          • JSON Reader
          • JSON Writer
      • Kafka
        • Content
          • Kafka Service
      • PDF
        • License
        • Content
          • AddWatermark
          • ChangeProtection
          • Concatenate
          • Fill Form
          • Read
          • Sign
          • Split
      • PostgreSQL
        • Conventions
        • Content
          • BeginTransaction
          • BulkImport
          • ExecuteSQL
      • ProcessAutomation
        • Process
      • QuickBooks
        • Content
          • Accounts
            • Account
            • CreateAccount
            • GetAccounts
            • UpdateAccount
          • Attachables
            • Attachable
            • AttachableReference
            • CreateAttachable
            • DeleteAttachable
            • DownloadAttachable
            • GetAttachables
            • UpdateAttachable
            • UploadAttachable
          • BillPayments
            • BillPayment
            • CheckPayment
            • CreateBillPayment
            • DeleteBillPayment
            • CreditCardPayment
            • GetBillPayments
            • UpdateBillPayment
          • Bills
            • Bill
            • CreatebBill
            • DeleteBill
            • GetBills
            • UpdateBill
          • Budget
            • Budget
            • BudgetDetail
            • GetBudgets
          • Classes
            • Class
            • CreateClass
            • GetClasses
            • UpdateClass
          • Common
            • Customfield
            • PhysicalAddress
            • Reference
          • CompanyInfo
            • CompanyInfo
            • GetCompanyInfo
            • NameValue
            • UpdateCompanyInfo
          • CreditMemos
            • CreateCreditMemo
            • CreditMemo
            • DeleteCreditMemo
            • GetCreditMemos
            • UpdateCreditMemo
          • Customers
            • CreateCustomer
            • Customer
            • GetCustomers
            • UpdateCustomer
          • Departments
            • CreateDepartment
            • Department
            • GetDepartments
            • UpdateDepartment
          • Employees
            • CreateEmployee
            • Employee
            • GetEmployees
            • UpdateEmployee
          • Deposits
            • CreateDeposit
            • DeleteDeposit
            • Deposit
            • GetDeposits
            • UpdateDeposit
          • Estimates
            • CreateEstimate
            • DeleteEstimate
            • Estimate
            • GetEstimates
            • UpdateEstimate
          • Invoices
            • CreateInvoice
            • DeleteInvoice
            • GetInvoices
            • Invoice
            • UpdateInvoice
            • VoidInvoice
          • Items
            • createitem
            • getitems
            • item
            • updateitem
          • JournalCodes
            • createjournalcode
            • getjournalcodes
            • journalcode
          • JournalEntries
            • createjournalentry
            • deletejournalentry
            • getjournalentries
            • journalentry
            • updatejournalentry
          • PaymentMethods
            • CreatePaymentMethod
            • GetPaymentMethods
            • PaymentMethod
            • UpdatePaymentMethod
          • Payments
            • CreatePayment
            • CreditCardPayment
            • CreditChargeInfo
            • CreditChargeResponse
            • DeletePayment
            • GetPayments
            • Payment
            • UpdatePayment
            • VoidPayment
          • Pdfs
            • GetPdf
          • Preferences
            • CompanyAccountingPreferences
            • CurrencyPreferences
            • EmailMessagesPreferences
            • GetPreferences
            • Namevalue
            • Preferences
            • ProductAndServicesPreferences
            • ReportPreferences
            • SalesFormsPreferences
            • TaxPreferences
            • TimeTrackingPreferences
            • UpdatePreferences
            • VendorAndPurchasesPreferences
          • PurchaseOrders
            • CreatePurchaseOrder
            • DeletePurchaseOrder
            • GetPurchaseOrders
            • PurchaseOrder
            • UpdatePurchaseOrder
          • Query
            • ChangeDataCapture
            • Count
            • GetQuery
          • Purchases
            • CashPurchase
            • CheckPurchase
            • CreatePurchase
            • CreditCardPurchase
            • DeletePurchase
            • GetPurchases
            • Purchase
            • UpdatePurchase
          • RefundReceipts
            • CheckPayment
            • CreateRefundReceipt
            • DeleteRefundReceipt
            • GetRefundReceipts
            • RefundReceipt
            • UpdateRefundReceipt
          • Reports
            • Column
            • Columndata
            • GetAccountListReport
            • GetAgedPayableDetailReport
            • GetAgedPayablesReport
            • GetAgedReceivableDetailReport
            • GetAgedReceivablesReport
            • GetBalancesheetReport
            • GetCashFlowReport
            • GetClassSalesReport
            • GetCustomerBalanceDetailReport
            • GetCustomerBalanceReport
            • GetCustomerIncomeReport
            • GetCustomerSalesReport
            • GetDepartmentSalesReport
            • GetGeneralLedgerReport
            • GetGeneraLedgerReportFR
            • GetInventoryValuationSummaryReport
            • GetItemSalesReport
            • GetJournalReportFR
          • SalesReceipts
            • CreateSalesReceipt
            • CreditCardPayment
            • CreditChargeInfo
            • CreditChargeResponse
            • DeleteSalesReceipt
            • GetSalesReceipts
            • SalesReceipt
            • UpdateSalesReceipt
            • VoidSalesReceipt
          • TaxAgencies
            • CreateTaxAgency
            • GetTaxAgencies
            • TaxAgency
          • TaxCodes
            • GetTaxCodes
            • TaxCode
            • TaxRateDetail
          • TaxRates
            • EffectiveTaxRate
            • GetTaxRates
            • TaxRate
          • TaxServices
            • CreateTaxService
            • TaxRateDetail
            • TaxService
          • Terms
            • CreateTerm
            • GetTerms
            • Term
            • UpdateTerm
          • TimeActivities
            • CreateTimeActivity
            • DeleteTimeActivity
            • GetTimeactivities
            • TimeActivity
            • UpdateTimeActivity
          • Transactions
            • AccountBasedExpenseLineDetail
            • DepositLineDetail
            • DescriptionOnlyLineDetail
            • DiscountLineDetail
            • DiscountOverride
            • GroupLineDetail
            • ItembasedExpenseLineDetail
            • JournaleEtryLineDetail
            • Line
            • LinkedTransaction
            • Markupinfo
            • PaymentLineDetail
            • PurchaseOrderItemLineDetail
            • SalesItemLineDetail
            • SalesOrderItemLineDetail
            • SubTotalLineDetail
            • TaxLineDetail
            • TDSLineDetail
            • TransactionDeliveryInfo
            • TransactionTaxDetail
          • Transfers
            • CreateTransfer
            • DeleteTransfer
            • GetTransfers
            • Transfer
            • UpdateTransfer
          • VendorCredit
            • createvendorcredit
            • deletevendorcredit
            • getvendorcredits
            • updatevendorcredit
            • vendorcredit
          • Vendors
            • createvendor
            • vendor
            • updatevendor
            • getvendors
      • RabbitMQ
        • Content
          • RabbitMQReader
          • RabbitMQService
          • RabbitMQWriter
      • Redis
        • Content
          • RedisGet
          • RedisSet
          • RedisDelete
      • REST
        • Conventions
        • Content
          • Call REST Endpoint
          • REST Host
          • Simple REST Host
      • SignalR
        • Content
          • SignalR
      • Text
        • Content
          • Razor Template Transform
          • Regular Expression
          • String Builder
      • Utilities
        • Content
          • Assert
          • Command Line
          • Cron
          • Sleep
          • Timer
      • Xero
        • Authentication
        • Content
          • Accounts
            • Account
            • CreateAccount
            • DeleteAccount
            • GetAccounts
            • UpdateAccount
          • Attachments
            • Attachment
            • CreateAttachment
            • GetAttachments
            • UpdateAttachment
          • BankTransactions
            • Bank Transaction
            • CreateBankTransaction
            • GetBankTransactions
            • UpdateBankTransaction
          • BankTransfers
            • BankTransfer
            • BankTransferAccountData
            • CreateBankTransfer
            • GetBankTransfers
          • BrandingThemes
            • BrandingTheme
            • GetBrandingThemes
          • Common
            • Address
            • Allocation
            • CallXeroAPI
            • LineItem
            • PaymentTerm
            • PaymentTerms
            • Phone
            • TrackingCategory
          • Contacts
            • Balance
            • Balances
            • BatchPayments
            • Contact
            • Contact Person
            • ContactTrackingCategory
            • CreateContact
            • GetContacts
            • UpdateContact
          • ContactGroups
            • ContactGroup
            • ContactGroupContact
            • CreateContactGroup
            • CreateContactGroupContact
            • DeleteContactGroupContact
            • GetContactGroups
            • UpdateContactGroup
          • CreditNotes
            • CreateCreditNote
            • CreateCreditNoteAllocation
            • CreditNoteAllocation
            • CreditNote
            • GetCreditNote
            • GetCreditNotes
            • UpdateCreditNote
          • Currencies
            • GetCurrencies
            • Currency
          • Employees
            • CreateEmployee
            • Employee
            • ExternalLink
            • GetEmployees
            • UpdateEmployee
          • ExpenseClaims
            • CreateExpenseClaim
            • ExpenseClaim
            • GetExpenseClaims
            • UpdateExpenseClaim
          • Invoices
            • CreateInvoice
            • GetInvoice
            • GetInvoices
            • Invoice
            • UpdateInvoice
          • Items
            • CreateItem
            • DeleteItem
            • GetItems
            • Item
            • PurchaseDetails
            • SalesDetails
            • UpdateItem
          • Journals
            • GetJournals
            • Journal
            • JournalLine
          • LinkedTransactions
            • CreateLinkedTransaction
            • DeleteLinkedTransaction
            • GetLinkedTransactions
            • LinkedTransaction
            • UpdateLinkedTransaction
          • ManualJournals
            • CreateManualJournal
            • GetManualJournals
            • ManualJournal
            • ManualJournalLine
            • UpdateManualJournal
          • Organisations
            • GetOrganisations
            • Organisation
          • Overpayments
            • CreateOverpaymentAllocation
            • Overpayments
            • OverpaymentAllocation
            • GetOverpayments
          • Payments
            • CreatePayment
            • GetPayments
            • Payment
            • UpdatePayment
          • Prepayments
            • CreatePrepaymentAllocation
            • GetPrepayments
            • Prepayment
            • PrepaymentAllocation
          • PurchaseOrders
            • CreatePurchaseOrder
            • GetPurchaseOrders
            • PurchaseOrder
            • UpdatePurchaseOrder
          • Receipts
            • CreateReceipt
            • GetReceipts
            • Receipt
            • UpdateReceipt
          • RepeatingInvoices
            • GetRepeatingInvoices
            • RepeatingInvoices
            • Schedule
          • TaxRates
            • CreateTaxRate
            • GetTaxRates
            • TaxComponent
            • TaxRate
            • UpdateTaxRate
          • TrackingCategories
            • CreateTrackingCategory
            • CreateTrackingOption
            • DeleteTrackingCategory
            • DeleteTrackingOption
            • GetTrackingCategories
            • TrackingCategory
            • TrackingOption
            • UpdateTrackingCategory
            • UpdateTrackingOption
          • Users
            • User
            • GetUsers
        • Filters
          • OrderBy
          • Where
      • XML
        • Content
          • XML Peek
          • XML Poke
          • XML Reader
          • XML Writer
  • BestPractices
    • Conventions
    • Principles
    • Practices
  • TestRunner
    • How To Use Test Runner
    • Test Runner Console
  • Guides
    • Google
    • MS Graph
    • OAuth2 Authentication
    • REST
    • Salesforce Guide
    • Shopify
    • Writing C# in Linx
    • Xero
  • Release Notes
    • Linx Platform
      • Upgrading from Linx 5
      • 6.10.1
      • 6.10.0
      • 6.9.5
      • 6.9.3
      • 6.9.2
      • 6.9.1
      • 6.8.4
      • 6.8.3
      • 6.8.2
      • 6.8.0
      • 6.7.1
      • 6.7.0
      • 6.6.5
      • 6.6.4
      • 6.6.3
      • 6.6.2
      • 6.6.1
      • 6.6.0
      • 6.5.0
      • 6.4.3
      • 6.4.2
      • 6.4.1
      • 6.3.1
      • 6.3.0
      • 6.2.0
      • 6.1.0
      • 6.0.5
    • Plugins
      • Async
      • Compression
      • Cryptography
      • CSharp
      • Database
      • Email
      • Excel
      • File
      • FTP
      • Google Drive
      • Google Sheets
      • GraphQL
      • Job Scheduler
      • JSON
      • Kafka
      • Linx
      • PDF
      • PostgreSQL
      • Process Automation
      • Quickbooks
      • Rabbit MQ
      • Redis
      • REST
      • SignalR
      • Text
      • Utilities
      • Xero
      • XML
    • Solution Dependencies
      • Compiler
      • Types
Powered by GitBook
On this page
  • Properties
  • Authentication
  • Request
  • Request Signing (Certificate)
  • Request Signing (OAuth)
  • Response
  • Settings
  • Web Proxy
  • Links
  1. Reference
  2. Plugins
  3. REST
  4. Content

Call REST Endpoint

The CallRESTEndpoint function allows you to call REST web services. Simply drag it onto the design canvas and configure the properties required by the service you want to call.


Properties

Authentication

The authentication properties are needed when authentication is required by the web service being called.

Type

The type of authentication required by the server of the web service that is being called.

Options:

  • Anonymous

  • Basic

  • Digest

  • Windows

The Type you select will determine which authentication properties will be available to complete. 'Anonymous' will require no additional properties.

Basic:

The following properties are available when the Type is 'Basic'.

  • Username: The username to authenticate against.

  • Password: The password to authenticate against.

Digest:

The following properties are available when the Type is 'Digest'.

  • Username: The username to authenticate against.

  • Password: The password to authenticate against.

  • Domain: The domain to authenticate the user against.

Windows:

The following properties are available when the Type is 'Windows'.

  • Use default credentials: When checked, the credentials of the currently logged in Windows user will be used. When not checked, the Domain, Username, and Password properties will display to specify custom Windows credentials.

Note: Successful Windows authentication requires a Windows user and security for the site defined in Internet Information Server (IIS).


Request

URL

The base URL to use for the service request. This excludes any parameter-specific information that are sent with the request. A valid example for this field could look like this:

http://localhost:8022/Service/ExecuteService

Method

HTTP Method type to use for the request.

  • GET

  • POST

  • PUT

  • DELETE

  • HEAD

  • PATCH

  • OPTIONS

Query String

A list of parameters to use in order to build up the query string. A query string with a format similar to the following will be generated (note that parameters have not been URL encoded to improve readability):

origin=CapeTown&destination=Johannesburg&sensor=false&alternatives=true

Headers

Arguments and data are commonly transferred using the headers of a call. You can add data to the headers if the web service requires this.

Body Format

Options:

  • Text

  • Xml

  • Json

  • Stream

  • URL encoded content

  • Multipart encoded content

Text, Xml, Json:

The following properties are available when the Body format is 'Text', 'Xml', or 'Json'.

Stream:

The following properties are available when the Body format is 'Stream'.

  • Stream from file: The file path whose contents will be sent in the body of the request.

  • File path: The file path whose contents will be sent in the body of the request.

When using a Binary file:

  • Binary content is accepted (see the Value field in the 'myfile' example above)

  • The File Name must be specified.

When using a Base64 file:

  • A string value is accepted (see the Value field in the 'somedata' example above)

  • The File Name must not be specified.

If you are not sure which Body format to use, the standard and most likely value is 'Text'. The service that you are calling should have API documentation that will give an indication of the required format. If no API documentation exists, then the developers of the service should be able to assist in identifying the correct value.


Request Signing (Certificate)

Sign with Certificate

Specifies whether the client should expose a certificate with which to sign requests.

Certificate: The following properties are required when Sign with certificate is selected.

  • Certificate path: The certificate to use to sign requests.

  • Certificate password: The certificate password.

Request Signing (OAuth)

Sign Request

Specifies whether the request should be signed using the OAuth authentication standard.

Encryption Key

Only available when Sign request is selected. The key used to encrypt the request when signing.


Response

This section allows you to configure the structure of the data that is being returned from the web service.

The supported return formats are JSON, XML, or a plain string.

Output Type

If you create a Type and you have formatted your response accordingly, you can point the Output type field at your user-defined type. After the service has executed, Linx will map the return result to the specified structure. Any field that is specified in the return structure that is not present in the response will be ignored.

List Data Type

Indicates the data type for the items in the list.


Settings

Handle All Status Codes

Check this property to handle success and error responses.

When checked, it will display 2 execution paths in the design canvas – “Success” and “Error”.

Successful requests (response status code 200-299) will go into the “Success” execution path, while all other responses will go into the “Error” execution path.

Note: Invalid requests (e.g., trying to connect to an invalid address) will still throw an exception (and not go into the “Error” execution path). The “Error” execution path is only there to handle invalid responses.

Allow Untrusted Certificates

Select 'True' to allow connections to sites that make use of untrusted (e.g., self-signed) certificates.

Timeout

The timeout value for the web service call.

Max Response Content Size

The maximum amount of bytes response content can contain.


Web Proxy

These settings are applicable only if you or the server you're contacting are using a proxy server.

Proxy Name

The IP address or URL of your proxy server.

Port

The web service call is commonly performed over port 80, but you can change that if you have configured the service or proxy to use a different port.

Bypass on Local

While you are developing the function you may have a different setup from the live environment. When this property is checked, the proxy setup is ignored for your local machine.


Links

PreviousContentNextREST Host

Last updated 1 month ago

Options:

The of a request needs to be in the format that the web service understands.

Body: The payload of your web service call in the format specified by the property. If you pass data in the body, you cannot use the GET , but need to use POST instead.

The data type of the response. The List option indicates whether the response should be interpreted as a list of values. The List option requires you to use JSON or XML for the .

This option is only visible if the is set to 'List'. To access this property, click on the data type editor icon displayed next to the 'List' option (after you selected it).

learn more
Wikipedia: Representation state transfer (REST)
Code Project: Everything About REST Web Services - What and How
IBM developerWorks: RESTful Web services - The basics
Consuming REST APIs
Tutorial: Consuming REST APIs
Body
Body format
method
Body format
Output type
allstatuscodes