Congrats REST API
fields
An endpoint to manage the congrats fields.
Resource URL /rest/congrats/1.0/fields
Methods: GET POST
fields/values
Resource URL /rest/congrats/1.0/fields/values
Methods: GET
- GET
A list of all fields with values, optional from a specific user.
Parameters
Parameter | Type | Description |
---|---|---|
active | Boolean | Is the field active or inactive |
description | String | The description of the field |
username | String | This parameter is optional. If set and the current logged in user is an administrator, this user is used. If the parameter empty, the current user is used. |
Response
{ "status": 200, "data": [{ "id": 1, "identifier": "birthday", "active": true, "systemfield": true, "name": "Birthday", "description": "What is your birthday?", "value": "1981-07-25" }, { "id": 2, "identifier": "entrydate", "active": true, "systemfield": true, "name": "Date of entry", "description": "Your first day in our company.", "value": "2008-08-08" }], "success": true }
fields/{id}
Resource URL /rest/congrats/1.0/fields/{id
}
Methods: GET PUT DELETE
- GET
- PUT
- DELETE
Returns a field by the given id.
Parameters
Parameter | Type | Description |
---|---|---|
id | Long | The id of the field |
Response
{ "status": 200, "data": { "id": 1, "identifier": "birthday", "active": true, "systemfield": true, "name": "Birthday", "description": "What is your birthday?" }, "success": true }
Parameters
Parameter | Type | Description |
---|---|---|
id | Long | The (required) id of the field |
name | String | The name of the field |
active | Boolean | Is the field active or inactive |
description | String | The description of the field |
Response
Returns all configured fields, including the new generated field.
{ "status": 200, "data": [{ "id": 1, "identifier": "birthday", "active": true, "systemfield": true, "name": "Birthday", "description": "What is your birthday?" }, { "id": 2, "identifier": "entrydate", "active": true, "systemfield": true, "name": "Date of entry", "description": "Your first day in our company." }, { "id": 3, "identifier": "1iv1j0oi0d4ro", "active": true, "systemfield": false, "name": "New field", "description": "My new field" }], "success": true }
Delete a field. This method needs to be authenticated by an administrator!
Parameters
Parameter | Type | Description |
---|---|---|
id | Long | The id of the field |
Response
Status 200
fields/{id}/value
Resource URL /rest/congrats/1.0/fields/{id}/value
Methods: GET PUT POST DELETE
events
Resource URL /rest/congrats/1.0/events
Methods: GET POST
events/active
Resource URL /rest/congrats/1.0/events/active
Methods: GET
events/{id}
Resource URL /rest/congrats/1.0/events/{id
}
Methods: GET PUT DELETE
calendar
Resource URL /rest/congrats/1.0/calendar
Methods: GET
notifications
Resource URL rest/congrats/1.0/notifications
Methods: POST