---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Scripted REST API examples

# Scripted REST API examples {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Mutliple examples are available demonstrating how to create and use scripted REST
APIs.
* **[Scripted REST API example - script samples](https://servicenow-prod.fluidtopics.net/ilmJvrsdRorAUQfnVzDj~A)**   
  These examples demonstrate how to create various resource scripts for a scripted REST API.
* **[Scripted REST API example - streaming vs object serialization](https://servicenow-prod.fluidtopics.net/ZKQqvu70c6DLwAtoEqxzVA)**   
  These examples demonstrate how to send a JSON response using streaming and using default object serialization.
* **[Scripted REST API example - streaming file attachments](https://servicenow-prod.fluidtopics.net/mToaP9tCLNT5vIBT1x1dcg)**   
  This example demonstrates how to send an image attachment to a requesting user as a binary stream.

