Skip to content

Instantly share code, notes, and snippets.

@sgithens
Last active March 9, 2020 16:55
Show Gist options
  • Select an option

  • Save sgithens/7593ac4a81d03371c68899530f312aee to your computer and use it in GitHub Desktop.

Select an option

Save sgithens/7593ac4a81d03371c68899530f312aee to your computer and use it in GitHub Desktop.
Client Credential Query with scrubbing of secrets field
{
"selector": {
"type": {
"$eq": "clientCredential"
}
},
"fields": [
"_id",
"_rev",
"type",
"schemaVersion",
"clientId",
"oauth2ClientId",
"allowedIPBlocks",
"allowedPrefsToWrite",
"isCreateGpiiKeyAllowed",
"isCreatePrefsSafeAllowed",
"revoked",
"revokedReason",
"timestampCreated",
"timestampRevoked"
]
}
curl -X POST -H "Content-Type: application/json" --data '{ "selector": { "type": { "$eq": "clientCredential" } }, "fields": [ "_id", "_rev", "type", "schemaVersion", "clientId", "oauth2ClientId", "allowedIPBlocks", "allowedPrefsToWrite", "isCreateGpiiKeyAllowed", "isCreatePrefsSafeAllowed", "revoked", "revokedReason", "timestampCreated", "timestampRevoked" ]}' http://localhost:5984/gpii/_find > out.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment