# Fetching a list of Workspace Resources

This endpoint returns structured Workspace Resource 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 workspace_resources top-level JSON key.
Please see our Response Format section for more information.

Endpoint: GET /workspace_resources
Version: 1.0.0

## Query parameters:

  - `by_custom_choice_value` (string)
    Filter by a custom field choice value, represented as a string with the custom field ID, followed by a
colon, and then comma-separated custom field choice value IDs. The custom field choice value can also be
the word blank. Multiple custom fields can be delimited by semicolons or by parentheses and colons.

The following formats are supported:

- custom_field_ID:choice_value_ID
- custom_field_ID:choice_value_1_ID,choice_value_2_ID
- custom_field_ID:blank
- (custom_field_1_ID:choice_value_1_ID,choice_value_2_ID):(custom_field_2_ID:choice_value_3_ID).

  - `by_custom_currency_value` (string)
    Filter by a custom field currency value, represented as a string with the custom field ID, followed by a
colon, and then the currency value. Optionally, the currency ISO code can be supplied as well, separated
from the currency value by another colon. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:200.2:USD):(2:100).

  - `by_custom_date_value` (string)
    Filter by a custom field date value, represented as a string with the custom field ID, followed by a
colon, the starting date, another colon, and then the ending date. You can provide both a starting date
and ending date, or provide just one. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:2014-12-05:2014-12-25):(2:2014-12-05).

  - `by_custom_number_value` (string)
    Filter by a custom field number value, represented as a string with the custom field ID, followed by a
colon, and then the number value. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:200):(2:101).

  - `by_custom_text_value` (string)
    Filter by a custom field text value, represented as a string with the custom field ID, followed by a
colon, and then the text value. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:something):(2:else).

  - `created_after` (string)
    Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

  - `created_before` (string)
    Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

  - `external_reference_external_message` (string)
    Filter the objects based on the external message of their associated external references. This is an exact match.

  - `external_reference_external_status` (string)
    Filter by the status of the external object in the external system.

  - `external_reference_service_model` (string)
    Filter by the type of the external object this external reference belongs to.

  - `external_reference_service_model_ref` (integer)
    Filter by the id of the external object this external reference belongs to.

  - `external_reference_service_model_refs` (string)
    Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

  - `external_reference_service_name` (string)
    Filter by the name of the provider for integration.

  - `external_reference_status` (string)
    Filter by the status of the integration, this can be successful or fail.

  - `has_external_references` (boolean)
    Filter by whether or not the object has external references.

  - `has_value_for_custom_field_ids` (string)
    Filter by the presence of a custom field value for the specified comma-separated custom field ID(s).

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- custom_field_values (CustomFieldValue) - Retrieves the custom field values for the resource. The response will include custom_field_value_ids, which references the data in the custom_field_values top-level key.
- external_references (ExternalReference) - Includes references to external integrations for this object.
- organization_membership (OrganizationMembership) - Retrieves the organization memberships for the resource. The response will include organization_membership_id, which references the data in the organization_memberships top-level key.
- participation (Participation) - Retrieves the participation associated with the resource. The response will include participation_id, which references the data in the participations top-level key.
- role (Role) - Retrieves the role for this resource. The response will include role_id, which references the data in the roles top-level key.
- user (User) - Retrieves the user associated with the resource. The response will include user_id, which references the data in the users top-level key. For unnamed resources, the user_id will be null.
- workspace (Workspace) - Retrieves the workspace (project) the resource is in. The response will include workspace_id, which references the data in the workspaces top-level key.

  - `include_unnamed` (boolean)
    Returns Unnamed Resources in addition to Named Resources.

  - `matching` (string)
    Show Resources associated with a User that matches the specified parameter or has a Role that matches the specified parameter.

  - `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.

  - `only_unnamed` (boolean)
    Returns only Unnamed Resources.

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.
    Enum: "resource_bill_rate", "resource_cost_rate"

  - `order` (string)
    Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: alphabetical, alphabetically:asc, alphabetically:desc, created_at:asc, created_at:desc, updated_at:asc, and updated_at:desc.

  - `page` (integer)

  - `per_page` (integer)

  - `potential_workspace_resource_for_story_with_unnamed_resources` (integer)
    Takes a Reference to a Story Id. Show only Resources that are available to assign for specified Story.

  - `potential_workspace_resources_for_reassignment` (integer)
    Takes an Assignment Id. Shows only Resources that can be reassigned to the specified assignment.

  - `potential_workspace_resources_for_story` (integer)
    Takes a Reference to a Story Id Show only Resources that have an user assigned, and are available to assign for specified Story.

  - `providers` (boolean)
    Show only Resources that have an user assigned, and are consultants in the workspace.

  - `providers_with_unnamed` (boolean)
    Show only Resources that have consultant users or no users at all.

  - `role_id` (integer)
    Returns workspace resources for a specified role in a workspace. Returns workspace resources for a specified role when only the role is provided.

  - `updated_after` (string)
    Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

  - `updated_before` (string)
    Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

  - `user_id` (integer)
    Returns workspace resources for a specified user in a workspace. Returns workspace resources for a specified user when only the user is provided.

  - `with_organizations` (boolean)
    Only includes Resources that have an organization (true) or only includes Resources that do not have an organization (false).

  - `without_external_reference_service_name` (string)
    Exclude by the existence of an external reference with the specified service name.

  - `workspace_id` (integer)
    Id for a specified workspace you wish to retrieve.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `workspace_resources` (object)

  - `external_references` (object)

  - `users` (object)

  - `roles` (object)

  - `organization_memberships` (object)

  - `participations` (object)

  - `workspaces` (object)

  - `custom_field_values` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


