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

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Scripted REST API examples

# Scripted REST API examples {#ariaid-title1}

Release version: Yokohama  
Updated January 30, 2025  
![](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/_hOxKzRPbPsuape6JwjU~w)**   
  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/EGGtHt1VFOunjJV1iBWp8Q)**   
  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/ZxLwyZmTA0bsUjyKwx6iWg)**   
  This example demonstrates how to send an image attachment to a requesting user as a binary stream.

