{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":40488,"path":"platform-security/authentication/configure-rest-api-auth-scope.md","title":"Configure REST API Auth scope","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure REST API Auth scope\n\nLink the OAuth entity with an auth scope to manage the token to access the REST APIs that are linked with the auth scope.\n\n## Before you begin\n\nInstall the following plugins:\n\n-   OAuth 2.0\n-   REST API Provider\n-   Authentication scope\n-   REST API Auth Scope\n\n**Note:** The **REST API Auth Scope** plugin is added as part of the Tokyo release.\n\nRole required: api\\_service\\_admin, adaptive\\_auth\\_policy\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **API Auth Scopes** &gt; **REST API Auth Scope**.\n\n    The REST API Auth Scopes page is displayed.\n\n2.  To configure a new REST API Auth Scope, click **New**.\n\n3.  On the form, fill in the fields.\n\n<table id=\"table_sss_z55_4tb\"><thead><tr><th>\n\n \n\n</th><th>\n\n \n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nA unique name that identifies the REST API Auth Scope.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nSelect the check box to make the configuration active.\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nRead-only application scope.\n\n</td></tr><tr><td>\n\nREST API\n\n</td><td>\n\nThe REST API to which the auth scope is applied. For example, the Table API.\n\n</td></tr><tr><td>\n\nAuth Scope\n\n</td><td>\n\nSelect the auth scope from the lookup icon.\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/table.\n\n</td></tr><tr><td>\n\nHTTP Method\n\n</td><td>\n\nMethod used for interacting with the API. Select the method from drop-down list. You can disable the **Apply auth scope to all http methods in this API** field on the form manually to select the method.\n\n</td></tr><tr><td>\n\nREST API Version\n\n</td><td>\n\nVersion of the API. For example, v1. This field is auto-populated based on the selected REST API. You can disable the **Apply auth scope to all versions in this API** field on the form manually to select the 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/table.You can disable the **Apply auth scope to all resources in this API** field on the form manually to select the resources.\n\n</td></tr><tr><td>\n\nApply auth scope to all http methods in this API\n\n</td><td>\n\nWhen enabled, applies the auth scope to all the http methods in the API.\n\n</td></tr><tr><td>\n\nApply auth scope to all versions in this API\n\n</td><td>\n\nhen enabled, applies the auth scope to all versions in the API.\n\n</td></tr><tr><td>\n\nApply auth scope to all resources in this API\n\n</td><td>\n\nWhen enabled, applies the auth scope to all resources in the API\n\n</td></tr></tbody>\n</table>4.  Click **Submit**.\n\n    Based on the selected REST API and Auth Scope, the APIs retrieves information that is particular to the scope.\n\n\n## Consider creating three REST API Auth Scope for Table API\n\nThe first auth scope is mapped to the **Table API** with all the http methods, versions, and resources enabled.\n\n\\[Omitted image \"auth-scope3.png\"\\] Alt text: REST API Auth Scope3\n\nThe second auth scope is mapped to the **Table API** with all the versions and resources enabled. But, you choose the HTTP Method, in this example, the **GET** method.\n\n\\[Omitted image \"auth-scope2.png\"\\] Alt text: REST API Auth Scope2\n\nThe third auth scope is mapped to the **Table API** without the http methods, versions, and resources enabled. But, you choose the HTTP Method, Version, and Resource manually. In this example, HTTP Method is **GET**, REST API Version is **latest**, and Resource is `/now/table/{tableName}`.\n\n\\[Omitted image \"auth-scope1.png\"\\] Alt text: REST API Auth Scope1\n\nIf all these auth scopes are created, you can use **GET** method with all the three scopes, but for **POST**, **PUT**, **DELETE**, or **PATCH** methods only **scope3** can be used.\n\n"}}