Schemas

Get all schemas for a business unit

Schemas can be thought of as a blueprint. They define the fields that can be stored on a project and the sections that those fields belong to. When creating or updating projects, the schema is checked to ensure that all required fields are present, and that all fields have the correct data type.

For help with authorization, see https://developer.hcssapps.com/getting-started/request-tokens

Securitybearer
Request
path Parameters
businessUnitId
required
string or null
query Parameters
OrderBy.FieldId
string or null

The field id to order by

OrderBy.Ascending
boolean

Whether the data should be sorted in ascending or descending order

ContinuationToken
string or null

The value from the nextPageToken in a previous response. This should be URL encoded.

Top
integer <int32>

The number of items to include. Defaults to 100

Example: Top=100
Responses
get/api/v1/businessUnits/{businessUnitId}/Schemas
Request samples
Response samples
application/json
{
  • "results": [
    ],
  • "nextPageToken": null,
  • "hasNextPage": false
}

Get a schema for a business unit by id

See GET for more information.

For help with authorization, see https://developer.hcssapps.com/getting-started/request-tokens

Securitybearer
Request
path Parameters
id
required
string or null

The id of the schema to return

businessUnitId
required
string
Responses
get/api/v1/businessUnits/{businessUnitId}/Schemas/{id}
Request samples
Response samples
application/json
{
  • "id": "0c8b3865-23a8-4b74-8075-4cc95b7cea56",
  • "schemaName": "projects",
  • "lastModified": "2022-01-01T12:01:48.000Z",
  • "dateCreated": "2022-01-01T12:01:48.000Z",
  • "businessUnitId": "308e83a3-59bf-4422-9803-a98120b51770",
  • "fields": {
    },
  • "sections": {
    },
  • "orderedSections": [
    ],
  • "dataSyncPreference": "HeavyBid"
}

Update the alias of a field on the schema

This endpoint will change how a project field is referenced in the Projects API.

Caution: Updating the alias of an existing field will likely break existing integrations with the projects API.

For help with authorization, see https://developer.hcssapps.com/getting-started/request-tokens

Securitybearer
Request
path Parameters
businessUnitId
required
string
Request Body schema: application/json

The existing alias and new alias

existingFieldAlias
required
string
newFieldAlias
required
string
Responses
204

Empty response indicating that the field alias was successfully updated

post/api/v1/businessUnits/{businessUnitId}/Schemas/updateFieldAlias
Request samples
application/json
{
  • "existingFieldAlias": "string",
  • "newFieldAlias": "string"
}