ROSEPEOPLE Developers - Web API Reference

People | Department

Service to manage entities of type 'Department'.

Overview


URL api/{tenantKey}/{orgKey}/peopleCore/departments
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

GET Operations

GET Departments

Returns the list of all the entity records available.

Response:

When successful, the response body contains the list of records available. See DepartmentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /peopleCore/departments

GET Departments (paged)

Returns a page of the list of all the entity records available.

The following elements are optional:

page (int) The index of the page of the list that should be returned. This is a query string parameter.
pageSize (int) The number of page elements that should be returned (max. is 1000). This is a query string parameter.

Response:

When successful, the response body contains the list of records available. See DepartmentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /peopleCore/departments?page={page}&pageSize={pageSize}

GET Department by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See DepartmentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /peopleCore/departments/{id}

GET Department by key

Returns the entity record that matches the specified key.

The following elements are required:

departmentKey (string) Department.

Response:

When successful, the response body contains the entity record. See DepartmentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /peopleCore/departments/{departmentKey}

GET Print Department by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /peopleCore/departments/{id}/print?template={template}

GET Print Department by key

Prints the specified entity record.

The following elements are required:

departmentKey (string) Department.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /peopleCore/departments/{departmentKey}/print

GET Original Print DepartmentOriginal by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /peopleCore/departments/{id}/printOriginal?template={template}

GET Original Print Department by key

Prints the specified entity record.

The following elements are required:

departmentKey (string) Department.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /peopleCore/departments/{departmentKey}/printOriginal

POST Operations

POST Departments

Creates a new entity record.

The following elements are required:

departmentResource (ApiDepartmentResource) The request body should contain the entity record that should be created.
See ApiDepartmentResource.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiDepartmentResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /peopleCore/departments

PUT Operations

PUT Set DepartmentKey Department

Updates the value of attribute 'DepartmentKey' in the specified entity record.

The following elements are required:

departmentKey (string) Department.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /peopleCore/departments/{departmentKey}/departmentKey

PUT Set Description Department

Updates the value of attribute 'Description' in the specified entity record.

The following elements are required:

departmentKey (string) Department.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /peopleCore/departments/{departmentKey}/description

PUT Set IsActive Department

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

departmentKey (string) Department.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /peopleCore/departments/{departmentKey}/isActive

DELETE Operations

DELETE Department by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /peopleCore/departments/{id}

DELETE Department by key

Deletes the entity record that matches the specified key.

The following elements are required:

departmentKey (string) Department.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /peopleCore/departments/{departmentKey}

Resources


ApiDepartmentResource

The following elements are required:

departmentKey (string) Department.
description (string) Description.


DepartmentResource

The following elements are required:

departmentKey (string) Department.
description (string) Description.