Devgroups are currently mainly for use in conjunction with mods (for those mods that are developed by groups instead of individuals) but are also used by games, forming the developer part of game URLs.
Because devgroups are used interchangeably with individual player usernames, they share the same namespace as usernames, and as such you cannot have a devgroup that is the same as an existing player username, and the allowed character rules are also the same.
Devgroups really only have two main fields besides their name - the member list and owner list. The member list is self-explanatory, and the owner list grants specified members (they must also be members, naturally) the right to edit the devgroup and override the owner lists of mods managed by the devgroup.
Devgroup info resource.
Example request:
GET /devgroup/thd/info HTTP/1.1
Host: api.kag2d.com
Accept: application/json
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"devgroupInfo": {
"devgroupID": "0aaf8030-91ec-11e3-baa8-0800200c9a66",
"memberList": [
"flieslikeabrick",
"furai",
"geti",
"jrgp",
"mm",
"roland",
"shadlington"
],
"name": "THD",
"ownerList": [
"flieslikeabrick",
"furai",
"geti",
"jrgp",
"mm",
"roland",
"shadlington"
],
"registered": "2013-12-11 00:00:00"
}
}
Parameters: |
|
---|---|
Status Codes: |
|
Response JSON fields: | |
|
Devgroup update resource. Uses HTTP basic auth - the username in the authorization header must be within the ownerList of the group being updated. Any members listed in the ownerList must also be in the memberList, and you cannot take yourself off of the ownerList. You cannot change the devgroup name once it has been set.
Example requests:
PUT /devgroup/thd/info HTTP/1.1
Host: api.kag2d.com
Content-Type: application/json
{
"devgroupInfo": {
"memberList": [
"flieslikeabrick",
"furai",
"geti",
"jrgp",
"mm",
"roland",
"shadlington"
],
"name": "THD",
"ownerList": [
"flieslikeabrick",
"furai",
"geti",
"jrgp",
"mm",
"roland",
"shadlington"
]
}
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{}
Parameters: |
|
---|---|
Status Codes: |
|
Request JSON fields: | |
|
Devgroup deletion resource. Uses HTTP basic auth - the username in the authorization header must be within the ownerList of the group being deleted. This will delete the entire devgroup and any mods that are associated with it.
Example request:
DELETE /devgroup/thd/info HTTP/1.1
Host: api.kag2d.com
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{}
Parameters: |
|
---|---|
Status Codes: |
|
Devgroup list resource. This is a list resource and therefore the notes in the introduction concerning list resources are relevant here: List type resources.
Special filter: If you specify a filter with the field ‘hasMember’ and give a player username as the value (the operator is always eq) then the devgroup list will be filtered to devgroups that have that player as one of the people in their memberList.
Example URL:
/devgroups?filters=[{“field”: “hasMember”, “value”: “Shadlington”}]&limit=5&start=10
Example request:
GET /devgroups HTTP/1.1
Host: api.kag2d.com
Accept: application/json
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"devgroupList": [
{
"devgroupID": "0aaf8030-91ec-11e3-baa8-0800200c9a66",
"memberList": [
"flieslikeabrick",
"furai",
"geti",
"jrgp",
"mm",
"roland",
"shadlington"
],
"name": "THD",
"ownerList": [
"flieslikeabrick",
"furai",
"geti",
"jrgp",
"mm",
"roland",
"shadlington"
],
"registered": "2013-12-11 00:00:00"
},
{
anotherdevgroup (same format as above)
}
]
}
Query Parameters: | |
---|---|
|
|
Status Codes: |
|
Response JSON fields: | |
|
Devgroup list filter info resource This is a list filterinfo resource and therefore the notes in the introduction concerning list resources are relevant here: List type resources.
Example request:
GET /devgroups/filterinfo HTTP/1.1
Host: api.kag2d.com
Accept: application/json
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"devgroupListFilterFields": [
{
"name": "registered",
"type": "datetime"
},
{
"name": "devgroupID",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "last_modified",
"type": "datetime"
},
{
"name": "hasMember",
"ops": "eq",
"type": "string"
}
],
"devgroupListFilterOperators": [
{
"meaning": ">",
"name": "gt"
},
{
"meaning": "<",
"name": "lt"
},
{
"meaning": "!=",
"name": "ne"
},
{
"meaning": ">=",
"name": "ge"
},
{
"meaning": "<=",
"name": "le"
},
{
"meaning": "=",
"name": "eq"
}
]
}
Status Codes: |
|
---|---|
Response JSON fields: | |
|