A Permission object has the following properties:
id
: string - The unique identifier of a permissionCreates a permission granting access to a data source to a specific person.
POST /api/v2/data-source/:data-source/permission/person/:person
Arguments:
Response object:
id
- string : The unique identifier of the permissionstartsAt
- timestamp : When the permission is set to startexpiresAt
- timestamp : When the permission is set to expirecreatedAt
- timestamp : When the permission was createdExample request (starting immediately):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X POST \
-d "duration=86400" \
"${JACKDB_API_URL}/data-source/DUGC6IqGQ4DX00Lt0/permission/person/P0cKFCMIHoNaBFt7Y"
Example response:
{
"id": "13382",
"startsAt": "2015-03-12T22:17:29.609Z"
"expiresAt": "2015-03-13T22:17:29.609Z",
"createdAt": "2015-03-12T22:17:29.609Z"
}
Example request (deferred):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
-X POST \
-d "duration=86400&startsAt=2015-03-23T23:00:00.000Z" \
"${JACKDB_API_URL}/data-source/DUGC6IqGQ4DX00Lt0/permission/person/P0cKFCMIHoNaBFt7Y"
Example response:
{
"id": "23385",
"startsAt": "2015-03-23T23:00:00.000Z"
"expiresAt": "2015-03-24T23:00:00.000Z",
"createdAt": "2015-03-21T22:17:29.609Z"
}
Permanently deletes an existing permission.
DELETE /api/v2/permission/:permission
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}/permission/19213"
Example response:
{}
Permanently deletes all permissions associated with a specific person and data source.
DELETE /api/v2/data-source/:data-source/permission/person/:person
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}/data-source/DUGC6IqGQ4DX00Lt0/permission/person/P0cKFCMIHoNaBFt7Y"
Example response:
{
"count": 2
}
Returns a list of all permissions.
GET /api/v2/permission
Arguments:
This method has no additional arguments.
Response object:
id
- string : The unique identifier of the permissioncreatedAt
- timestamp - When this permission was createdstartsAt
- timestamp : When this permission is set to startexpiresAt
- timestamp : When this permission is set to expireperson
- object : The Person object to whom this permission is granted
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 persondataSource
- object : The Data Source object onto which this permission is granted
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}/permission"
Example response:
[
{
"id": "19213",
"createdAt": "2015-03-13T13:57:07.858Z",
"startsAt": "2015-03-13T13:57:07.858Z",
"expiresAt": "2015-03-13T15:03:47.858Z",
"person": {
"id": "P7ueWXlRjejZU3Yzt",
"name": "Alexia Buckner",
"username": "abuckner",
"email": "alexia.buckner@example.com"
},
"dataSource": {
"id": "DUGC6IqGQ4DX00Lt0",
"name": "General Ledger",
"alias": "gl-prod"
}
},
{
"id": "19218",
"createdAt": "2015-03-13T13:57:28.216Z",
"expiresAt": "2015-03-14T13:57:28.216Z",
"person": {
"id": "PTbjsa5vR6Hu5aIT5",
"name": "Zayne Tran",
"username": "ztran",
"email": "zayne.tran@example.com"
},
"dataSource": {
"id": "DUGC6IqGQ4DX00Lt0",
"name": "General Ledger",
"alias": "gl-prod",
}
}
]
Returns a list of all permissions granting access to a data source to a specific person.
GET /api/v2/data-source/:data-source/permission/person/:person
Arguments:
Response object:
id
- string : The unique identifier of the permissionpersonId
- string : The unique identifier of the persondataSourceId
- string : The unique identifier of the data sourcestartsAt
- timestamp : When the permission is set to startexpiresAt
- 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}/data-source/DUGC6IqGQ4DX00Lt0/permission/person/P0cKFCMIHoNaBFt7Y"
Example response:
[
{
"id": "68939",
"personId": "P0cKFCMIHoNaBFt7Y",
"dataSourceId": "DUGC6IqGQ4DX00Lt0",
"startsAt": "2015-03-12T23:47:14.120Z",
"expiresAt": "2015-03-13T00:47:14.120Z"
},
{
"id": "69303",
"personId": "P0cKFCMIHoNaBFt7Y",
"dataSourceId": "DUGC6IqGQ4DX00Lt0",
"startsAt": "2015-03-12T23:47:14.120Z",
"expiresAt": "2015-03-13T00:47:15.193Z"
}
]
Retrieves the details of an existing permission.
GET /api/v2/permission/:permission
Arguments:
Response object:
id
- string : The unique identifier of the permissioncreatedAt
- timestamp - When this permission was createdexpiresAt
- timestamp : When this permission is set to expireperson
- object : The Person object to whom this permission is granted
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 persondataSource
- object : The Data Source object onto which this permission is granted
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}/permission/19213"
Example response:
{
"id": "19213",
"createdAt": "2015-03-13T13:57:07.858Z",
"expiresAt": "2015-03-13T15:03:47.858Z",
"person": {
"id": "P7ueWXlRjejZU3Yzt",
"name": "Alexia Buckner",
"username": "abuckner",
"email": "alexia.buckner@example.com"
},
"dataSource": {
"id": "DUGC6IqGQ4DX00Lt0",
"name": "General Ledger",
"alias": "gl-prod"
}
}