LoopBack 3 has reached end of life. We are no longer accepting pull requests or providing support for community users. The only exception is fixes for critical bugs and security vulnerabilities provided as part of support for IBM API Connect customers. We urge all LoopBack 3 users to migrate their applications to LoopBack 4 as soon as possible. Learn more about LoopBack's long term support policy.

ACL REST API

Edit this page
The ACL model connects principals to protected resources. The system grants permissions to principals (users or applications, that can be grouped into roles).
Page Contents

Note: You can use the StrongLoop API Explorer to quickly construct and make requests to a LoopBack app running on the server. If a LoopBack app is running on localhost at port 3000, then by default API Explorer is available at http://localhost:3000/explorer/.

All of the endpoints in the ACL REST API are inherited from the PersistedModel REST API. The reference is provided here for convenience.

By default, the ACL REST API is not exposed. To expose it, add the following to models.json:

"acl": {
 "public": true,
 "options": {
 "base": "ACL"
 },
 "dataSource": "db"
}

Quick reference

URI Pattern

HTTP Verb Default Permission Description Arguments

/acls

POST Allow

Add ACL instance and persist to data source.

JSON object (in request body)
/acls GET Deny Find instances of ACLs that match specified filter.

One or more filters in query parameters:

  • where
  • include
  • order
  • limit
  • skip / offset
  • fields
/acls PUT Deny Update / insert ACL instance and persist to data source. JSON object (in request body)
/acls/id GET Deny Find ACL by ID : Return data for the specified ACL instance ID. id, the ACL instance ID (in URI path)
/acls/id PUT Deny Update attributes for specified ACL ID and persist.

Query parameters:

  • data - An object containing property name/value pairs
  • id - The model id
/acls/id DELETE Deny Delete ACL with specified instance ID. id, acls ID(in URI path)
/acls/id/exists GET Deny

Check instance existence : Return true if specified ACL ID exists.

URI path:

  • id - Model instance ID
/acls/count GET Deny

Return the number of ACL instances that matches specified where clause.

Where filter specified in query parameter
/acls/findOne GET Deny

Find first ACL instance that matches specified filter.

Same as Find matching instances.

AltStyle によって変換されたページ (->オリジナル) /