Congrats REST API
fields
An endpoint to manage the congrats fields.
Resource URL /rest/congrats/1.0/fields
Methods: GET POST
- GET
- POST
Returns a list of all configured fields.
Response
{
"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."
}],
"success": true
}
Parameters
Parameter | Type | Description |
name | String | The (required) name of the new field |
active | Boolean | Is the event active or inactive |
description | String | The description of the event |
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
}
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
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