{ "opencollection": "1.0.0", "info": { "name": "Logto API references Account center Resources API", "version": "Cloud" }, "request": { "auth": { "type": "oauth2", "flow": "client_credentials", "accessTokenUrl": "/oidc/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "items": [ { "info": { "name": "Resources", "type": "folder" }, "items": [ { "info": { "name": "Get API resources", "type": "http" }, "http": { "method": "GET", "url": "https://[tenant_id].logto.app/api/resources", "params": [ { "name": "includeScopes", "value": "", "type": "query", "description": "If it's provided with a truthy value (`true`, `1`, `yes`), the scopes of each resource will be included in the response." }, { "name": "page", "value": "", "type": "query", "description": "Page number (starts from 1)." }, { "name": "page_size", "value": "", "type": "query", "description": "Entries per page." } ] }, "docs": "Get API resources in the current tenant with pagination." }, { "info": { "name": "Create an API resource", "type": "http" }, "http": { "method": "POST", "url": "https://[tenant_id].logto.app/api/resources", "body": { "type": "json", "data": "{}" } }, "docs": "Create an API resource in the current tenant." }, { "info": { "name": "Get API resource", "type": "http" }, "http": { "method": "GET", "url": "https://[tenant_id].logto.app/api/resources/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The unique identifier of the resource." } ] }, "docs": "Get an API resource details by ID." }, { "info": { "name": "Update API resource", "type": "http" }, "http": { "method": "PATCH", "url": "https://[tenant_id].logto.app/api/resources/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The unique identifier of the resource." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update an API resource details by ID with the given data. This method performs a partial update." }, { "info": { "name": "Delete API resource", "type": "http" }, "http": { "method": "DELETE", "url": "https://[tenant_id].logto.app/api/resources/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The unique identifier of the resource." } ] }, "docs": "Delete an API resource by ID." }, { "info": { "name": "Set API resource as default", "type": "http" }, "http": { "method": "PATCH", "url": "https://[tenant_id].logto.app/api/resources/:id/is-default", "params": [ { "name": "id", "value": "", "type": "path", "description": "The unique identifier of the resource." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Set an API resource as the default resource for the current tenant.\n\nEach tenant can have only one default API resource. If an API resource is set as default, the previously set default API resource will be set as non-default. See [this section](https://docs.logto.io/docs/references/resources/#default-api) for more information." }, { "info": { "name": "Get API resource scopes", "type": "http" }, "http": { "method": "GET", "url": "https://[tenant_id].logto.app/api/resources/:resourceId/scopes", "params": [ { "name": "resourceId", "value": "", "type": "path", "description": "The unique identifier of the resource." }, { "name": "page", "value": "", "type": "query", "description": "Page number (starts from 1)." }, { "name": "page_size", "value": "", "type": "query", "description": "Entries per page." }, { "name": "search_params", "value": "", "type": "query", "description": "Search query parameters." } ] }, "docs": "Get scopes (permissions) defined for an API resource." }, { "info": { "name": "Create API resource scope", "type": "http" }, "http": { "method": "POST", "url": "https://[tenant_id].logto.app/api/resources/:resourceId/scopes", "params": [ { "name": "resourceId", "value": "", "type": "path", "description": "The unique identifier of the resource." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create a new scope (permission) for an API resource." }, { "info": { "name": "Update API resource scope", "type": "http" }, "http": { "method": "PATCH", "url": "https://[tenant_id].logto.app/api/resources/:resourceId/scopes/:scopeId", "params": [ { "name": "resourceId", "value": "", "type": "path", "description": "The unique identifier of the resource." }, { "name": "scopeId", "value": "", "type": "path", "description": "The unique identifier of the scope." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update an API resource scope (permission) for the given resource. This method performs a partial update." }, { "info": { "name": "Delete API resource scope", "type": "http" }, "http": { "method": "DELETE", "url": "https://[tenant_id].logto.app/api/resources/:resourceId/scopes/:scopeId", "params": [ { "name": "resourceId", "value": "", "type": "path", "description": "The unique identifier of the resource." }, { "name": "scopeId", "value": "", "type": "path", "description": "The unique identifier of the scope." } ] }, "docs": "Delete an API resource scope (permission) from the given resource." } ] } ], "bundled": true }