Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Resource Requests

Resource Requests are used as a method for a requestor to ask an approver to staff a resource. Resource Requests are associated to a workspace resource and must have an approver associated.

Fetching a list of Resource Requests

Returns resource requests visible to the logged in user by default. When pending_requests_only filter is set to true, the endpoint returns only pending resource requests.

This endpoint returns structured Resource Requests objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the resource_requests top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • approvers (User) - The users available to approver or reject the resource request.
  • creator (User) - The person submitting the resource request.
  • resource (WorkspaceResource) - The resource the request is intending to assign a user to.
only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

page
integer <int32>
Default: 1
pending_requests_only
boolean

Returns only the pending resource requests.

per_page
integer <int32> <= 200
Default: 20
requests_for_approver
string

Returns only the requests where the specified user is the approver.

updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

Responses
200

A list of Resource Requests have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/resource_requests
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resource_requests": {
    },
  • "workspace_resources": {
    },
  • "users": {
    }
}

Creating a new Resource Requests

This endpoint returns structured Resource Requests objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the resource_requests top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • approvers (User) - The users available to approver or reject the resource request.
  • creator (User) - The person submitting the resource request.
  • resource (WorkspaceResource) - The resource the request is intending to assign a user to.
Request Body schema: application/json
required
object
resource_id
integer <int32>

The ID of the resource for which the resource request will be created.

resource_workspace_id
integer <int32>

A resource will be created for this project in addition to the resource request.

resource_role_id
integer <int32>

A resource will be created with this role in addition to the resource request.

approver_ids
required
Array of integers <int32>

The IDs of the people selected to approve this request.

workspace_allocation_start_date
string <date>

Set the allocation start date for a created workspace resource. The date must be in ISO 8601 format.

workspace_allocation_end_date
string <date>

Set the allocation start date for a created workspace resource. The date must be in ISO 8601 format.

workspace_allocation_percentage
integer <int32>

Set the allocation percentage for a created workspace resource.

Array of objects

Determines the custom field values for the workspace resource.

Responses
200

Resource Requests has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/resource_requests
Request samples
application/json
{
  • "resource_request": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resource_requests": {
    },
  • "workspace_resources": {
    },
  • "users": {
    }
}

Fetching a single Resource Requests

This endpoint returns structured Resource Requests objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the resource_requests top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • approvers (User) - The users available to approver or reject the resource request.
  • creator (User) - The person submitting the resource request.
  • resource (WorkspaceResource) - The resource the request is intending to assign a user to.
Responses
200

The Resource Requests has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/resource_requests/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resource_requests": {
    },
  • "workspace_resources": {
    },
  • "users": {
    }
}

Updating an existing Resource Requests

This endpoint returns structured Resource Requests objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the resource_requests top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • approvers (User) - The users available to approver or reject the resource request.
  • creator (User) - The person submitting the resource request.
  • resource (WorkspaceResource) - The resource the request is intending to assign a user to.
Request Body schema: application/json
required
object
request_resolution_status
required
string

The state for request resolution, one of approve, reject, or cancel.

user_id
integer <int32>

The ID of the user being named (staffed) on this unnamed resource.

allocations_state
boolean

Whether to set the allocations to hard or soft allocated when naming the resource. When nothing is passed in, the allocations are defaulted to hard allocated.

Responses
200

Resource Requests has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/resource_requests/{id}
Request samples
application/json
{
  • "resource_request": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resource_requests": {
    },
  • "workspace_resources": {
    },
  • "users": {
    }
}

Update Resource Request Approver

This endpoint returns structured Resource Requests objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the resource_requests top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • approvers (User) - The users available to approver or reject the resource request.
  • creator (User) - The person submitting the resource request.
  • resource (WorkspaceResource) - The resource the request is intending to assign a user to.
Request Body schema: application/json
required
object
new_approver_id
required
Array of integers <int32>

The ID of the user who is the new approver.

Responses
200

Resource Requests has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/resource_requests/{id}/update_approver
Request samples
application/json
{
  • "resource_request": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "resource_requests": {
    },
  • "workspace_resources": {
    },
  • "users": {
    }
}