A Person object has the following properties:
id
: string - The unique identifier of a personusername
: string - The username of a personemail
: string - The email address of a personCreates a new person.
POST /api/v2/person
Arguments:
name
: string : The name of the new personemail
: string : The email address of the new personusername
: string : The username of the new personResponse object:
id
- string : The identifier of the personname
- string : The name of the personemail
- string : The email address of the personusername
- string : The username of the personcreatedAt
- timestamp : When the person was createdisLocked
- boolean : Whether the person is lockedExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X POST \
"${JACKDB_API_URL}/person" \
-d "name=Alice%20Smith&email=alice@example.org&username=alice"
Example response:
{
"id": "PCukhIFFiNQaN19c",
"name": "Alice Smith",
"email": "alice@example.org",
"username": "alice",
"createdAt": "2015-03-22T16:35:27.376Z"
}
Permanently delete a person. The person must be locked prior to deletion.
DELETE /api/v2/person/:person
Arguments:
Response object:
This method returns an object with no properties.
Example request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X DELETE \
"${JACKDB_API_URL}/person/P0cKFCMIHoNaBFt7Y"
Example response:
{}
Permanently deletes all permissions granted to a person.
DELETE /api/v2/person/:person/permission
Arguments:
Response object:
count
- integer : the number of deleted permissionsExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X DELETE \
"${JACKDB_API_URL}/person/P0cKFCMIHoNaBFt7Y/permission"
Example response:
{
"count": 2
}
Disables a person's two-factor authentication (2FA).
DELETE /api/v2/person/:person/two-factor
Arguments:
Response object:
This method returns an object with no properties.
Example request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X DELETE \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R/two-factor"
Example response:
{}
Note: This is an idempotent endpoint. Disabling two-factor authentication when it is already disabled will return a success response.
Returns a list of all people.
GET /api/v2/person
Arguments:
This method has no additional arguments.
Response object:
id
- string : The unique identifier of the personname
- string : The name of the personusername
- string : The username of the personemail
- string : The email address of the personcreatedAt
- timestamp : When the person was createdisLocked
- boolean : Whether the person is lockedExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/person"
Example response:
[
{
"id": "P0GLBLsmDP7iqto7R",
"name": "Vaughn Rasmussen",
"username": "vrasmussen",
"email": "vaughn.rasmussen@example.com",
"createdAt": "2014-09-01T21:46:02.539Z"
},
{
"id": "P11TDFUc9rMeFgSyY",
"name": "Emmy Armstrong",
"username": "earmstrong",
"email": "emmy.armstrong@example.com",
"createdAt": "2014-08-27T01:11:36.077Z"
},
{
"id": "P2227D20azrJ62nYE",
"name": "Aurora Douglas",
"username": "adouglas",
"email": "aurora.douglas@example.com",
"createdAt": "2014-09-03T06:14:34.593Z"
}
]
Returns a list of all data sources accessible to a person.
GET /api/v2/person/:person/data-source
Arguments:
Response object:
id
- string : The unique identifier of the data sourcename
- string : The name of the data sourcealias
- string : The alias of the data sourceExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R/data-source"
Example response:
[
{
"id": "DvZqlrLUHTE4G11L9",
"name": "GL Production",
"alias": "gl-prod"
},
{
"id": "DFtlu8gfkiOSl0zf",
"name": "GL Testing",
"alias": "gl-uat"
}
]
Returns a list of all permissions granted to a person.
GET /api/v2/person/:person/permission
Arguments:
Response object:
id
- string : The unique identifier of the permissionpersonId
- string : The unique identifier of the person granted this permissiondataSourceId
- string : The unique identifier of the data source for this permissionexpiresAt
- timestamp : When the permission is set to expireExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R/permission"
Example response:
[
{
"id": "68939",
"personId": "P0cKFCMIHoNaBFt7Y",
"dataSourceId": "DUGC6IqGQ4DX00Lt0",
"expiresAt": "2015-03-13T00:47:14.120Z"
},
{
"id": "69303",
"personId": "P0cKFCMIHoNaBFt7Y",
"dataSourceId": "DUGC6IqGQ4DX00Lt0",
"expiresAt": "2015-03-13T00:47:15.193Z"
}
]
Returns a list of all roles assigned to a person.
GET /api/v2/person/:person/role
Arguments:
Response object:
id
- string : The unique identifier of the rolename
- string : The name of the roleassignedAt
- timestamp : When the person was assigned to the roleExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R/role"
Example response:
[
{
"id": "RHZ7pTXMCm3HrhG92",
"name": "Finance",
"assignedAt": "2014-09-04T16:20:09.138Z"
},
{
"id": "RPJa0nipdJrG9kl6z",
"name": "HR",
"assignedAt": "2014-09-03T17:13:49.955Z"
}
]
Locks a person.
PUT /api/v2/person/:person/lock
Arguments:
Response object:
This method returns an object with no properties.
Example request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X PUT \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R/lock"
Example response:
{}
Note: This is an idempotent endpoint. Locking a person whose account is already locked will return a success response.
Retrieves the details of an existing person.
GET /api/v2/person/:person
Arguments:
Response object:
id
- string : The identifier of the personname
- string : The name of the personusername
- string : The username of the personemail
- string : The email address of the personcreatedAt
- timestamp : When the person was createdisLocked
- boolean : Whether the person is lockedExample request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R"
Example response:
{
"id": "P0GLBLsmDP7iqto7R",
"name": "Vaughn Rasmussen",
"username": "vrasmussen",
"email": "vaughn.rasmussen@example.com",
"createdAt": "2014-09-01T21:46:02.539Z"
}
Unlocks a person.
PUT /api/v2/person/:person/unlock
Arguments:
Response object:
This method returns an object with no properties.
Example request:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X PUT \
"${JACKDB_API_URL}/person/P0GLBLsmDP7iqto7R/unlock"
Example response:
{}
Note: This is an idempotent endpoint. Unlocking a person whose account is already unlocked will return a success response.