Secured Endpoint: GET /collaborator-lists
This endpoint returns collaborator lists that belong to the authenticated user.
$ curl -sH "$AUTH_HEADER" "http://example.org/collaborator-lists" | jq .
{
"groups": [
{
"name": "bar",
"type": "group",
"description": "bar",
"display_extension": "bar",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:bar",
"extension": "bar",
"id_index": "10293",
"id": "f449ea254cdf480a80a7ad96d785389d"
},
{
"name": "foo",
"type": "group",
"description": "foo",
"display_extension": "foo",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:foo",
"extension": "foo",
"id_index": "10277",
"id": "ac0868a8835d4e73b7079754777def59"
}
]
}
The result can also be filtered by adding the search
query parameter.
$ curl -sH "$AUTH_HEADER" "http://example.org/collaborator-lists?search=foo" | jq .
{
"groups": [
{
"name": "foo",
"type": "group",
"description": "foo",
"display_extension": "foo",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:foo",
"extension": "foo",
"id_index": "10277",
"id": "ac0868a8835d4e73b7079754777def59"
}
]
}
Secured Endpoint: POST /collaborator-lists
$ curl -sH "$AUTH_HEADER" -H "Content-Type: application/json" -d '{"name": "bar", "description": "bar"}' \
"http://example.org/collaborator-lists" | jq .
{
"description": "bar",
"name": "bar",
"type": "group",
"extension": "bar",
"id": "f449ea254cdf480a80a7ad96d785389d",
"display_extension": "bar",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:bar",
"id_index": "10293"
}
Secured Endpoint: GET /collaborator-lists/{name}
$ curl -sH "$AUTH_HEADER" "http://example.org/collaborator-lists/foo" | jq .
{
"description": "foo",
"name": "foo",
"type": "group",
"extension": "foo",
"id": "ac0868a8835d4e73b7079754777def59",
"display_extension": "foo",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:foo",
"id_index": "10277"
}
Secured Endpoint: PATCH /collaborator-lists/{name}
Two fields can currently be updated: name
and description
. Fields that aren’t provided will remain unchanged.
$ curl -sH "$AUTH_HEADER" -H "Content-Type: application/json" -X PATCH -d '{"name": "baz", "description":"baz"}' \
"http://example.org/collaborator-lists/foo" | jq .
{
"description": "baz",
"name": "baz",
"type": "group",
"extension": "baz",
"id": "ac0868a8835d4e73b7079754777def59",
"display_extension": "baz",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:baz",
"id_index": "10277"
}
Secured Endpoint: DELETE /collaborator-lists/{name}
$ curl -sX DELETE -H "$AUTH_HEADER" "http://example.org/collaborator-lists/bar" | jq .
{
"description": "bar",
"display_extension": "bar",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:bar",
"extension": "bar",
"name": "bar",
"type": "group",
"id": "f449ea254cdf480a80a7ad96d785389d",
"id_index": "10293"
}
To allow members to retain permissions that had been granted to the collaborator list, the retain-permissions
query
parameter can be added and set to true
:
$ curl -sX DELETE -H "$AUTH_HEADER" "http://example.org/collaborator-lists/bar?retain-permissions=true" | jq .
{
"description": "bar",
"display_extension": "bar",
"display_name": "iplant:de:de-2:users:dennis:collaborator-lists:bar",
"extension": "bar",
"name": "bar",
"type": "group",
"id": "f449ea254cdf480a80a7ad96d785389d",
"id_index": "10293"
}
Secured Endpoint: GET /collaborator-lists/{name}/members
$ curl -sH "$AUTH_HEADER" http://example.org/collaborator-lists/foo/members | jq .
{
"members": [
{
"id": "ipcdev",
"name": "Ipc Dev",
"first_name": "Ipc",
"last_name": "Dev",
"email": "ipcdev@example.org",
"institution": "Iplant collaborative",
"source_id": "ldap"
}
]
}
Secured Endpoint: POST /collaborator-lists/{name}/members
$ curl -sH "$AUTH_HEADER" -d '{"members":["ipctest"]}' http://example.org/collaborator-lists/foo/members | jq .
{
"results": [
{
"success": true,
"subject_id": "ipctest",
"subject_name": "IPC Test"
}
]
}
Secured Endpoint: POST /collaborator-lists/{name}/members/deleter
$ curl -sH "$AUTH_HEADER" -d '{"members":["ipctest"]}' http://exmaple.org/collaborator-lists/foo/members/deleter | jq .
{
"results": [
{
"success": true,
"subject_id": "ipctest",
"subject_name": "IPC Test"
}
]
}
To retain permissions that had been granted to the collaborator list for removed members, the retain-permissions
query
parameter can be added and set to true
:
$ curl -sH "$AUTH_HEADER" -d '{"members":["ipctest"]}' "http://example.org/collaborator-lists/foo/members/deleter?retain-permissions=true" | jq .
{
"results": [
{
"success": true,
"subject_id": "ipctest",
"subject_name": "IPC Test"
}
]
}