{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1772,"path":"application-development/automated-test-framework-atf/atf-use-rest-retrieve-incident.md","title":null,"bundle":null,"doc_type":null,"release":null,"body":"---\ntitle: Automated Test Framework use case: retrieve an incident using REST-Inbound\ndescription: The Get Newly Created Resource via REST API Test test is provided with the Automated Test Framework, and uses the REST - Inbound and assert steps.\nlocale: en-US\ncanonical_url: https://www.servicenow.com/docs/r/australia/application-development/automated-test-framework-atf/atf-use-rest-retrieve-incident.html\nrelease: australia\nproduct: Automated Test Framework \\(ATF\\)\nclassification: automated-test-framework-atf\ntopic_type: task\nlast_updated: \"2026-03-12\"\nreading_time_minutes: 4\nbreadcrumb: [Automated Test Framework use case examples, Automated Test Framework \\(ATF\\) reference, Automated Test Framework \\(ATF\\), Testing and debugging applications, Building applications]\n---\n\n# Automated Test Framework use case: retrieve an incident using REST-Inbound\n\nThe **Get Newly Created Resource via REST API Test** test is provided with the Automated Test Framework, and uses the REST - Inbound and assert steps.\n\n## Before you begin\n\nReview the [REST APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/c_RESTAPI.md) and the [Send REST Request- Inbound- REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/automated-test-framework-atf/test-steps-rest-category.md) configuration step information before creating this test.\n\nRole required: atf\\_ws\\_designer\n\n## About this task\n\nThis test creates an incident record, uses a REST- Inbound step to retrieve the record, and then uses assert steps to determine whether the request was successful.\n\nYou can use the Send REST Request- Inbound REST API Explorer step to build and test the request, or you can manually create the request using the Send REST Request- Inbound step. In either case, you must specify the basic authentication information on the Send REST Request- Inbound step form.\n\nWhen creating your test, start with your REST API and determine what behavior you want to validate. You can then determine what test data to create. You can use other test step configuration categories to create, update, or delete records, and then use a Send REST Inbound step to retrieve, update, or delete the test data. Conversely, you can use the Send REST Inbound step to create records, and then use other test step configuration categories to validate that the records were created correctly.\n\nThis task steps you through creating the **Get Newly Created Resource via REST API Test** test.\n\n## Procedure\n\n1.  Create a test.\n\n    1.  Navigate to **Automated Test Framework** &gt; **Tests**, click **New**.\n\n        The **Test** new record form is shown.\n\n    2.  Enter a test name and a description, and click **Submit**.\n\n    3.  Click the test created in the previous step.\n\n        The **Test** form is shown.\n\n2.  Create test data.\n\n    1.  Click the **Add Test Step** button.\n\n        The **Add Test Step** form is shown.\n\n    2.  Click a test configuration category, and then click a test configuration.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, click **Server** &gt; **Record Insert**, and then **Next**.\n\n        The test configuration form you selected is shown.\n\n    3.  Fill in the information needed for the test configuration you selected.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, on the **Record Insert** form, specify the incident table, and add a value for the **Short description** field, and click **Submit**.\n\n3.  Create the REST request.\n\n    1.  Click the **Add Test Step** button.\n\n        The **Add Test Step** form is shown.\n\n    2.  Click a test configuration category, and then click a test configuration.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, click **REST** &gt; **Send REST Request - Inbound REST API Explorer**, and then **Next**.\n\n        The **REST API Explorer** is shown.\n\n    3.  Fill in the information needed for the REST request, and click **Send**.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, fill in the fields.\n\n        |Name|Value|\n        |----|-----|\n        |Namespace|now|\n        |API Name|Table API|\n        |API Version|latest|\n        |tableName|incident|\n\n        When you do not specify the **Basic authentication**, the REST API Explorer uses your credentials.\n\n        The **Create Automated Test Step** is shown after you click **Send**.\n\n    4.  When ready, click **Create Automated Test Step**.\n\n        The Send REST Request - Inbound test step is created.\n\n    5.  Click the Send REST Request - Inbound step, and in the **Basic authentication** field, specify a basic auth configuration.\n\n        If no configurations are available, you can create a basic auth configuration by clicking **New** on the **Basic Auth Configurations** form.\n\n    6.  To replicate the **Get Newly Created Resource via REST API Test** test, in the **Path** field, click the contextual search button, and then click **Record Insert** &gt; **Record**.\n\n    7.  Click **Update**.\n\n4.  Create assert steps to verify the REST response.\n\n    1.  Click the **Add Test Step** button.\n\n        The **Add Test Step** form is shown.\n\n    2.  Click a test configuration category, and then click a test configuration.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, click **REST** &gt; **Assert Status Code**, and then **Next**.\n\n        The **Assert Status Code** form is shown.\n\n    3.  Enter the information needed for the form, and click **Submit**.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, in the **Operation** field, select **is** and in the **Status Code** field, enter **200**.\n\n        To replicate the **Get Newly Created Resource via REST API Test** test, repeat this step to create **Assert Response JSON Payload is Valid**, and **Assert JSON Response Payload Element** test steps.\n\n\n**Parent Topic:**[Automated Test Framework use case examples](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/automated-test-framework-atf/atf-use-cases.md)\n\n"}}