Resources

Resource Object

Property Type Description Writable
id integer Unique identifier for this resource. No
schedule_id string Schedule identifier. No
name string Resource name. Required when creating a resource. Must be unique across all resources. The maximum length is 100 characters. Yes
description string Resource description. The maximum length is 200 characters. Yes
color_fg string Resource name color in HTML hex format #RRGGBB. Default is #000000 (black). Yes
color_bk string Resource name background color in HTML hex format #RRGGBB. Default is #FFFFFF (white). Yes
color_schedule string Resource row background color in HTML hex format #RRGGBB. Default is #FFFFFF (white). Yes
text_bold boolean true if a bold font is used for the resource name; false otherwise. Default is false. Yes
link string Web link associated with this resource. The URL scheme must be HTTP or HTTPS. The maximum length is 250 characters. For dynamic variables, see here. Yes
link_title string Title for the resource web link. The maximum length is 100 characters. Yes
note string A multi-line note for this resource. The maximum length is 500 characters. Yes
custom_1 string Value of the first custom field. The maximum length is 200 characters. Yes
custom_2 string Value of the second custom field. The maximum length is 200 characters. Yes
updated_at string The date and time when this resource was last updated, in UTC and ISO 8601 format. No
created_at string The date and time when this resource was created, in UTC and ISO 8601 format. No

Get Resources

GET /schedules/scheduleId/resources

Returns all resources of a schedule.

Parameters

Name Description
scheduleId Schedule identifier.
Optional Query Parameters
limit Number of objects to return. To return all objects, use 0. Default is 20.
offset The offset of the first record returned. Default is 0.
fields Comma delimited list of properties to be returned.
ids Comma delimited list of resource identifiers. Only the associated resources will be returned.

Example

The following request returns the id and name of all resources:

curl https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources?fields=id,name \
-X GET \
-u user@oberplan.com:mypassword

Sample Response:

{
   "data": [
      {
         "id": 7329,
         "name": "Conference Room 2A"
      },
      {
         "id": 7330,
         "name": "Conference Room 2B"
      },
      {
         "id": 7331,
         "name": "Conference Room 2C"
      },
      {
         "id": 7332,
         "name": "Conference Room 2D"
      },
      {
         "id": 7333,
         "name": "Meeting Room 1A"
      },
      {
         "id": 7334,
         "name": "Meeting Room 1B"
      },
      {
         "id": 7335,
         "name": "Meeting Room 3A"
      }
   ],
   "pagination": {
      "limit": 20,
      "links": {
         "first": "https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources?fields=id%2Cname&offset=0&limit=20",
         "last": "https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources?fields=id%2Cname&offset=0&limit=20"
      },
      "offset": 0,
      "page_count": 7,
      "total_count": 7
   },
   "success": true
}

Get a Resource

GET /schedules/scheduleId/resources/resourceId

Returns a specific resource.

Parameters

Name Description
scheduleId Schedule identifier.
resourceId Resource identifier.
Optional Query Parameters
fields Comma delimited list of properties to be returned.

Example

The following request returns a specific resource:

curl https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources/7334 \
-X GET \
-u user@oberplan.com:mypassword

Sample Response:

{
   "data": {
      "color_bk": "#008000",
      "color_fg": "#FFFFFF",
      "color_schedule": "#FFFFFF",
      "created_at": "2018-06-29T14:19:21Z",
      "custom_1": "",
      "custom_2": "",
      "description": "",
      "id": 7334,
      "link": "",
      "link_title": "",
      "name": "Meeting Room 1B",
      "note": "",
      "schedule_id": "akg5mf6beccwf9ce",
      "text_bold": false,
      "updated_at": "2018-06-29T14:53:46Z"
   },
   "success": true
}

Create a Resource

POST /schedules/scheduleId/resources

Creates a new resource.

If successful, the server returns the identifier of the new resource.

Parameters

Name Description
scheduleId Schedule identifier.

Example

The following request creates a new resource:

curl https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources \
-X POST \
-u user@oberplan.com:mypassword \
-d \
'
{
   "name": "Meeting Room 3D",
   "description": "Located on the third floor; Capacity: 30",
   "color_bk": "#008000",
   "color_fg": "#FFFFFF",
   "color_schedule": "#FFFFFF"
}
'

Sample Response:

{
   "data": [
      {
         "id": 7357
      }
   ],
   "success": true
}

Update Resources

PUT /schedules/scheduleId/resources

Updates all resources of a schedule.

The request body must contain only those properties that you want to edit.

Parameters

Name Description
scheduleId Schedule identifier.
Optional Query Parameters
ids Comma delimited list of resource identifiers. Only the associated resources will be updated.

Example

The following request uses a bold font for all resources:

curl https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources \
-X PUT \
-u user@oberplan.com:mypassword \
-d \
'
{
   "text_bold": true
}
'

Response:

{
   "success": true
}

Update a Resource

PUT /schedules/scheduleId/resources/resourceId

Updates a specific resource.

The request body may contain all object properties or only those properties that you want to edit.

Parameters

Name Description
scheduleId Schedule identifier.
resourceId Resource identifier.

Example

The following request changes the text of the first custom field:

curl https://api.oberplan.com/v1/schedules/akg5mf6beccwf9ce/resources/7334 \
-X PUT \
-u user@oberplan.com:mypassword \
-d \
'
{
   "custom_1": "Video conferencing system"
}
'

Response:

{
   "success": true
}

Delete Resources

DELETE /schedules/scheduleId/resources

Deletes all resources of a schedule.

You must use either the all (set to 1) or the ids query parameter to delete resources.

Parameters

Name Description
scheduleId Schedule identifier.
Query Parameters
all When set to 1, all resources will be deleted. Default is 0.
ids Comma delimited list of resource identifiers. Only the associated resources will be deleted.

Example

The following request deletes all resources:

curl https://api.oberplan.com/v1/schedules/oydpudpjnirmlbg1/resources?all=1 \
-X DELETE \
-u user@oberplan.com:mypassword

Response:

{
   "success": true
}

Delete a Resource

DELETE /schedules/scheduleId/resources/resourceId

Deletes a specific resource.

Parameters

Name Description
scheduleId Schedule identifier.
resourceId Resource identifier.

Example

The following request deletes a specific resource:

curl https://api.oberplan.com/v1/schedules/oydpudpjnirmlbg1/resources/7360 \
-X DELETE \
-u user@oberplan.com:mypassword

Response:

{
   "success": true
}