{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":413,"path":"api-reference/rest-api-explorer/create-REST-API-rate-limits.md","title":"Create an inbound REST API rate limit","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create an inbound REST API rate limit\n\nCreate rate limit rules to limit the number of inbound REST API requests processed per hour.\n\n## Before you begin\n\nRole required: rate\\_limit\\_admin\n\n## About this task\n\nSet rate limits for all users, users with specific roles, or all users.\n\n**Note:** As requests reach an instance, each node maintains a rate limit count per user. Every 30 seconds, the count is committed to the database. As a result, a rate limit rule may not take effect for up to 30 seconds.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Web Services** &gt; **REST** &gt; **Rate Limit Rules**.\n\n2.  Click **New** and enter the following field values.\n\n<table id=\"table_y41_qgq_hdb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nREST API resource\n\n</td><td>\n\nValue derived from the values entered at the following fields.\n\n</td></tr><tr><td>\n\nName\n\n</td><td>\n\nUnique name for the rate limit rule.\n\n</td></tr><tr><td>\n\nREST API\n\n</td><td>\n\nREST API selected from the list of all external-facing REST APIs for the instance.\n\n</td></tr><tr><td>\n\nVersion\n\n</td><td>\n\nVersion of the **REST API**. Values listed depend on the **REST API** selected.\n\n</td></tr><tr><td>\n\nResource\n\n</td><td>\n\nResource for the **Version**. Values listed depend on the **Version** selected.\n\n</td></tr><tr><td>\n\nTable\n\n</td><td>\n\nTable that you want to target. Appears only when you select **Table API** as the **REST API**.\n\n</td></tr><tr><td>\n\nImport set table\n\n</td><td>\n\nImport set table that you want to target. Appears only you select **Import Set API** as the **REST API**.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nCheck box to indicate that the rate limit rule is active.Rate limit rules are activated by default as soon as you create them. You can deactivate rate limit rules to stop enforcing a rate limit or activate rate limit rules to resume enforcing a rate limit.\n\n</td></tr><tr><td>\n\nRequest limit per hour\n\n</td><td>\n\nMaximum number of requests allowed per hour.**Note:** Whenever you update the value of this field, the ServiceNow AI Platform resets the count of requests to 0 and deletes all violations for the current hour.\n\n</td></tr><tr><td>\n\nApply to\n\n</td><td>\n\nUsers restricted by this rule:-   **Single user** applies the rate limit to a specific user.\n-   **Users with role** applies the rate limit to all users with a specific role.\n-   **All users** applies the rate limit to all users.\n\n\n</td></tr><tr><td>\n\nRole\n\n</td><td>\n\nRole to which the rate limit applies. Appears only when you select **Users with role** at the **Apply to** field.\n\n</td></tr><tr><td>\n\nUser\n\n</td><td>\n\nUser to whom the rate limit applies. Appears only when you select **Single user** at the **Apply to** field.\n\n</td></tr></tbody>\n</table>3.  Click **Submit**.\n\n    The new rate limit goes into effect.\n\n\n## What to do next\n\nAfter you submit the rule, the ServiceNow AI Platform adds the following related lists to the rule record:\n\n-   **Rate Limit Counts**\n\n    Lists, by user, the number of inbound REST API requests affected by this rate limit rule.\n\n-   **Rate Limit Violations**\n\n    Lists, by user, the violations of this rate limit rule.\n\n\nYou can use these related lists to [Monitor inbound REST API rate limit counts and violations](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/monitor-request-counts.md).\n\n**Parent Topic:**[Inbound REST API rate limiting](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/inbound-REST-API-rate-limiting.md)\n\n"}}