{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":40499,"path":"platform-security/authentication/create-api-access-policy.md","title":"Create REST API access policy","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create REST API access policy\n\nCreate an API access policy and map an authentication profile to restrict the authentication type for a REST API. For example, you can create an API access policy that allows only ID token authentication for a REST API.\n\n## Before you begin\n\nMake sure that an authentication profile is created. For more information, see [Create an authentication profile](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/authentication/create-authentication-profile.md).\n\nRole required: api\\_service\\_admin, adaptive\\_auth\\_policy\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Web Services** &gt; **REST API Access Policies**.\n\n2.  Select **New**.\n\n3.  On the form, fill in the mandatory fields and submit.\n\n    \\[Omitted image \"rest-api-access-policy.png\"\\] Alt text: API access policy fields\n\n    **Note:** You must reopen the submitted form to populate additional fields.\n\n<table id=\"table_d4x_w45_d4b\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nUnique name of the API access policy.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nOption to make the API access policy active.\n\n</td></tr><tr><td>\n\nREST API\n\n</td><td>\n\nThe REST API to which the access policy is applied. For example, **Attachment API**.\n\n</td></tr><tr><td>\n\nREST API PATH\n\n</td><td>\n\nAPI path of the REST API. This field is auto-populated based on the selected REST API. For example, **now/attachment**.\n\n</td></tr><tr><td>\n\nHTTP Method\n\n</td><td>\n\nMethod used for interacting with the API. This field is auto-populated based on the selected REST API.\n\n</td></tr><tr><td>\n\nVersion\n\n</td><td>\n\nVersion of the API. For example, **v1**. This field is auto-populated based on the selected REST API.**Note:** If you want to create an authentication policy for all versions of a REST API, you must create individual policies for each version.\n\n</td></tr><tr><td>\n\nResource\n\n</td><td>\n\nChild resource of the REST API. This field is auto-populated based on the selected REST API. For example, **/now/attachment**\n\n</td></tr><tr><td>\n\nTable\n\n</td><td>\n\nThe tables to which the API access policy applies. This option only applies to policies for the Table API.\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nScope of the application.\n\n</td></tr><tr><td>\n\nGlobal\n\n</td><td>\n\nOption to apply the policy to all methods, versions, and resources for the API.\n\n</td></tr><tr><td>\n\nApply to all methods\n\n</td><td>\n\nOption to apply the policy to all the methods, versions, and resources for the API.\n\n</td></tr><tr><td>\n\nApply to all resources\n\n</td><td>\n\nOption to apply the policy to all or the API resources.\n\n</td></tr><tr><td>\n\nApply to all versions\n\n</td><td>\n\nOption to apply the policy to all or the API versions.\n\n</td></tr><tr><td>\n\nApply to all tables\n\n</td><td>\n\nOption to apply the policy to all tables. This option only applies to policies for the Table API.\n\n</td></tr><tr><td>\n\n[Advertise all auth schemes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/authentication/create-authentication-profile.md)\n\n</td><td>\n\nDetermines whether the `WWW-Authenticate` header includes all configured authentication schemes. When set to `false` \\(default\\), the header includes only the most recently configured authentication profile in the policy. When set to `true`, the header lists all configured authentication schemes.\n\n</td></tr></tbody>\n</table>    **Note:** To understand more about the API access policy prioritization, see [API access policy prioritization](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/authentication/api-access-policy-prioritization.md).\n\n4.  Double-click **Insert a new row**.\n\n5.  Select an inbound authentication profile from the list and select the save icon \\[Omitted image \"green-checkmark.png\"\\] Alt text: save icon.\n\n    For example, you can add **Basic Auth**, **ID Token**, **Certificate based Auth**, **OAuth** or **WSSE Auth**.\n\n    1.  To add one or more inbound authentication profiles, select **New** to create a new profile.\n\n    2.  Choose **What Kind of authentication profiles?**.\n\n        -   **Create standard http authentication profiles**\n        -   **Create WSSE authentication profiles**\n        -   **Create API Key authentication profiles**\n        -   **Create HMAC authentication profiles**\n        \\[Omitted image \"auth-profile.png\"\\] Alt text: Authentication profile\n\n    3.  After creating the authentication profile, save the record.\n\n6.  Select **Submit** to submit the REST API access policy.\n\n\n"}}