Retrieves a list of service credentials.
filter | string Filters the collection items. This field requires
a special format. Use For more information, see Using filter with collections. |
limit | integer [ 0 .. 1000 ] Limits the number of collection items to be returned. |
offset | integer >= 0 Specifies the starting point within the collection of items to be returned. |
sort | Array of strings Sorts and orders the collection of items. To sort in descending
order, prefix with |
q | string Use this field to perform a partial search of text fields. |
List of service credentials retrieved.
Unauthorized access. Invalid credentials used.
Access forbidden.
// type is required, other parameters are optional const firstCollection = await api.serviceCredentials.getAll({type: 'webhook'}); // alternatively you can specify one or more of them const params = {type: 'webhook', limit: 20, offset: 100}; const secondCollection = await api.serviceCredentials.getAll(params); // access the collection items, each item is a ServiceCredential secondCollection.items.forEach(serviceCredential => console.log(serviceCredential.fields.status));
[- {
- "id": "crd_0YV9Y706QGCB39FQD380G1ZHZH",
- "hash": "crd_0YV9Y706QGCB39FQD380G1ZHZH",
- "status": "active",
- "deactivationTime": "2019-08-24T14:15:22Z",
- "type": "smtp",
- "host": "string",
- "port": 25,
- "encryption": "none",
- "auth": {
- "type": "none"
}, - "_links": [
- {
- "href": "string",
- "rel": "self"
}
]
}
]