3. What is OData
• Open Data (OData)protocol for creation and consumption of ReST APIs in a
simple and standard way
• OASIS standard
• Versions available: 2.0, 3.0, 4.0
• Support both JSON and xml (atom format)
• Direction
• Expose OData API for clients to call (inbound)
• Act as client and call OData API (outbound)
• Standards for
• URL convention
• Headers
• Query parameters
• Data types
• Payload format
4. Cast Iron and OData
• OData version supported in Cast Iron : 4.0
• Support both JSON and xml (atom format)
• Direction
• Expose OData API (GET and DELETE) in Cast Iron for external clients to call
• Business object structure for the OData API
• Select an existing schema by browsing the schemas present in the project
(single top level object in the OData API)
• Add a new schema which can be used to create the OData API (multiple
objects in the OData API)
• Endpoint URL (OData API) : Cast Iron acting as client and talking to OData API.
Not supported as of Cast Iron version 7.5.1
5. Cast Iron OData activities
• Read OData activity : Takes input the URL
information, payload, http headers and query parameters
and gives the output in XML format. This XML output is
used to perform the business logic on the backend systems
involving CRUD operations using connector activities.
• Write OData activity : Takes input the business data
which is created as part of the business logic execution and
serializes into OData format (XML or JSON)
7. Read OData input data
• Mandatory properties
• serviceName
• Protocol
• Host
• Method
• Uri
• primaryKeys
• Optional property
• readODataInputPayload (for POST and PUT calls)
8. Write OData input data
• Mandatory properties
• serviceName
• Protocol
• Host
• Method
• status
• Optional property
• resourcePath
• Entities
• fieldName
• writeODataInput (for POST, PUT and GET calls)
9. Cast Iron OData API URLs samples
• Get the metadata document (has information about the objects and their definitions) of the OData API
• /serviceName/$metadata
• Get the service document (has information about the objects supported) of the OData API
• /serviceName
• Get all data for a particular entity set name (can be obtained from /serviceName call) of the OData API
• /serviceName/entitySetName
• Get a particular record of an object using the OData API
• /serviceName/entitySetName(12)
• /serviceName/entitySetName(‘sara’)
• /serviceName/entitySetName(custumerid=5,ordered=‘abc’)
• Get a particular field in an object
• /serviceName/entitySetName(12)/customerName
• /serviceName/entitySetName(‘sara’)/startDate
• /serviceName/entitySetName(custumerid=5,ordered=‘abc’)/quantity
11. What's not supported in Cast Iron v 7.5.1?
• Cast Iron as OData client (outbound calls) to call OData API
• Expose OData API for POST and PUT calls
• Business object structure which have children as complex types
• OData query parameters