{
  "info": {
    "_postman_id": "c95cd64a-cd99-4165-8c51-07296749bf9c",
    "name": "WSO2 API Manager - Admin Advanced Policy (Collection) Advanced Policy (Collection) Tenant Config API",
    "description": "This document specifies a **RESTful API** for WSO2 **API Manager** - **Admin Portal**.\nPlease see [full OpenAPI Specification](https://raw.githubusercontent.com/wso2/carbon-apimgt/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml) of the API which is written using [OAS 3.0](http://swagger.io/) specification.\n\n# Authentication\nThe Admin REST API is protected using OAuth2 and access control is achieved through scopes. Before you start invoking\nthe the API you need to obtain an access token with the required scopes. This guide will walk you through the steps\nthat you will need to follow to obtain an access token.\nFirst you need to obtain the consumer key/secret key pair by calling the dynamic client registration (DCR) endpoint. You can add your preferred grant types\nin the payload. A sample payload is shown below.\n```\n  {\n  \"callbackUrl\":\"www.example.com\",\n  \"clientName\":\"rest_api_admin\",\n  \"owner\":\"admin\",\n  \"grantType\":\"client_credentials password refresh_token\",\n  \"saasApp\":true\n  }\n```\nCreate a file (payload.json) with the above sample payload, and use the cURL shown bellow to invoke the DCR endpoint. Authorization header of this should contain the\nbase64 encoded admin username and password.\n**Format of the request**\n```\n  curl -X POST -H \"Authorization: Basic Base64(admin_username:admin_password)\" -H \"Content-Type: application/json\"\n  \\ -d @payload.json https://<host>:<servlet_port>/client-registration/v0.17/register\n```\n**Sample request**\n```\n  curl -X POST -H \"Authorization: Basic YWRtaW46YWRtaW4=\" -H \"Content-Type: application/json\"\n  \\ -d @payload.json https://localhost:9443/client-registration/v0.17/register\n```\nFollowing is a sample response after invoking the above curl.\n```\n{\n\"clientId\": \"fOCi4vNJ59PpHucC2CAYfYuADdMa\",\n\"clientName\": \"rest_api_admin\",\n\"callBackURL\": \"www.example.com\",\n\"clientSecret\": \"a4FwHlq0iCIKVs2MPIIDnepZnYMa\",\n\"isSaasApplication\": true,\n\"appOwner\": \"admin\",\n\"jsonString\": \"{\\\"grant_types\\\":\\\"client_credentials password refresh_token\\\",\\\"redirect_uris\\\":\\\"www.example.com\\\",\\\"client_name\\\":\\\"rest_api_admin\\\"}\",\n\"jsonAppAttribute\": \"{}\",\n\"tokenType\": null\n}\n```\nNote that in a distributed deployment or IS as KM separated environment to invoke RESTful APIs (product APIs), users must generate tokens through API-M Control Plane's token endpoint.\nThe tokens generated using third party key managers, are to manage end-user authentication when accessing APIs.\n\nNext you must use the above client id and secret to obtain the access token.\nWe will be using the password grant type for this, you can use any grant type you desire.\nYou also need to add the proper **scope** when getting the access token. All possible scopes for Admin REST API can be viewed in **OAuth2 Security** section\nof this document and scope for each resource is given in **authorizations** section of resource documentation.\nFollowing is the format of the request if you are using the password grant type.\n```\ncurl -k -d \"grant_type=password&username=<admin_username>&password=<admin_passowrd>&scope=<scopes seperated by space>\"\n\\ -H \"Authorization: Basic base64(cliet_id:client_secret)\"\n\\ https://<host>:<server_port>/oauth2/token\n```\n**Sample request**\n```\ncurl https://localhost:9443/oauth2/token -k \\\n-H \"Authorization: Basic Zk9DaTR2Tko1OVBwSHVjQzJDQVlmWXVBRGRNYTphNEZ3SGxxMGlDSUtWczJNUElJRG5lcFpuWU1h\" \\\n-d \"grant_type=password&username=admin&password=admin&scope=apim:admin apim:tier_view\"\n```\nShown below is a sample response to the above request.\n```\n{\n\"access_token\": \"e79bda48-3406-3178-acce-f6e4dbdcbb12\",\n\"refresh_token\": \"a757795d-e69f-38b8-bd85-9aded677a97c\",\n\"scope\": \"apim:admin apim:tier_view\",\n\"token_type\": \"Bearer\",\n\"expires_in\": 3600\n}\n```\nNow you have a valid access token, which you can use to invoke an API.\nNavigate through the API descriptions to find the required API, obtain an access token as described above and invoke the API with the authentication header.\nIf you use a different authentication mechanism, this process may change.\n\n# Try out in Postman\nIf you want to try-out the embedded postman collection with \"Run in Postman\" option, please follow the guidelines listed below.\n* All of the OAuth2 secured endpoints have been configured with an Authorization Bearer header with a parameterized access token. Before invoking any REST API resource make sure you run the `Register DCR Application` and `Generate Access Token` requests to fetch an access token with all required scopes.\n* Make sure you have an API Manager instance up and running.\n* Update the `basepath` parameter to match the hostname and port of the APIM instance.\n\n[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/32294946-71bea2bc-f808-4208-a4f6-861ede6f0434)\n\n\nContact Support:\n Name: WSO2\n Email: architecture@wso2.com",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "createdAt": "2026-07-28T03:36:57.000Z",
    "updatedAt": "2026-07-28T03:36:57.000Z",
    "lastUpdatedBy": "35240",
    "uid": "35240-c95cd64a-cd99-4165-8c51-07296749bf9c"
  },
  "item": [
    {
      "name": "tenant-config",
      "item": [
        {
          "name": "Export a tenant-Config.",
          "id": "e854f3cb-4dc8-48fd-aeed-d6939394656f",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "auth": {
              "type": "oauth2",
              "oauth2": [
                {
                  "key": "scope",
                  "value": "openid apim:policies_import_export apim:admin apim:tier_view apim:tier_manage apim:admin_tier_view apim:admin_tier_manage apim:bl_view apim:bl_manage apim:mediation_policy_view apim:mediation_policy_create apim:app_owner_change apim:app_settings_change apim:app_import_export apim:api_import_export apim:api_product_import_export apim:environment_manage apim:environment_read apim:monetization_usage_publish apim:api_workflow_approve apim:bot_data apim:tenantInfo apim:tenant_theme_manage apim:admin_operations apim:api_category apim:admin_settings apim:admin_alert_manage apim:api_workflow_view apim:scope_manage apim:role_manage apim:admin_application_view apim:keymanagers_manage apim:api_provider_change apim:llm_provider_manage apim:gov_policy_read apim:gov_policy_manage apim:gov_result_read apim:gov_rule_read apim:gov_rule_manage apim:organization_manage apim:organization_read",
                  "type": "string"
                },
                {
                  "key": "accessTokenUrl",
                  "value": "https://localhost:9443/oauth2/token",
                  "type": "string"
                },
                {
                  "key": "grant_type",
                  "value": "password_credentials",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tenant-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenant-config"
              ]
            },
            "description": "This operation can be used to export a tenant-config.json used in deployment.\n"
          },
          "response": [
            {
              "id": "6a5ca9f9-4c2f-4f6a-aea4-ff257dc9770e",
              "name": "OK.\nTenant config Exported Successfully.\n",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                },
                {
                  "disabled": false,
                  "description": {
                    "content": "The content type of the body.\n",
                    "type": "text/plain"
                  },
                  "key": "Content-Type",
                  "value": "<string>"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "<string>",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-6a5ca9f9-4c2f-4f6a-aea4-ff257dc9770e"
            },
            {
              "id": "0c323925-84cd-4151-a6ee-48b65a126616",
              "name": "Forbidden. The request must be conditional but no condition has been specified.",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "Forbidden",
              "code": 403,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{\n  \"code\": \"<long>\",\n  \"message\": \"<string>\",\n  \"description\": \"<string>\",\n  \"moreInfo\": \"<string>\",\n  \"error\": [\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    },\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    }\n  ]\n}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-0c323925-84cd-4151-a6ee-48b65a126616"
            },
            {
              "id": "abc316a7-c0ff-4375-b598-00bab53d13f9",
              "name": "Not Found. The specified resource does not exist.",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "Not Found",
              "code": 404,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{\n  \"code\": \"<long>\",\n  \"message\": \"<string>\",\n  \"description\": \"<string>\",\n  \"moreInfo\": \"<string>\",\n  \"error\": [\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    },\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    }\n  ]\n}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-abc316a7-c0ff-4375-b598-00bab53d13f9"
            },
            {
              "id": "0017e63f-cfaa-442f-90da-428f480c08aa",
              "name": "Internal Server Error.",
              "originalRequest": {
                "method": "GET",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "Internal Server Error",
              "code": 500,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{\n  \"code\": \"<long>\",\n  \"message\": \"<string>\",\n  \"description\": \"<string>\",\n  \"moreInfo\": \"<string>\",\n  \"error\": [\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    },\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    }\n  ]\n}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-0017e63f-cfaa-442f-90da-428f480c08aa"
            }
          ],
          "createdAt": "2026-07-28T03:36:57.000Z",
          "updatedAt": "2026-07-28T03:36:57.000Z",
          "uid": "35240-e854f3cb-4dc8-48fd-aeed-d6939394656f"
        },
        {
          "name": "Update a tenant-config.",
          "id": "5bafd1db-9623-41ad-87b6-b358c85854f5",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "auth": {
              "type": "oauth2",
              "oauth2": [
                {
                  "key": "scope",
                  "value": "openid apim:policies_import_export apim:admin apim:tier_view apim:tier_manage apim:admin_tier_view apim:admin_tier_manage apim:bl_view apim:bl_manage apim:mediation_policy_view apim:mediation_policy_create apim:app_owner_change apim:app_settings_change apim:app_import_export apim:api_import_export apim:api_product_import_export apim:environment_manage apim:environment_read apim:monetization_usage_publish apim:api_workflow_approve apim:bot_data apim:tenantInfo apim:tenant_theme_manage apim:admin_operations apim:api_category apim:admin_settings apim:admin_alert_manage apim:api_workflow_view apim:scope_manage apim:role_manage apim:admin_application_view apim:keymanagers_manage apim:api_provider_change apim:llm_provider_manage apim:gov_policy_read apim:gov_policy_manage apim:gov_result_read apim:gov_rule_read apim:gov_rule_manage apim:organization_manage apim:organization_read",
                  "type": "string"
                },
                {
                  "key": "accessTokenUrl",
                  "value": "https://localhost:9443/oauth2/token",
                  "type": "string"
                },
                {
                  "key": "grant_type",
                  "value": "password_credentials",
                  "type": "string"
                }
              ]
            },
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "<string>",
              "options": {
                "raw": {
                  "headerFamily": "json",
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/tenant-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tenant-config"
              ]
            },
            "description": "This operation can be used to update tenant-config.\n"
          },
          "response": [
            {
              "id": "81f62f5c-c458-499f-b4b5-85bcad778737",
              "name": "OK.\nRole mapping alias returned\n",
              "originalRequest": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "<string>",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-81f62f5c-c458-499f-b4b5-85bcad778737"
            },
            {
              "id": "0d165631-4259-4e00-a6ec-784f66d63c94",
              "name": "Forbidden. The request must be conditional but no condition has been specified.",
              "originalRequest": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "<string>",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "Forbidden",
              "code": 403,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{\n  \"code\": \"<long>\",\n  \"message\": \"<string>\",\n  \"description\": \"<string>\",\n  \"moreInfo\": \"<string>\",\n  \"error\": [\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    },\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    }\n  ]\n}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-0d165631-4259-4e00-a6ec-784f66d63c94"
            },
            {
              "id": "aad438d6-bb80-4276-8591-040082a678c3",
              "name": "Payload Too Large. Request entity is larger than limits defined by server.",
              "originalRequest": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "<string>",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "Request Entity Too Large",
              "code": 413,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{\n  \"code\": \"<long>\",\n  \"message\": \"<string>\",\n  \"description\": \"<string>\",\n  \"moreInfo\": \"<string>\",\n  \"error\": [\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    },\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    }\n  ]\n}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-aad438d6-bb80-4276-8591-040082a678c3"
            },
            {
              "id": "3711f9e6-ea58-4bb4-815e-8e8c51cdba22",
              "name": "Internal Server Error.",
              "originalRequest": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  },
                  {
                    "description": "Added as a part of security scheme: oauth2",
                    "key": "Authorization",
                    "value": "<token>"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "<string>",
                  "options": {
                    "raw": {
                      "headerFamily": "json",
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/tenant-config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "tenant-config"
                  ]
                }
              },
              "status": "Internal Server Error",
              "code": 500,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "cookie": [],
              "responseTime": null,
              "body": "{\n  \"code\": \"<long>\",\n  \"message\": \"<string>\",\n  \"description\": \"<string>\",\n  \"moreInfo\": \"<string>\",\n  \"error\": [\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    },\n    {\n      \"code\": \"<string>\",\n      \"message\": \"<string>\"\n    }\n  ]\n}",
              "createdAt": "2026-07-28T03:36:57.000Z",
              "updatedAt": "2026-07-28T03:36:57.000Z",
              "uid": "35240-3711f9e6-ea58-4bb4-815e-8e8c51cdba22"
            }
          ],
          "createdAt": "2026-07-28T03:36:57.000Z",
          "updatedAt": "2026-07-28T03:36:57.000Z",
          "uid": "35240-5bafd1db-9623-41ad-87b6-b358c85854f5"
        }
      ],
      "id": "cefb7fe5-31c3-4b8b-8692-a47198edacfd",
      "createdAt": "2026-07-28T03:36:57.000Z",
      "updatedAt": "2026-07-28T03:36:57.000Z",
      "uid": "35240-cefb7fe5-31c3-4b8b-8692-a47198edacfd"
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://apis.wso2.com/api/am/admin/v4"
    }
  ]
}