kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
165 lines
6.0 KiB
165 lines
6.0 KiB
# Group Principals
|
|
|
|
Principals are the superclass of groups and users.
|
|
|
|
Currently, OpenProject represents groups the same way it represents users. This is subject to change.
|
|
|
|
## Linked Properties
|
|
|
|
See [user](#users)
|
|
|
|
## Local Properties
|
|
|
|
See [user](#users)
|
|
|
|
## Principals [/api/v3/principals{?filters}]
|
|
|
|
+ Model
|
|
+ Body
|
|
|
|
{
|
|
"_type": "Collection",
|
|
"total": 3,
|
|
"count": 3,
|
|
"_embedded": {
|
|
"elements": [
|
|
{
|
|
"_type": "User",
|
|
"id": 4,
|
|
"login": "Eliza92778",
|
|
"admin": false,
|
|
"subtype": "User",
|
|
"firstName": "Danika",
|
|
"lastName": "O'Keefe",
|
|
"name": "Danika O'Keefe",
|
|
"email": "jackie@dicki.org",
|
|
"avatar": "http://gravatar.com/avatar/d15034e1c02bb32bb152637494860ce5?default=identicon&secure=false",
|
|
"createdAt": "2015-03-20T12:57:02Z",
|
|
"updatedAt": "2015-06-16T15:28:14Z",
|
|
"status": "active",
|
|
"identityUrl": null,
|
|
"_links": {
|
|
"self": {
|
|
"href": "/api/v3/users/4",
|
|
"title": "Danika O'Keefe"
|
|
},
|
|
"showUser": {
|
|
"href": "/users/4",
|
|
"type": "text/html"
|
|
},
|
|
"updateImmediately": {
|
|
"href": "/api/v3/users/4",
|
|
"title": "Update Eliza92778",
|
|
"method": "patch"
|
|
},
|
|
"lock": {
|
|
"href": "/api/v3/users/4/lock",
|
|
"title": "Set lock on Eliza92778",
|
|
"method": "post"
|
|
},
|
|
"delete": {
|
|
"href": "/api/v3/users/4",
|
|
"title": "Delete Eliza92778",
|
|
"method": "delete"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"_type": "User",
|
|
"id": 2,
|
|
"login": "Sebastian9686",
|
|
"admin": false,
|
|
"subtype": "User",
|
|
"firstName": "Peggie",
|
|
"lastName": "Feeney",
|
|
"name": "Peggie Feeney",
|
|
"email": null,
|
|
"avatar": "http://gravatar.com/avatar/1d89e51dcf03b152b374b43510e2012a?default=identicon&secure=false",
|
|
"createdAt": "2015-03-20T12:56:55Z",
|
|
"updatedAt": "2015-03-20T12:56:55Z",
|
|
"status": "active",
|
|
"identityUrl": null,
|
|
"_links": {
|
|
"self": {
|
|
"href": "/api/v3/users/2",
|
|
"title": "Peggie Feeney"
|
|
},
|
|
"showUser": {
|
|
"href": "/users/2",
|
|
"type": "text/html"
|
|
},
|
|
"updateImmediately": {
|
|
"href": "/api/v3/users/2",
|
|
"title": "Update Sebastian9686",
|
|
"method": "patch"
|
|
},
|
|
"lock": {
|
|
"href": "/api/v3/users/2/lock",
|
|
"title": "Set lock on Sebastian9686",
|
|
"method": "post"
|
|
},
|
|
"delete": {
|
|
"href": "/api/v3/users/2",
|
|
"title": "Delete Sebastian9686",
|
|
"method": "delete"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"_type": "User",
|
|
"id": 9,
|
|
"login": "",
|
|
"admin": false,
|
|
"subtype": "Group",
|
|
"firstName": "",
|
|
"lastName": "Group 1",
|
|
"name": "Group 1",
|
|
"email": null,
|
|
"avatar": "",
|
|
"createdAt": "2015-09-23T11:06:36Z",
|
|
"updatedAt": "2015-09-23T11:06:36Z",
|
|
"status": "active",
|
|
"_links": {
|
|
"self": {
|
|
"href": "/api/v3/users/9",
|
|
"title": "Group 1"
|
|
},
|
|
"showUser": {
|
|
"href": "/users/9",
|
|
"type": "text/html"
|
|
},
|
|
"updateImmediately": {
|
|
"href": "/api/v3/users/9",
|
|
"title": "Update ",
|
|
"method": "patch"
|
|
},
|
|
"delete": {
|
|
"href": "/api/v3/users/9",
|
|
"title": "Delete ",
|
|
"method": "delete"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"self": {
|
|
"href": "/api/v3/principals"
|
|
}
|
|
}
|
|
}
|
|
|
|
## List principals [GET]
|
|
|
|
List all principals. The client can choose to filter the principals similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain principals who are members in projects the client is allowed to see.
|
|
|
|
+ Parameters
|
|
+ filters (optional, string, `[{ "type": { "operator": "=", "values": ["User"] }" }]`) ... JSON specifying filter conditions.
|
|
Accepts the same format as returned by the [queries](#queries) endpoint.
|
|
Currently supported filters are:
|
|
+ type: filters principals by their type (*User*, *Group*).
|
|
+ member: filters principals by the projects they are members in.
|
|
|
|
+ Response 200 (application/hal+json)
|
|
|
|
[Principals][]
|
|
|