Skip to content
Snippets Groups Projects
Commit 852c3261 authored by Sean Madsen's avatar Sean Madsen Committed by GitHub
Browse files

Merge pull request #435 from MegaphoneJon/api-username-lookup

Document API lookups by username
parents fec2eb6a 8ae362bc
Branches
No related tags found
No related merge requests found
......@@ -222,3 +222,12 @@ cv api contact.get first_name=Alice last_name=Roberts
## API Security
API has security mesasures built in depending on the way the API is called that can also be turned off or on. API Permissions are also able to be altered via hook. More information on API Security can be found in the [Security Doucmentation](/security/permissions.md).
## API Lookups by Username
You can use a CMS username in lieu of a contact ID by prefacing it with `@user:`. For instance, if the user "james" has a CiviCRM contact ID of 123, these statements are identical:
```bash
cv api contact.get id=123
cv api contact.get id=@user:james
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment