{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":435,"path":"api-reference/rest-api-explorer/t_CreateAScriptedRESTService.md","title":"Create a scripted REST API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a scripted REST API\n\nCreate a scripted REST API to define web service endpoints.\n\n## Before you begin\n\nRole required: web\\_service\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Web Services** &gt; **Scripted REST APIs**.\n\n2.  Click **New**.\n\n3.  Enter a **Name** for the service.\n\n    The **API ID** is set automatically based on the **Name**. You can modify the **API ID** if needed.\n\n4.  In the Default ACLs field, select the default ACLs that apply to all resources in the API.\n\n    If you configure security settings for resources in the API, including ACLs, the settings of the resource override the parent API settings.\n\n5.  Click **Submit**.\n\n\n## What to do next\n\nAfter you create the API, configure the service as needed such as by creating resources, assigning ACLs, or specifying supported request and response formats.\n\n-   **[Create a scripted REST API resource](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/t_CreateAScriptedRESTAPIResource.md)**  \nCreate a scripted REST API resource to define the HTTP method, the processing script, and to override settings from the parent service.\n-   **[Define a REST API response header](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/define-scripted-api-response-header.md)**  \nDefine one or more REST API response headers in a REST API.\n-   **[Define a scripted REST API request header](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/t_DefineRESTServiceHeaders.md)**  \nDefine scripted REST API requestheaders to control which headers the API accepts.\n-   **[Associate a request header with a resource](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/associate-header-api-resource.md)**  \nDefine which request headers are expected for each resource within a scripted REST API.\n-   **[Define a REST API schema](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/define-scripted-rest-api-schema.md)**  \nSpecify the expected data structure for requests or responses within a REST API by defining a schema.\n-   **[Define an API resource request structure](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/add-schema-rest-api-request.md)**  \nAdd a schema to a REST request record to define the request's expected data structure.\n-   **[Define an API resource response structure](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/add-schema-rest-api-response.md)**  \nAdd a schema and relevant response headers to a REST response to define the response's expected data structure.\n-   **[Define available query parameters](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/t_DefineAvailableQueryParameters.md)**  \nDefine available query parameters to control what values a requesting user can pass in the request URI.\n-   **[Associate query parameters with a resource](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/AssocQueryParmResource.md)**  \nAssociate scripted REST API query parameters with a resource.\n-   **[Automatically generate API request definitions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/autogenerate-api-request-definitions.md)**  \nUse sample requests made to an API resource to generate request header associations, query parameter associations, and a request schema for that resource.\n-   **[Configure a scripted REST API to require an ACL](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/t_WbSvcRqACL.md)**  \nRequests to scripted REST APIs respect platform ACLs, and the requesting user must meet any table ACL requirements to access instance data. Additionally, you can configure the scripted REST API to require a specific ACL.\n-   **[Enable versioning for a scripted REST API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/t_EnableVersioning.md)**  \nEnable versioning for a scripted REST API to provide multiple versions of the API while maintaining compatibility with existing integrations.\n-   **[Control request and response content type](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_SpecifyContentType.md)**  \nControls which content types are allowed in scripted REST API requests and responses.\n-   **[Controlling maximum request size](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/r_ControllingMaxRequestSize.md)**  \nYou can specify the maximum file size allowed in a scripted REST API request payload.\n\n**Parent Topic:**[Scripted REST APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md)\n\n"}}