Return a [paginated](http://developer.apiture.com/docs/concepts/pagination) [sortable](http://developer.apiture.com/docs/concepts/sorting) [filterable](http://developer.apiture.com/docs/concepts/filtering) [searchable](http://developer.apiture.com/docs/concepts/searching) collection of consents. The [links](http://developer.apiture.com/docs/concepts/links) in the response include pagination links.
curl -X GET -H "API-Key: [[apiKey]]" "http:///consents/consents?type=&state=&userId=&contextUri=&start=&limit=&sortBy=&filter=&q="
import { ConsentApi } from "@apiture/consents-client-sdk";
const consentApi = new ConsentApi(configuration);
// Configure OAuth2 access token for authorization: accessToken
var accessToken = "YOUR ACCESS TOKEN";
consentApi.setAccessToken(accessToken)
// Configure API key authorization: apiKey
var apiKey = "YOUR API KEY";
consentApi.setApiKey(apiKey);
var api = new Consents.ConsentApi.getConsents()
var opts = {
'type': type_example, // {String} Subset the response to those with this `type` value. Use `|` to separate multiple values. For example, `?type=termsAndCondition` matches only items whose `type` is `termsAndCondition` `?type=privacyPolicy|electronicConsent` matches items whose type is `privacyPolicy` or `electronicConsent`. This is combined with an implicit and with other filters if they are used. See [filtering](https://developer.apiture.com/docs/concepts/filtering).
'state': state_example, // {String} Subset the response to those with this `state` value. Use `|` to separate multiple values. For example, `?type=given|stale` matches only items whose `state` is `given` or `stale`. This is combined with an implicit and with other filters if they are used. See [filtering](https://developer.apiture.com/docs/concepts/filtering).
'userId': userId_example, // {String} Subset the response to those with this `userId` value. Use `|` to separate multiple values. This is for administrative use; bank users can only see their own consents.
'contextUri': contextUri_example, // {String} Subset the response to those with this `contextUri` value. Use `|` to separate multiple values.
'start': 789, // {Long} The zero-based index of the first consent item to include in this page. The default 0 denotes the beginning of the collection.
'limit': 56, // {Integer} The maximum number of consent representations to return in this page.
'sortBy': sortBy_example, // {String} Optional sort criteria. See [sort criteria format](http://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
'filter': filter_example, // {String} Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).
'q': q_example // {String} Optional search string. See [searching](http://developer.apiture.com/docs/concepts/searching).
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
consentApi.getConsents(opts, callback);
Name |
Description |
type |
String
Subset the response to those with this `type` value. Use `|` to separate multiple values. For example, `?type=termsAndCondition` matches only items whose `type` is `termsAndCondition` `?type=privacyPolicy|electronicConsent` matches items whose type is `privacyPolicy` or `electronicConsent`. This is combined with an implicit and with other filters if they are used. See [filtering](https://developer.apiture.com/docs/concepts/filtering).
|
state |
String
Subset the response to those with this `state` value. Use `|` to separate multiple values. For example, `?type=given|stale` matches only items whose `state` is `given` or `stale`. This is combined with an implicit and with other filters if they are used. See [filtering](https://developer.apiture.com/docs/concepts/filtering).
|
userId |
String
Subset the response to those with this `userId` value. Use `|` to separate multiple values. This is for administrative use; bank users can only see their own consents.
|
contextUri |
String
Subset the response to those with this `contextUri` value. Use `|` to separate multiple values.
|
start |
Long
(int64)
The zero-based index of the first consent item to include in this page. The default 0 denotes the beginning of the collection.
|
limit |
Integer
(int32)
The maximum number of consent representations to return in this page.
|
sortBy |
String
Optional sort criteria. See [sort criteria format](http://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
|
filter |
String
Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).
|
q |
String
Optional search string. See [searching](http://developer.apiture.com/docs/concepts/searching).
|