Last active
July 21, 2022 16:32
-
-
Save scarabaeus/fbae822c362bf7a2c1267c2d12b478fd to your computer and use it in GitHub Desktop.
Example Service Task Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://try.jsonata.org/g-X7ev7nl | |
// Sample Input ---------------------------- | |
{ | |
"claim_id": 9876543212, | |
"policy_type": "AUTO", | |
"auth_token": "ABCDEF" | |
} | |
// Schema ---------------------------------- | |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"properties": { | |
"claim_id": { | |
"type": "integer" | |
}, | |
"claimant_first_name": { | |
"type": "string" | |
}, | |
"claimant_last_name": { | |
"type": "string" | |
}, | |
"weather_conditions": { | |
"type": "string" | |
}, | |
"Steve": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"claim_id", | |
"claimant_first_name", | |
"claimant_last_name", | |
"weather_conditions", | |
"Steve" | |
] | |
} | |
// Expression ------------------------------ | |
{ | |
"method": "POST", | |
"url": "http://myapi.com/dev", | |
"headers": { | |
"Auth-Token": $.auth_token | |
}, | |
"params": { | |
}, | |
"data": { | |
"claimant": { | |
"claimId": $.claim_id | |
}, | |
"policy": { | |
"policyType": $.policy_type | |
} | |
} | |
} | |
// Sample Output --------------------------- | |
{ | |
"method": "POST", | |
"url": "http://myapi.com/dev", | |
"headers": { | |
"Auth-Token": "ABCDEF" | |
}, | |
"params": {}, | |
"data": { | |
"claimant": { | |
"claimId": 9876543212 | |
}, | |
"policy": { | |
"policyType": "AUTO" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working example: https://try.jsonata.org/g-X7ev7nl