Note that the REST API does not cause administrator groups to be created when a COU is created. When adding a COU, you may wish to add the corresponding admin:COU group as well.

Add

Add a new Cou.

Request Format

Method

POST

URL

/cous.<format>

Request Body

Cou Request

Response Format

HTTP Status

Response Body

Description

201 Added

NewObjectResponse with ObjectType of Cou

Cou added

400 Bad Request

 

Cou Request not provided in POST body

400 Invalid Fields

ErrorResponse with details in InvalidFields element

An error in one or more provided fields

401 Unauthorized

 

Authentication required

403 CO Does Not Exist

 

The specified CO does not exist

403 Name In Use

 

A COU already exists with the specified name in the specified CO

403 Parent Would Create Cycle

 

Parent COU can not be a descendant of the child

403 Wrong CO

 

Parent/child COU not member of same CO

500 Other Error

 

Unknown error


Delete

Remove a Cou.

Request Format

Method

DELETE

URL

/cous/<id>.<format>

Request Body

 

Response Format

HTTP Status

Response Body

Description

200 Deleted

 

Cou deleted

400 Invalid Fields

 

id not provided

401 Unauthorized

 

Authentication required

403 CoPersonRole Exists

 

One or more CO Person Roles are members of this COU, and so the COU cannot be removed

403 Child COU Exists

 

Can not be deleted if children will be orphaned

404 Identifier Unknown

 

id not found

500 Other Error

 

Unknown error


Edit

Edit an existing Cou.

Request Format

Method

PUT

URL

/cous/<id>.<format>

Request Body

Cou Request

Response Format

HTTP Status

Response Body

Description

200 OK

 

Cou updated

400 Bad Request

 

Cou Request not provided in POST body

400 Invalid Fields

ErrorResponse with details in InvalidFields element

An error in one or more provided fields

401 Unauthorized

 

Authentication required

403 CO Does Not Exist

 

The specified CO does not exist

403 Name In Use

 

A COU already exists with the specified name in the specified CO

403 Parent Would Create Cycle

 

Parent COU can not be a descendant of the child

403 Wrong CO

 

Parent/child COU not member of same CO

404 Identifier Unknown

 

id not found

500 Other Error

 

Unknown error


View (all)

Retrieve all existing Cous.

Request Format

Method

GET

URL

/cous.<format>

Request Body

 

Response Format

HTTP Status

Response Body

Description

200 OK

Cou Response

Cou returned

401 Unauthorized

 

Authentication required

500 Other Error

 

Unknown error


View (per CO)

Retrieve Cou attached to a CO.

Request Format

Method

GET

URL

/cous.<format>?coid=<id>

Request Body

 

Response Format

HTTP Status

Response Body

Description

200 OK

Cou Response

Cou returned

401 Unauthorized

 

Authentication required

404 CO Unknown

 

id not found

500 Other Error

 

Unknown error


View (one)

Retrieve an existing Cou.

Request Format

Method

GET

URL

/cous/<id>.<format>

Request Body

 

Response Format

HTTP Status

Response Body

Description

200 OK

Cou Response

Cou returned

401 Unauthorized

 

Authentication required

404 Cou Unknown

 

id not found

500 Other Error

 

Unknown error


Notes

  • Response format requested is ignored where response is only via HTTP status, but must still be provided.

See Also

  • No labels