Closed baierjan closed 4 months ago
Good catch. We internally normally don't use these endpoints but /api/v4/users/organizations
, but I agree that the other endpoints should accept ID's when using a data source other than 0.
Yep, using /api/v4/users/organizations
works as expected, so it could be used as a quick workaround, one just need to batch all groups into one array and POST it together. Thanks!
I am already working on a fix, so should be there soon ™️
No need to hurry, as the workaround is working well, this issue is not at all critical.
Note that for this endpoint, we can't allow ID, since that is against the CLICS spec, see https://ccs-specs.icpc.io/draft/contest_api#http-methods.
But instead, we can add a PUT to a specific entity, which I will implement.
Description of the problem
Similar problem to #2186; when using
data_source=1
(i.e. configuration data external), Group entity (a.k.a. Team Categories) is created without externalid when using api endpoint/api/v4/contests/{cid}/groups
.Your environment
DOMjudge 8.3.0DEV/30f885875
Steps to reproduce
curl -XPOST https://domserver/api/v4/contests/demo/groups -Fname=demo -Ficpc_id=1234
Expected behaviour
External id can be set via API call or is automatically created. Like in the Teams entity,
id
attribute could be included in the API call:curl -XPOST https://domserver/api/v4/contests/demo/groups -Fid=1234 -Fname=demo -Ficpc_id=1234
and that should set the external id if using configuration data external mode.Actual behaviour
API call returns:
No external id for the entity is created and the configuration checker shows an error "Team category XY does not have an external ID" which needs to be fixed by manually editing all entities via GUI.