Authentication

Authentication API

Authentication API will perform basic authentication into Smartvid.io and return API token that will be used for subsequent API calls. The value of 'token' in the response will have to be supplied in 'X-Auth-Token' HTTP header with every API. Token needs to be refreshed once expired.

'expires' will specify token expiration time measured in milliseconds from midnight, January 1, 1970 UTC.

request
POST /api/v1/authenticate HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 59

{
  "username" : "vgorsky@smartvid.io",
  "password" : ""
}
Table 1. request body
Path Type Description

username

String

User name

password

String

Password

Table 2. response fields description
Path Type Description

token

String

Token to be used in 'X-Auth-Token' HTTP header

expires

Number

Expiration time

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 113

{
  "token" : "vgorsky@smartvid.io:1592929100755:85f43abe75710cce8243bfe6d9388743",
  "expires" : 1592929100755
}

Observations

Observations retrieve API

Observations retrieve API can be used to retrieve observations with their related data, such as trade partners, assignees, etc, from the system for a set of project(s). Observations retrieve API supports incremental date-based retrieval and pagination.

If custom configuration is enabled for the organization, custom field values will be returned as part of each observation.

request
GET /api/v1/organization/e2020c10-8fd8-4288-87fc-d6e83c19585e/observation?projectId=65fc3c61-e8a9-495f-9805-a88e634bd276&projectId=d45818c6-a1ca-4998-842c-7242295f75ab&updatedAt=2018-01-01T00%3A00%3A00.000%2B02%3A00&useExternalId=false&page=0&perPage=1000 HTTP/1.1
Host: api-public.smartvid.io
Table 3. /api/v1/organization/{organizationId}/observation
Parameter Description

organizationId

Internal ID of the organization

Table 4. request parameters
Parameter Description

projectId

Set of project id(s) to get observation data for

useExternalId

When set to true, projectId is the ID of the project in the external system

page

Page

perPage

Number of observations per page. This value cannot be greater than 1,000

updatedAt

Return observation(s) created or updated after a specific date. Date format is in ISO 8601

Table 5. response fields description
Path Type Description

observations[].observation.status

String

Status of the observation. Can have one of the following values NEW,IN_PROGRESS,WITH_PARTNER,DELAYED,CLOSED,READY_TO_REVIEW,CLOSED_REVIEWED,OBSERVED,NOT_APPLICABLE

observations[].observation.type

String

Type of the observation. Can have one of the following values POSITIVE,NEGATIVE

observations[].observation.observationId

String

Internal ID of the observation

observations[].observation.projectId

String

Internal ID of the project

observations[].observation.identificationMethod

String

Method of identification

observations[].observation.notes

String

Observation notes

observations[].observation.actionTaken

String

Action taken

observations[].observation.recommendedAction

String

Recommended action

observations[].observation.reviewComment

String

Review comment

observations[].observation.userFriendlyId

String

User-friendly observation ID in format - SO-id

observations[].observation.externalId

Number

External ID provided for observation, for informational purpose only, not used for observation lookup

observations[].observation.externalObservationId

String

External ID provided for observation, used for observation lookup

observations[].observation.severity

String

Observation severity. Can have one of the following values NA,LOW,MEDIUM,HIGH,CRITICAL,LOSS_OF_LIFE

observations[].observation.frequency

String

Observation frequency. Can have one of the following values NA,UNLIKELY,ANNUALLY,MONTHLY,WEEKLY,DAILY

observations[].observation.risk

Number

Calculated risk of the observation

observations[].observation.createdDate

String

Creation date of the observation. Date format is in ISO 8601

observations[].observation.updatedDate

String

Update date of the observation. Date format is in ISO 8601

observations[].observation.isGreatCatch

Boolean

Is this observation a great catch

observations[].observation.hazardCategory

String

Hazard category

observations[].observation.dueDate

String

Due date for the observation. Date format is in ISO 8601

observations[].observation.closedDate

String

The date the observation was closed. Date format is in ISO 8601

observations[].observation.reviewedDate

String

The date the observation was last reviewed. Date format is in ISO 8601

observations[].tradePartner.id

String

Internal ID of the trade partner

observations[].tradePartner.externalTradePartnerId

String

External ID of the trade partner

observations[].tradePartner.organizationId

String

Internal ID of the organization this trade partner belongs to

observations[].tradePartner.name

String

Name of the trade partner

observations[].tradePartner.email

String

Email of the trade partner

observations[].tradePartner.trade

String

Trade

observations[].tradePartner.isActive

Boolean

The indicator if the given trade partner is active or not

observations[].assignee.id

String

Internal ID of the assignee user

observations[].assignee.firstName

String

First name of the assignee user

observations[].assignee.lastName

String

Last name of the assignee user

observations[].assignee.email

String

Email of the assignee user

observations[].assignee.externalUserId

String

An external assignee user ID

observations[].assignee.isActive

Boolean

The indicator if the given user is active

observations[].assignee.isInvited

Boolean

The indicator if the given user is invited

observations[].assignee.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].createdByUser.id

String

Internal ID of the observation creator user

observations[].createdByUser.firstName

String

First name of the observation creator user

observations[].createdByUser.lastName

String

Last name of the observation creator user

observations[].createdByUser.email

String

Email of the observation creator user

observations[].createdByUser.externalUserId

String

An external observation creator user ID

observations[].createdByUser.isActive

Boolean

The indicator if the given user is active

observations[].createdByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].createdByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].updatedByUser.id

String

Internal ID of the user who last updated the observation

observations[].updatedByUser.firstName

String

First name of user who last updated the observation

observations[].updatedByUser.lastName

String

Last name of user who last updated the observation

observations[].updatedByUser.email

String

Email of the user who last updated the observation

observations[].updatedByUser.externalUserId

String

An external ID of the user who last updated the observation

observations[].updatedByUser.isActive

Boolean

The indicator if the given user is active

observations[].updatedByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].updatedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].closedByUser.id

String

Internal ID of the user who closed the observation

observations[].closedByUser.firstName

String

First name of user who closed the observation

observations[].closedByUser.lastName

String

Last name of user who closed the observation

observations[].closedByUser.email

String

Email of the user who closed the observation

observations[].closedByUser.externalUserId

String

An external ID of the user who closed the observation

observations[].closedByUser.isActive

Boolean

The indicator if the given user is active

observations[].closedByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].closedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].reviewedByUser.id

String

Internal ID of the user who last reviewed the observation

observations[].reviewedByUser.firstName

String

First name of user who last reviewed the observation

observations[].reviewedByUser.lastName

String

Last name of user who last reviewed the observation

observations[].reviewedByUser.email

String

Email of the user who last reviewed the observation

observations[].reviewedByUser.externalUserId

String

An external ID of the user who last reviewed the observation

observations[].reviewedByUser.isActive

Boolean

The indicator if the given user is active

observations[].reviewedByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].reviewedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].project.id

String

The internal ID of the project

observations[].project.externalProjectId

String

The ID of the project in the external system

observations[].project.projectNumber

String

The human readable project identifier

observations[].project.projectGroupId

String

The internal ID of the project group for this project

observations[].project.inactive

Boolean

Whether project is inactive or active

observations[].project.organizationId

String

The internal ID of the organization this project belongs to

observations[].project.name

String

The name of the project

observations[].project.description

String

The description of the project

observations[].project.location

String

The location of the project

observations[].projectGroup.id

String

Internal ID of the project group (region/business unit)

observations[].projectGroup.organizationId

String

Internal ID of the organization this project group belongs to

observations[].projectGroup.name

String

Name of the project group

observations[].projectGroup.description

String

Description of the project group

observations[].organization.id

String

Internal ID of the organization

observations[].organization.name

String

Name of the organization

observations[].organization.description

String

Description of the organization

observations[].observation.customFields[]

Array

Custom fields for a given observation, when custom fields are configured for the organization

observations[].observation.customFields[].id

String

Id of the custom field value

observations[].observation.customFields[].identifier

String

Identifier of the custom field value

observations[].observation.customFields[].dataType

String

Data type of the custom field value

observations[].observation.customFields[].valueLong

Number

Value of the custom field, when its data type is LONG

observations[].observation.customFields[].valueReal

Number

Value of the custom field, when its data type is REAL

observations[].observation.customFields[].valueBoolean

Boolean

Value of the custom field, when its data type is BOOLEAN

observations[].observation.customFields[].valueDate

String

Value of the custom field, when its data type is DATE. Date format is in ISO 8601

observations[].observation.customFields[].valueString

String

Value of the custom field, when its data type is STRING

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 8978

{
  "observations" : [ {
    "observation" : {
      "observationId" : "9f8a9b8d-fb68-4f69-8b89-6fb390fa3d54",
      "projectId" : "65fc3c61-e8a9-495f-9805-a88e634bd276",
      "status" : "CLOSED",
      "hazardCategory" : "Sample hazard category #2",
      "identificationMethod" : "Sample identification method #2",
      "notes" : "Sample observation note #2",
      "severity" : "CRITICAL",
      "frequency" : "ANNUALLY",
      "risk" : 25.0,
      "recommendedAction" : "Sample recommended action",
      "reviewComment" : "Test review comment",
      "dueDate" : "2020-06-23T14:18:21.508+0000",
      "createdDate" : "2020-06-23T14:18:21.528+0000",
      "updatedDate" : "2020-06-23T14:18:21.528+0000",
      "closedDate" : "2020-06-23T14:18:21.508+0000",
      "reviewedDate" : "2020-06-23T14:18:21.508+0000",
      "type" : "NEGATIVE",
      "isGreatCatch" : true,
      "actionTaken" : "Test action taken",
      "externalId" : 2,
      "userFriendlyId" : "SO-2",
      "externalObservationId" : "XYZ456",
      "customFields" : [ {
        "id" : "bb4dd39b-e14e-4cef-9b7c-e4eb4144824e",
        "identifier" : "booleanField",
        "dataType" : "BOOLEAN",
        "valueBoolean" : true
      }, {
        "id" : "b29af627-3333-4cb9-823b-69b0a61c55f4",
        "identifier" : "dateField",
        "dataType" : "DATE"
      }, {
        "id" : "8d1ba1f8-a1b5-4144-8919-0af9904657cc",
        "identifier" : "realField",
        "dataType" : "REAL",
        "valueReal" : 1.9900000095367432
      }, {
        "id" : "3cd17335-872d-49fe-bd05-1df88843b9f5",
        "identifier" : "longField",
        "dataType" : "LONG",
        "valueLong" : 999999
      } ]
    },
    "tradePartner" : {
      "id" : "4dc18151-5432-4045-97a5-419e646e5d2f",
      "organizationId" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "externalTradePartnerId" : "External ID",
      "name" : "Sample Trade Partner",
      "trade" : "Painting",
      "isActive" : true,
      "email" : "37ba54a3-7957-452f-ab7d-15f4cf77f7f3_tp1@examples.com"
    },
    "assignee" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "createdByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "updatedByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "closedByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "reviewedByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "project" : {
      "id" : "65fc3c61-e8a9-495f-9805-a88e634bd276",
      "externalProjectId" : "6c736527-5787-47db-9ee4-43ca762c97bb",
      "organizationId" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "name" : "Project with observations",
      "location" : "Sample location",
      "projectGroupId" : "b3d6eb5d-e807-4125-b848-0abdf85b5579",
      "inactive" : false
    },
    "projectGroup" : {
      "id" : "b3d6eb5d-e807-4125-b848-0abdf85b5579",
      "organizationId" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "name" : "Northeast",
      "description" : "Northeast division"
    },
    "organization" : {
      "id" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "name" : "Sample General Contractor Organization",
      "description" : "Sample description"
    }
  }, {
    "observation" : {
      "observationId" : "c2c8d554-da72-467c-8087-d137d6104217",
      "projectId" : "65fc3c61-e8a9-495f-9805-a88e634bd276",
      "status" : "NEW",
      "hazardCategory" : "Sample hazard category",
      "identificationMethod" : "Sample identification method",
      "notes" : "Sample observation note",
      "severity" : "CRITICAL",
      "frequency" : "DAILY",
      "risk" : 25.0,
      "recommendedAction" : "Sample recommended action",
      "reviewComment" : "Test review comment",
      "dueDate" : "2020-06-23T14:18:21.051+0000",
      "createdDate" : "2020-06-23T14:18:21.091+0000",
      "updatedDate" : "2020-06-23T14:18:21.091+0000",
      "closedDate" : "2020-06-23T14:18:21.051+0000",
      "reviewedDate" : "2020-06-23T14:18:21.051+0000",
      "type" : "NEGATIVE",
      "isGreatCatch" : true,
      "actionTaken" : "Test action taken",
      "externalId" : 1,
      "userFriendlyId" : "SO-1",
      "externalObservationId" : "ABC123",
      "customFields" : [ {
        "id" : "93f1528a-6d8a-4685-9ae0-614384d02616",
        "identifier" : "booleanField",
        "dataType" : "BOOLEAN",
        "valueBoolean" : true
      }, {
        "id" : "689d0f9b-78e1-4368-9dcb-91ddc3be7b0b",
        "identifier" : "dateField",
        "dataType" : "DATE"
      }, {
        "id" : "634a6a03-0a6d-49a2-b891-1afb61b7ac4a",
        "identifier" : "realField",
        "dataType" : "REAL",
        "valueReal" : 1.9900000095367432
      }, {
        "id" : "8b0d1fbc-0c48-4115-b2fe-38a5dad963f8",
        "identifier" : "longField",
        "dataType" : "LONG",
        "valueLong" : 999999
      } ]
    },
    "tradePartner" : {
      "id" : "4dc18151-5432-4045-97a5-419e646e5d2f",
      "organizationId" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "externalTradePartnerId" : "External ID",
      "name" : "Sample Trade Partner",
      "trade" : "Painting",
      "isActive" : true,
      "email" : "37ba54a3-7957-452f-ab7d-15f4cf77f7f3_tp1@examples.com"
    },
    "assignee" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "createdByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "updatedByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "closedByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "reviewedByUser" : {
      "id" : "6b63ef30-1991-4c94-b991-c99ca26c3b51",
      "firstName" : "First Name",
      "lastName" : "Last Name",
      "email" : "5cb7c4b3-3f85-4ab7-b776-382260007133_test@examples.com",
      "externalUserId" : "EXT_UID_1",
      "isActive" : false,
      "isInvited" : false,
      "isSso" : false
    },
    "project" : {
      "id" : "65fc3c61-e8a9-495f-9805-a88e634bd276",
      "externalProjectId" : "6c736527-5787-47db-9ee4-43ca762c97bb",
      "organizationId" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "name" : "Project with observations",
      "location" : "Sample location",
      "projectGroupId" : "b3d6eb5d-e807-4125-b848-0abdf85b5579",
      "inactive" : false
    },
    "projectGroup" : {
      "id" : "b3d6eb5d-e807-4125-b848-0abdf85b5579",
      "organizationId" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "name" : "Northeast",
      "description" : "Northeast division"
    },
    "organization" : {
      "id" : "e2020c10-8fd8-4288-87fc-d6e83c19585e",
      "name" : "Sample General Contractor Organization",
      "description" : "Sample description"
    }
  } ]
}

Get Observation API

Get Observation API can be used to retrieve an observation with it’s related data, such as trade partners, assignees, etc, from the system.

If custom configuration is enabled for the organization, custom field values will be returned as part of the observation.

request
GET /api/v1/organization/ef987a5d-b09a-43f6-ab36-1665909b0ad6/project/ds5987dfasd659sd7/observation/AF1256FADMQ3F?useExternalId=true HTTP/1.1
Host: public-api.smartvid.io
Table 6. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/observation/{observationOrExternalObservationId}
Parameter Description

organizationId

Internal ID of the organization

projectOrExternalProjectId

ID of project

observationOrExternalObservationId

ID of observation

Table 7. request parameters
Parameter Description

useExternalId

When set to true, projectId and observationId will expect external IDs

Table 8. response fields description
Path Type Description

observationId

String

Internal ID of the observation

projectId

String

Internal ID of the project

status

String

Status of the observation. Can have one of the following values NEW,IN_PROGRESS,WITH_PARTNER,DELAYED,CLOSED,READY_TO_REVIEW,CLOSED_REVIEWED,OBSERVED,NOT_APPLICABLE

hazardCategory

String

Hazard category

identificationMethod

String

Method of identification

notes

String

Observation notes

severity

String

Observation severity. Can have one of the following values NA,LOW,MEDIUM,HIGH,CRITICAL,LOSS_OF_LIFE

frequency

String

Observation frequency. Can have one of the following values NA,UNLIKELY,ANNUALLY,MONTHLY,WEEKLY,DAILY

risk

Number

Calculated risk of the observation

recommendedAction

String

Recommended action

reviewComment

String

Review comment for observation

userFriendlyId

String

User-friendly observation ID in format - SO-id

externalId

Number

External ID provided for observation, for informational purpose only, not used for observation lookup

externalObservationId

String

External observation ID provided for observation, used for observation lookup

dueDate

String

Due date for the observation. Date format is in ISO 8601

createdDate

String

Creation date of the observation. Date format is in ISO 8601

updatedDate

String

Update date of the observation. Date format is in ISO 8601

closedDate

String

Closed date of the observation. Date format is in ISO 8601

reviewedDate

String

Reviewed date of the observation. Date format is in ISO 8601

type

String

Type of the observation. Can have one of the following values POSITIVE,NEGATIVE

isGreatCatch

Boolean

Is this observation a great catch

actionTaken

String

Action taken

createdByUser

Object

User who created observation

createdByUser.id

String

Internal ID of user

createdByUser.firstName

String

First name of user

createdByUser.lastName

String

Last name of user

createdByUser.email

String

Email of user

createdByUser.isActive

Boolean

The indicator if the given user is active

createdByUser.isInvited

Boolean

The indicator if the given user is invited

createdByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

assignedToUser

Object

User who was assigned observation

assignedToUser.id

String

Internal ID of user

assignedToUser.firstName

String

First name of user

assignedToUser.lastName

String

Last name of user

assignedToUser.email

String

Email of user

assignedToUser.isActive

Boolean

The indicator if the given user is active

assignedToUser.isInvited

Boolean

The indicator if the given user is invited

assignedToUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

closedByUser

Object

User who closed observation

closedByUser.id

String

Internal ID of user

closedByUser.firstName

String

First name of user

closedByUser.lastName

String

Last name of user

closedByUser.email

String

Email of user

closedByUser.isActive

Boolean

The indicator if the given user is active

closedByUser.isInvited

Boolean

The indicator if the given user is invited

closedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

updatedByUser

Object

User who last updated observation

updatedByUser.id

String

Internal ID of user

updatedByUser.firstName

String

First name of user

updatedByUser.lastName

String

Last name of user

updatedByUser.email

String

Email of user

updatedByUser.isActive

Boolean

The indicator if the given user is active

updatedByUser.isInvited

Boolean

The indicator if the given user is invited

updatedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

reviewedByUser

Object

User who reviewed observation

reviewedByUser.id

String

Internal ID of user

reviewedByUser.firstName

String

First name of user

reviewedByUser.lastName

String

Last name of user

reviewedByUser.email

String

Email of user

reviewedByUser.isActive

Boolean

The indicator if the given user is active

reviewedByUser.isInvited

Boolean

The indicator if the given user is invited

reviewedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

tradePartnerId

String

ID of Trade Partner associated with observation

customFields[]

Array

Custom fields for a given observation, when custom fields are configured for the organization

customFields[].id

String

Id of the custom field value

customFields[].identifier

String

Identifier of the custom field value

customFields[].dataType

String

Data type of the custom field value

customFields[].valueLong

Number

Value of the custom field, when its data type is LONG

customFields[].valueReal

Number

Value of the custom field, when its data type is REAL

customFields[].valueBoolean

Boolean

Value of the custom field, when its data type is BOOLEAN

customFields[].valueDate

String

Value of the custom field, when its data type is DATE. Date format is in ISO 8601

customFields[].valueString

String

Value of the custom field, when its data type is STRING

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2546

{
  "observationId" : "9629e053-e2ad-4ee2-82fa-42a5f84cc35c",
  "projectId" : "22c84107-700c-444b-a489-4abf12f31be4",
  "status" : "NEW",
  "hazardCategory" : "Sample hazard category",
  "identificationMethod" : "Sample identification method",
  "notes" : "Sample observation note",
  "severity" : "CRITICAL",
  "frequency" : "DAILY",
  "risk" : 25.0,
  "recommendedAction" : "Sample recommended action",
  "reviewComment" : "Sample review comment",
  "dueDate" : "2020-06-23T14:18:03.187+0000",
  "createdDate" : "2020-06-23T14:18:03.226+0000",
  "updatedDate" : "2020-06-23T14:18:03.226+0000",
  "closedDate" : "2020-06-23T14:18:03.187+0000",
  "reviewedDate" : "2020-06-23T14:18:03.187+0000",
  "type" : "NEGATIVE",
  "isGreatCatch" : true,
  "actionTaken" : "Test action taken",
  "externalId" : 1,
  "userFriendlyId" : "SO-1",
  "externalObservationId" : "AF1256FADMQ3F",
  "customFields" : [ {
    "id" : "94d87cbd-67c5-489e-add1-be0d7a2af508",
    "identifier" : "longField",
    "dataType" : "LONG",
    "valueLong" : 999999
  }, {
    "id" : "68d3c1d7-4508-40bd-829a-0e871745453b",
    "identifier" : "realField",
    "dataType" : "REAL",
    "valueReal" : 1.99
  }, {
    "id" : "ba8f8466-ce20-4b51-8f19-f58b3a8635dd",
    "identifier" : "dateField",
    "dataType" : "DATE",
    "valueDate" : "2020-06-23T14:18:03.188+0000"
  }, {
    "id" : "586382a5-68c9-4adb-aa7e-18d0ce4279ab",
    "identifier" : "booleanField",
    "dataType" : "BOOLEAN",
    "valueBoolean" : true
  } ],
  "createdByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "assignedToUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "updatedByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "closedByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "reviewedByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "tradePartnerId" : "b2dc3211-4bff-4783-a531-d8e5979369f2"
}

Create Observations API

Create Observations API can be used to import a list of observations into the system. Create Observations API accepts file names and URLs for downloading and associating images with observations

request
POST /api/v1/organization/28f39d85-0063-41bd-a31f-f896d6bad2a5/project/ds5987dfasd659sd7/observation?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 1614

{
  "observations" : [ {
    "tradePartnerId" : "fhsdfh87s5sdf7a8eh",
    "assignedUserId" : "1",
    "assignedUserEmail" : "admin@smartvid.io",
    "status" : "NEW",
    "closedByUserId" : "1",
    "reviewedByUserId" : "1",
    "hazardCategory" : "Sample hazard category",
    "identificationMethod" : "Sample identification method",
    "notes" : "Sample observation notes",
    "severity" : "MEDIUM",
    "frequency" : "MONTHLY",
    "risk" : 25.0,
    "recommendedAction" : "Sample recommended action",
    "dueDate" : "2020-06-23T14:18:04.340Z",
    "closedDate" : "2020-06-23T14:18:04.340Z",
    "reviewedDate" : "2020-06-23T14:18:04.340Z",
    "type" : "NEGATIVE",
    "isGreatCatch" : false,
    "actionTaken" : "Sample action taken",
    "externalId" : 4810492,
    "externalObservationId" : "578sf6578s6fdq2",
    "reviewComment" : "Sample review comment",
    "customFields" : [ {
      "identifier" : "testCustomField",
      "dataType" : "STRING",
      "valueString" : "test value"
    } ],
    "projectId" : "ds5987dfasd659sd7",
    "createdTime" : "2020-06-23T14:18:04.340Z",
    "createdByUserId" : "1",
    "updatedTime" : "2020-06-23T14:18:04.340Z",
    "updatedByUserId" : "1"
  }, {
    "status" : "NEW",
    "notes" : "Sample observation notes",
    "severity" : "MEDIUM",
    "frequency" : "MONTHLY",
    "risk" : 25.0,
    "type" : "NEGATIVE",
    "externalId" : 0,
    "customFields" : [ ],
    "projectId" : "ds5987dfasd659sd7",
    "filesToDownload" : [ {
      "url" : "https://test-data.s3-us-west-2.amazonaws.com/Images/example.jpeg",
      "fileName" : "example.jpeg"
    } ]
  } ]
}
Table 9. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/observation
Parameter Description

organizationId

Internal ID of the organization

projectOrExternalProjectId

ID of project

Table 10. request parameters
Parameter Description

useExternalId

When set to true, projectId, observationId, and tradePartnerId will expect external IDs

Table 11. request body
Path Type Description

observations[].projectId

String

Internal ID of the project

observations[].status

String

Status of the observation. Can have one of the following values NEW,IN_PROGRESS,WITH_PARTNER,DELAYED,CLOSED,READY_TO_REVIEW,CLOSED_REVIEWED,OBSERVED,NOT_APPLICABLE

observations[].hazardCategory

String

Hazard category

observations[].identificationMethod

String

Method of identification

observations[].notes

String

Observation notes

observations[].severity

String

Observation severity. Can have one of the following values NA,LOW,MEDIUM,HIGH,CRITICAL,LOSS_OF_LIFE

observations[].frequency

String

Observation frequency. Can have one of the following values NA,UNLIKELY,ANNUALLY,MONTHLY,WEEKLY,DAILY

observations[].risk

Number

Calculated risk of the observation

observations[].recommendedAction

String

Recommended action

observations[].reviewComment

String

Review comment for observation

observations[].dueDate

String

Due date for the observation. Date format is in ISO 8601

observations[].closedDate

String

Closed date for the observation. Date format is in ISO 8601

observations[].reviewedDate

String

Reviewed date for the observation. Date format is in ISO 8601

observations[].type

String

Type of the observation. Can have one of the following values POSITIVE,NEGATIVE

observations[].isGreatCatch

Boolean

Is this observation a great catch

observations[].actionTaken

String

Action taken

observations[].assignedUserId

String

ID of user who was assigned observation

observations[].assignedUserEmail

String

Email of user who was assigned observation

observations[].createdByUserId

String

ID of user who created an observation

observations[].createdTime

String

Created time for the observation. Date format is in ISO 8601

observations[].updatedByUserId

String

ID of user who updated the observation

observations[].updatedTime

String

Updated time for the observation. Date format is in ISO 8601

observations[].closedByUserId

String

ID of user who closed observation

observations[].reviewedByUserId

String

ID of user who reviewed observation

observations[].tradePartnerId

String

ID of Trade Partner associated with observation

observations[].externalId

Number

External ID provided for observation, for informational purpose only, not used for observation lookup

observations[].externalObservationId

String

External observation ID provided for observation, used for observation lookup

observations[].filesToDownload[].url

String

URL of file to download

observations[].filesToDownload[].fileName

String

Name of file to download

observations[].customFields[]

Array

Custom fields for a given observation, when custom fields are configured for the organization

observations[].customFields[].id

String

Id of the custom field value

observations[].customFields[].identifier

String

Identifier of the custom field value

observations[].customFields[].dataType

String

Data type of the custom field value

observations[].customFields[].valueLong

Number

Value of the custom field, when its data type is LONG

observations[].customFields[].valueReal

Number

Value of the custom field, when its data type is REAL

observations[].customFields[].valueBoolean

Boolean

Value of the custom field, when its data type is BOOLEAN

observations[].customFields[].valueDate

String

Value of the custom field, when its data type is DATE. Date format is in ISO 8601

observations[].customFields[].valueString

String

Value of the custom field, when its data type is STRING

Table 12. response fields description
Path Type Description

observations[].observationId

String

Internal ID of the observation

observations[].projectId

String

Internal ID of the project

observations[].status

String

Status of the observation. Can have one of the following values NEW,IN_PROGRESS,WITH_PARTNER,DELAYED,CLOSED,READY_TO_REVIEW,CLOSED_REVIEWED,OBSERVED,NOT_APPLICABLE

observations[].hazardCategory

String

Hazard category

observations[].identificationMethod

String

Method of identification

observations[].notes

String

Observation notes

observations[].severity

String

Observation severity. Can have one of the following values NA,LOW,MEDIUM,HIGH,CRITICAL,LOSS_OF_LIFE

observations[].frequency

String

Observation frequency. Can have one of the following values NA,UNLIKELY,ANNUALLY,MONTHLY,WEEKLY,DAILY

observations[].risk

Number

Calculated risk of the observation

observations[].recommendedAction

String

Recommended action

observations[].reviewComment

String

Review comment for observation

observations[].userFriendlyId

String

User-friendly observation ID in format - SO-id

observations[].externalId

Number

External ID provided for observation, for informational purpose only, not used for observation lookup

observations[].externalObservationId

String

External observation ID provided for observation, used for observation lookup

observations[].dueDate

String

Due date for the observation. Date format is in ISO 8601

observations[].createdDate

String

Creation date of the observation. Date format is in ISO 8601

observations[].updatedDate

String

Update date of the observation. Date format is in ISO 8601

observations[].closedDate

String

Closed date of the observation. Date format is in ISO 8601

observations[].reviewedDate

String

Reviewed date of the observation. Date format is in ISO 8601

observations[].type

String

Type of the observation. Can have one of the following values POSITIVE,NEGATIVE

observations[].isGreatCatch

Boolean

Is this observation a great catch

observations[].actionTaken

String

Action taken

observations[].createdByUser

Object

User who created observation

observations[].createdByUser.id

String

Internal ID of user

observations[].createdByUser.firstName

String

First name of user

observations[].createdByUser.lastName

String

Last name of user

observations[].createdByUser.email

String

Email of user

observations[].createdByUser.isActive

Boolean

The indicator if the given user is active

observations[].createdByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].createdByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].assignedToUser

Object

User who was assigned observation

observations[].assignedToUser.id

String

Internal ID of user

observations[].assignedToUser.firstName

String

First name of user

observations[].assignedToUser.lastName

String

Last name of user

observations[].assignedToUser.email

String

Email of user

observations[].assignedToUser.isActive

Boolean

The indicator if the given user is active

observations[].assignedToUser.isInvited

Boolean

The indicator if the given user is invited

observations[].assignedToUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].closedByUser

Object

User who closed observation

observations[].closedByUser.id

String

Internal ID of user

observations[].closedByUser.firstName

String

First name of user

observations[].closedByUser.lastName

String

Last name of user

observations[].closedByUser.email

String

Email of user

observations[].closedByUser.isActive

Boolean

The indicator if the given user is active

observations[].closedByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].closedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].updatedByUser

Object

User who last updated observation

observations[].updatedByUser.id

String

Internal ID of user

observations[].updatedByUser.firstName

String

First name of user

observations[].updatedByUser.lastName

String

Last name of user

observations[].updatedByUser.email

String

Email of user

observations[].updatedByUser.isActive

Boolean

The indicator if the given user is active

observations[].updatedByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].updatedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].reviewedByUser

Object

User who reviewed observation

observations[].reviewedByUser.id

String

Internal ID of user

observations[].reviewedByUser.firstName

String

First name of user

observations[].reviewedByUser.lastName

String

Last name of user

observations[].reviewedByUser.email

String

Email of user

observations[].reviewedByUser.isActive

Boolean

The indicator if the given user is active

observations[].reviewedByUser.isInvited

Boolean

The indicator if the given user is invited

observations[].reviewedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

observations[].tradePartnerId

String

ID of Trade Partner associated with observation

observations[].customFields[]

Array

Custom fields for a given observation, when custom fields are configured for the organization

observations[].customFields[].id

String

Id of the custom field value

observations[].customFields[].identifier

String

Identifier of the custom field value

observations[].customFields[].dataType

String

Data type of the custom field value

observations[].customFields[].valueLong

Number

Value of the custom field, when its data type is LONG

observations[].customFields[].valueReal

Number

Value of the custom field, when its data type is REAL

observations[].customFields[].valueBoolean

Boolean

Value of the custom field, when its data type is BOOLEAN

observations[].customFields[].valueDate

String

Value of the custom field, when its data type is DATE. Date format is in ISO 8601

observations[].customFields[].valueString

String

Value of the custom field, when its data type is STRING

sample response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 3241

{
  "observations" : [ {
    "observationId" : "a7773876-46a7-4de6-a117-629fbc39e6ad",
    "projectId" : "92003ac6-4b01-4124-8c47-ee8be66bea6e",
    "status" : "NEW",
    "hazardCategory" : "Sample hazard category",
    "identificationMethod" : "Sample identification method",
    "notes" : "Sample observation notes",
    "severity" : "MEDIUM",
    "frequency" : "MONTHLY",
    "risk" : 6.0,
    "recommendedAction" : "Sample recommended action",
    "reviewComment" : "Sample review comment",
    "dueDate" : "2020-06-23T14:18:04.340+0000",
    "createdDate" : "2020-06-23T14:18:04.340+0000",
    "updatedDate" : "2020-06-23T14:18:04.340+0000",
    "closedDate" : "2020-06-23T14:18:04.340+0000",
    "reviewedDate" : "2020-06-23T14:18:04.340+0000",
    "type" : "NEGATIVE",
    "isGreatCatch" : false,
    "actionTaken" : "Sample action taken",
    "externalId" : 4810492,
    "userFriendlyId" : "SO-4810492",
    "externalObservationId" : "578sf6578s6fdq2",
    "customFields" : [ {
      "id" : "77388abf-b86e-4977-a64c-612010280ff4",
      "identifier" : "testCustomField",
      "dataType" : "STRING",
      "valueString" : "test value"
    } ],
    "createdByUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    },
    "assignedToUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    },
    "updatedByUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    },
    "closedByUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    },
    "reviewedByUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    },
    "tradePartnerId" : "19d73eee-14aa-4806-aa02-a419d4806172"
  }, {
    "observationId" : "ea2b8cb2-2bf9-4746-817f-2b02b9ff05ed",
    "projectId" : "92003ac6-4b01-4124-8c47-ee8be66bea6e",
    "status" : "NEW",
    "notes" : "Sample observation notes",
    "severity" : "MEDIUM",
    "frequency" : "MONTHLY",
    "risk" : 6.0,
    "createdDate" : "2020-06-23T14:18:04.586+0000",
    "updatedDate" : "2020-06-23T14:18:04.586+0000",
    "type" : "NEGATIVE",
    "isGreatCatch" : false,
    "externalId" : 2,
    "userFriendlyId" : "SO-2",
    "customFields" : [ ],
    "createdByUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    },
    "updatedByUser" : {
      "id" : "1",
      "firstName" : "Admin",
      "lastName" : "Admin",
      "email" : "admin@smartvid.io",
      "isActive" : true,
      "isInvited" : false,
      "isSso" : false
    }
  } ]
}

Update Observation API

Update Observation API can be used to update an observations in the system. Update Observation API requires the full observation object be sent with desired fields updated. For existing observation the following fields cannot be updated: id, projectId and externalObservationId.

request
PUT /api/v1/organization/1596a487-cc18-452c-9a0e-be6d8d00e253/project/ds5987dfasd659sd7/observation/AF1256FADMQ3F?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 887

{
  "tradePartnerId" : "fhsdfh87s5sdf7a8eh",
  "assignedUserId" : "1",
  "assignedUserEmail" : "admin@smartvid.io",
  "status" : "CLOSED_REVIEWED",
  "closedByUserId" : "1",
  "reviewedByUserId" : "1",
  "hazardCategory" : "Sample hazard category",
  "identificationMethod" : "Sample identification method",
  "notes" : "Sample observation notes",
  "severity" : "MEDIUM",
  "frequency" : "MONTHLY",
  "risk" : 25.0,
  "recommendedAction" : "Sample recommended action",
  "dueDate" : "2020-06-23T14:18:05.522Z",
  "closedDate" : "2020-06-23T14:18:05.523Z",
  "reviewedDate" : "2020-06-23T14:18:05.523Z",
  "type" : "NEGATIVE",
  "isGreatCatch" : false,
  "actionTaken" : "Sample action taken",
  "externalId" : 4810492,
  "reviewComment" : "Sample review comment",
  "customFields" : [ ],
  "updatedTime" : "2020-06-23T14:18:05.523Z",
  "updatedByUserId" : "1",
  "fieldsToClear" : [ ]
}
Table 13. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/observation/{observationOrExternalObservationId}
Parameter Description

organizationId

Internal ID of the organization

projectOrExternalProjectId

ID of project

observationOrExternalObservationId

ID of observation

Table 14. request parameters
Parameter Description

useExternalId

When set to true, projectId, observationId, and tradePartnerId will expect external IDs

Table 15. request body
Path Type Description

status

String

Status of the observation. Can have one of the following values NEW,IN_PROGRESS,WITH_PARTNER,DELAYED,CLOSED,READY_TO_REVIEW,CLOSED_REVIEWED,OBSERVED,NOT_APPLICABLE

hazardCategory

String

Hazard category

identificationMethod

String

Method of identification

notes

String

Observation notes

severity

String

Observation severity. Can have one of the following values NA,LOW,MEDIUM,HIGH,CRITICAL,LOSS_OF_LIFE

frequency

String

Observation frequency. Can have one of the following values NA,UNLIKELY,ANNUALLY,MONTHLY,WEEKLY,DAILY

risk

Number

Calculated risk of the observation

recommendedAction

String

Recommended action

reviewComment

String

Review comment for observation

dueDate

String

Due date for the observation. Date format is in ISO 8601

closedDate

String

Closed date for the observation. Date format is in ISO 8601

reviewedDate

String

Reviewed date for the observation. Date format is in ISO 8601

type

String

Type of the observation. Can have one of the following values POSITIVE,NEGATIVE

isGreatCatch

Boolean

Is this observation a great catch

actionTaken

String

Action taken

assignedUserId

String

ID of user who was assigned observation

assignedUserEmail

String

Email of user who was assigned observation

updatedByUserId

String

ID of user who last updated observation

updatedTime

String

Updated date for the observation. Date format is in ISO 8601

closedByUserId

String

ID of user who closed observation

reviewedByUserId

String

ID of user who reviewed observation

tradePartnerId

String

ID of Trade Partner associated with observation

externalId

Number

External ID provided for observation, for informational purpose only, not used for observation lookup

fieldsToClear[]

Array

The list of fields that need to be cleared (set to null). The allowed values are: "tradePartnerId", "assignedUserId", "hazardCategory", "identificationMethod", "recommendedAction", "dueDate", "isGreatCatch", "actionTaken", "externalId", "reviewComment", "closedDate", "externalObservationId", "reviewedByUserId", "closedByUserId", "reviewedDate", "updatedTime", "updatedByUserId"

customFields[]

Array

Custom fields for a given observation, when custom fields are configured for the organization

customFields[].id

String

Id of the custom field value

customFields[].identifier

String

Identifier of the custom field value

customFields[].dataType

String

Data type of the custom field value

customFields[].valueLong

Number

Value of the custom field, when its data type is LONG

customFields[].valueReal

Number

Value of the custom field, when its data type is REAL

customFields[].valueBoolean

Boolean

Value of the custom field, when its data type is BOOLEAN

customFields[].valueDate

String

Value of the custom field, when its data type is DATE. Date format is in ISO 8601

customFields[].valueString

String

Value of the custom field, when its data type is STRING

Table 16. response fields description
Path Type Description

observationId

String

Internal ID of the observation

projectId

String

Internal ID of the project

status

String

Status of the observation. Can have one of the following values NEW,IN_PROGRESS,WITH_PARTNER,DELAYED,CLOSED,READY_TO_REVIEW,CLOSED_REVIEWED,OBSERVED,NOT_APPLICABLE

hazardCategory

String

Hazard category

identificationMethod

String

Method of identification

notes

String

Observation notes

severity

String

Observation severity. Can have one of the following values NA,LOW,MEDIUM,HIGH,CRITICAL,LOSS_OF_LIFE

frequency

String

Observation frequency. Can have one of the following values NA,UNLIKELY,ANNUALLY,MONTHLY,WEEKLY,DAILY

risk

Number

Calculated risk of the observation

recommendedAction

String

Recommended action

reviewComment

String

Review comment for observation

userFriendlyId

String

User-friendly observation ID in format - SO-id

externalId

Number

External ID provided for observation, for informational purpose only, not used for observation lookup

externalObservationId

String

External observation ID provided for observation, used for observation lookup

dueDate

String

Due date for the observation. Date format is in ISO 8601

createdDate

String

Creation date of the observation. Date format is in ISO 8601

updatedDate

String

Update date of the observation. Date format is in ISO 8601

closedDate

String

Closed date of the observation. Date format is in ISO 8601

reviewedDate

String

Reviewed date for the observation. Date format is in ISO 8601

type

String

Type of the observation. Can have one of the following values POSITIVE,NEGATIVE

isGreatCatch

Boolean

Is this observation a great catch

actionTaken

String

Action taken

createdByUser

Object

User who created observation

createdByUser.id

String

Internal ID of user

createdByUser.firstName

String

First name of user

createdByUser.lastName

String

Last name of user

createdByUser.email

String

Email of user

createdByUser.isActive

Boolean

The indicator if the given user is active

createdByUser.isInvited

Boolean

The indicator if the given user is invited

createdByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

assignedToUser

Object

User who was assigned observation

assignedToUser.id

String

Internal ID of user

assignedToUser.firstName

String

First name of user

assignedToUser.lastName

String

Last name of user

assignedToUser.email

String

Email of user

assignedToUser.isActive

Boolean

The indicator if the given user is active

assignedToUser.isInvited

Boolean

The indicator if the given user is invited

assignedToUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

closedByUser

Object

User who closed observation

closedByUser.id

String

Internal ID of user

closedByUser.firstName

String

First name of user

closedByUser.lastName

String

Last name of user

closedByUser.email

String

Email of user

closedByUser.isActive

Boolean

The indicator if the given user is active

closedByUser.isInvited

Boolean

The indicator if the given user is invited

closedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

updatedByUser

Object

User who last updated observation

updatedByUser.id

String

Internal ID of user

updatedByUser.firstName

String

First name of user

updatedByUser.lastName

String

Last name of user

updatedByUser.email

String

Email of user

updatedByUser.isActive

Boolean

The indicator if the given user is active

updatedByUser.isInvited

Boolean

The indicator if the given user is invited

updatedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

reviewedByUser

Object

User who reviewed observation

reviewedByUser.id

String

Internal ID of user

reviewedByUser.firstName

String

First name of user

reviewedByUser.lastName

String

Last name of user

reviewedByUser.email

String

Email of user

reviewedByUser.isActive

Boolean

The indicator if the given user is active

reviewedByUser.isInvited

Boolean

The indicator if the given user is invited

reviewedByUser.isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

tradePartnerId

String

ID of Trade Partner associated with observation

customFields[]

Array

Custom fields for a given observation, when custom fields are configured for the organization

customFields[].id

String

Id of the custom field value

customFields[].identifier

String

Identifier of the custom field value

customFields[].dataType

String

Data type of the custom field value

customFields[].valueLong

Number

Value of the custom field, when its data type is LONG

customFields[].valueReal

Number

Value of the custom field, when its data type is REAL

customFields[].valueBoolean

Boolean

Value of the custom field, when its data type is BOOLEAN

customFields[].valueDate

String

Value of the custom field, when its data type is DATE. Date format is in ISO 8601

customFields[].valueString

String

Value of the custom field, when its data type is STRING

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2561

{
  "observationId" : "fed95a3e-58e1-4552-b99c-bb2f03d9b158",
  "projectId" : "78bae032-b781-46b6-a152-55c98b165765",
  "status" : "CLOSED_REVIEWED",
  "hazardCategory" : "Sample hazard category",
  "identificationMethod" : "Sample identification method",
  "notes" : "Sample observation notes",
  "severity" : "MEDIUM",
  "frequency" : "MONTHLY",
  "risk" : 6.0,
  "recommendedAction" : "Sample recommended action",
  "reviewComment" : "Sample review comment",
  "dueDate" : "2020-06-23T14:18:05.522+0000",
  "createdDate" : "2020-06-23T14:18:05.010+0000",
  "updatedDate" : "2020-06-23T14:18:05.523+0000",
  "closedDate" : "2020-06-23T14:18:05.523+0000",
  "reviewedDate" : "2020-06-23T14:18:05.523+0000",
  "type" : "NEGATIVE",
  "isGreatCatch" : false,
  "actionTaken" : "Sample action taken",
  "externalId" : 1,
  "userFriendlyId" : "SO-1",
  "externalObservationId" : "AF1256FADMQ3F",
  "customFields" : [ {
    "id" : "5db95671-0a0d-4312-b567-367408bb6592",
    "identifier" : "longField",
    "dataType" : "LONG",
    "valueLong" : 999999
  }, {
    "id" : "3c1cb0b1-9038-47d6-a226-789a79366c81",
    "identifier" : "realField",
    "dataType" : "REAL",
    "valueReal" : 1.99
  }, {
    "id" : "0036b359-cd93-45d0-a9aa-9cb969602cc7",
    "identifier" : "dateField",
    "dataType" : "DATE",
    "valueDate" : "2020-06-23T14:18:04.970+0000"
  }, {
    "id" : "f560264a-52fb-44a9-9a64-d96a3e4e78bf",
    "identifier" : "booleanField",
    "dataType" : "BOOLEAN",
    "valueBoolean" : true
  } ],
  "createdByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "assignedToUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "updatedByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "closedByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "reviewedByUser" : {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  },
  "tradePartnerId" : "8b665536-41df-492a-9540-549753b19e67"
}

Delete Observation API

Delete Observation API can be used to delete an observations from the system.

request
DELETE /api/v1/organization/27099792-4ebd-4807-821e-3a70fd8976f7/project/ds5987dfasd659sd7/observation/AF1256FADMQ3F?useExternalId=true HTTP/1.1
Host: public-api.smartvid.io
Table 17. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/observation/{observationOrExternalObservationId}
Parameter Description

organizationId

Internal ID of the organization

projectOrExternalProjectId

ID of project

observationOrExternalObservationId

ID of observation

Table 18. request parameters
Parameter Description

useExternalId

When set to true, projectId and observationId will expect external IDs

sample response
HTTP/1.1 204 No Content

Get Failed Download Files For Observation API

Get Failed Download Files For Observation API can be used to retrieve a list of files that failed to download into the system for a particular observation.

request
GET /api/v1/organization/2f9a79d6-bc70-47d1-9c9f-0eb82cecb1bb/project/ds5987dfasd659sd7/observation/AF1256FADMQ3F/download/status/failed?useExternalId=true HTTP/1.1
Host: public-api.smartvid.io
Table 19. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/observation/{observationOrExternalObservationId}/download/status/failed
Parameter Description

organizationId

Internal ID of the organization

projectOrExternalProjectId

ID of project

observationOrExternalObservationId

ID of observation

Table 20. request parameters
Parameter Description

useExternalId

When set to true, projectId and observationId will expect external IDs

Table 21. response fields description
Path Type Description

failedDownloads[].id

String

Internal ID of download job

failedDownloads[].fileName

String

Name of file

failedDownloads[].url

String

URL of file

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 264

{
  "failedDownloads" : [ {
    "id" : "68e0eb44-d9b2-43bc-9bbc-37396764548f",
    "fileName" : "test2.jpg",
    "url" : "http://test2.us"
  }, {
    "id" : "ba8207ca-0524-4fe0-b181-afe628475bb9",
    "fileName" : "test1.jpg",
    "url" : "http://test1.us"
  } ]
}

Projects

Sync Projects API

Sync Project API is used to create new or update existing projects in Smartvid.
The organizationId path parameter must match to all of the organizationId’s in the payload, this means that user can sync only the projects from a single organization in a single call to this API.
The system will try to locate existing projects based on the projectExternalId or id depending on the value of the useExternalId parameter.
For existing projects only the following fields can be updated: name, description, location and projectNumber.
The API is limited to work with 100 projects at a time.
User calling this API must have permission to manage projects for each projects' organization specified.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.

request
POST /api/v1/organization/2bdb355d-8544-42c2-88cd-723a1a528ffd/project/sync?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 2836

{
  "projects" : [ {
    "name" : "name1_UPD",
    "projectNumber" : "Project X 1",
    "externalProjectId" : "EXT_P1",
    "organizationId" : "2bdb355d-8544-42c2-88cd-723a1a528ffd",
    "description" : "descr1_UPD",
    "location" : "loc1_UPD",
    "users" : [ {
      "email" : "user1email",
      "roles" : [ {
        "roleName" : "COLLABORATOR",
        "moduleType" : "ASSETS"
      }, {
        "roleName" : "SAFETY_COLLABORATOR",
        "moduleType" : "OBSERVATIONS"
      }, {
        "roleName" : "TRADE_PARTNER_ADMIN",
        "moduleType" : "TRADE_PARTNERS"
      } ]
    }, {
      "email" : "user2email",
      "roles" : [ {
        "roleName" : "RECEIVER",
        "moduleType" : "ASSETS"
      }, {
        "roleName" : "SAFETY_COLLABORATOR",
        "moduleType" : "OBSERVATIONS"
      }, {
        "roleName" : "TRADE_PARTNER_ADMIN",
        "moduleType" : "TRADE_PARTNERS"
      } ]
    } ],
    "fieldsToClear" : [ ]
  }, {
    "name" : "name2_UPD",
    "projectNumber" : "Project X 2",
    "externalProjectId" : "EXT_P2",
    "organizationId" : "2bdb355d-8544-42c2-88cd-723a1a528ffd",
    "location" : "loc2_UPD",
    "users" : [ {
      "email" : "user1email",
      "roles" : [ {
        "roleName" : "COLLABORATOR",
        "moduleType" : "ASSETS"
      }, {
        "roleName" : "SAFETY_COLLABORATOR",
        "moduleType" : "OBSERVATIONS"
      }, {
        "roleName" : "TRADE_PARTNER_ADMIN",
        "moduleType" : "TRADE_PARTNERS"
      } ]
    }, {
      "email" : "user2email",
      "roles" : [ {
        "roleName" : "RECEIVER",
        "moduleType" : "ASSETS"
      }, {
        "roleName" : "SAFETY_COLLABORATOR",
        "moduleType" : "OBSERVATIONS"
      }, {
        "roleName" : "TRADE_PARTNER_ADMIN",
        "moduleType" : "TRADE_PARTNERS"
      } ]
    } ],
    "fieldsToClear" : [ "description" ]
  }, {
    "name" : "name_new",
    "externalProjectId" : "EXT_NEW_P_ID",
    "projectGroupId" : "e2272f6a-8470-4f75-9419-132491ec9367",
    "organizationId" : "2bdb355d-8544-42c2-88cd-723a1a528ffd",
    "description" : "descr_new",
    "location" : "loc_new",
    "users" : [ {
      "email" : "user1email",
      "roles" : [ {
        "roleName" : "COLLABORATOR",
        "moduleType" : "ASSETS"
      }, {
        "roleName" : "SAFETY_COLLABORATOR",
        "moduleType" : "OBSERVATIONS"
      }, {
        "roleName" : "TRADE_PARTNER_ADMIN",
        "moduleType" : "TRADE_PARTNERS"
      } ]
    }, {
      "email" : "user2email",
      "roles" : [ {
        "roleName" : "RECEIVER",
        "moduleType" : "ASSETS"
      }, {
        "roleName" : "SAFETY_COLLABORATOR",
        "moduleType" : "OBSERVATIONS"
      }, {
        "roleName" : "TRADE_PARTNER_ADMIN",
        "moduleType" : "TRADE_PARTNERS"
      } ]
    } ],
    "projectType" : "COMMERCIAL",
    "fieldsToClear" : [ ]
  } ]
}
Table 22. /api/v1/organization/{organizationId}/project/sync
Parameter Description

organizationId

The internal ID of the organization the projects belong to

Table 23. request parameters
Parameter Description

useExternalId

When set to true, projectId is the ID of the project in the external system

Table 24. request body
Path Type Description

projects[].projectType

String

Type of the project. Can have one of the following values ASSET_REMOVAL

projects[].startDate

String

Start date of the project

projects[].endDate

String

End date of the project

projects[].longitude

Number

Longitude of the project

projects[].latitude

Number

Latitude of the project

projects[].budget

Number

Project’s budget ($)

projects[].addressLine1

String

Project’s address

projects[].city

String

Project’s city

projects[].postalCode

String

Project’s postal code

projects[].state

String

Project’s state

projects[].country

String

Project’s country

projects[].id

String

The internal ID of the project

projects[].externalProjectId

String

The ID of the project in the external system

projects[].projectNumber

String

The human readable project identifier

projects[].projectGroupId

String

The internal ID of the project group for this project

projects[].organizationId

String

The internal ID of the organization this project belongs to. This is a required field

projects[].name

String

The name of the project. This field is required for any new project

projects[].description

String

The description of the project

projects[].location

String

Location of the project

projects[].fieldsToClear[]

Array

The list of fields that need to be cleared (set to null). The allowed values are: "description", "location", "projectNumber", "projectType", "startDate", "endDate", "longitude", "latitude", "budget", "addressLine1", "city", "postalCode", "state", "country"

projects[].users[].email

String

The e-mail address of the existing smartvid user

projects[].users[].roles[].roleName

String

The user’s role for the current project

projects[].users[].roles[].moduleType

String

The module to which the user will be invited with the given role for the give project

Table 25. response fields description
Path Type Description

projects[].projectType

String

Type of the project. Can have one of the following values ASSET_REMOVAL

projects[].startDate

String

Start date of the project

projects[].endDate

String

End date of the project

projects[].longitude

Number

Longitude of the project

projects[].latitude

Number

Latitude of the project

projects[].budget

Number

Project’s budget ($)

projects[].addressLine1

String

Project’s address

projects[].city

String

Project’s city

projects[].postalCode

String

Project’s postal code

projects[].state

String

Project’s state

projects[].country

String

Project’s country

projects[].id

String

The internal ID of the project

projects[].externalProjectId

String

The ID of the project in the external system

projects[].projectNumber

String

The human readable project identifier

projects[].projectGroupId

String

The internal ID of the project group for this project

projects[].inactive

Boolean

Whether project is inactive or active

projects[].organizationId

String

The internal ID of the organization this project belongs to

projects[].name

String

The name of the project

projects[].description

String

The description of the project

projects[].location

String

The location of the project

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 968

{
  "projects" : [ {
    "id" : "6156a13b-a83a-4074-8b30-e9f64ab8c260",
    "externalProjectId" : "EXT_NEW_P_ID",
    "organizationId" : "2bdb355d-8544-42c2-88cd-723a1a528ffd",
    "name" : "name_new",
    "description" : "descr_new",
    "location" : "loc_new",
    "projectGroupId" : "e2272f6a-8470-4f75-9419-132491ec9367",
    "inactive" : false,
    "projectType" : "COMMERCIAL"
  }, {
    "id" : "54a8dc4e-421e-4598-a736-b72b7e5c3339",
    "projectNumber" : "Project X 1",
    "externalProjectId" : "EXT_P1",
    "organizationId" : "2bdb355d-8544-42c2-88cd-723a1a528ffd",
    "name" : "name1_UPD",
    "description" : "descr1_UPD",
    "location" : "loc1_UPD",
    "inactive" : false
  }, {
    "id" : "ed65fc1b-e112-47f4-a8ba-e78e23888093",
    "projectNumber" : "Project X 2",
    "externalProjectId" : "EXT_P2",
    "organizationId" : "2bdb355d-8544-42c2-88cd-723a1a528ffd",
    "name" : "name2_UPD",
    "location" : "loc2_UPD",
    "inactive" : false
  } ]
}

Update Project’s external ID API

Update Project’s external ID API is used to update an external ID of an existing project in Smartvid.
User calling this API must have permission to manage projects in the organization to which the project belongs to.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed or in case where the project with a given external ID already exists in the given organization the response code 400 is returned.
To set an external ID for the project that doesn’t have one, omit the oldId field in the request payload.
For any permission related errors the response code 401 is returned.
If project cannot be found the response code 404 is returned.

request
PATCH /api/v1/organization/99e0b00c-51b0-45fe-8b24-308ea38bb177/project/facc7e59-a1ea-4eaa-9a14-364bb297b38c/externalId HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 50

{
  "oldId" : "EXT_P1",
  "newId" : "EXT_UPD_P1"
}
Table 26. /api/v1/organization/{organizationId}/project/{internalProjectId}/externalId
Parameter Description

organizationId

The internal ID of the organization the projects belong to

internalProjectId

The internal ID of the project for which an external ID needs to be updated

Table 27. request body
Path Type Description

oldId

String

The old external ID (optional) of an existing project

newId

String

The new external ID for an existing project

Table 28. response fields description
Path Type Description

projectType

String

Type of the project. Can have one of the following values ASSET_REMOVAL

startDate

String

Start date of the project

endDate

String

End date of the project

longitude

Number

Longitude of the project

latitude

Number

Latitude of the project

budget

Number

Project’s budget ($)

addressLine1

String

Project’s address

city

String

Project’s city

postalCode

String

Project’s postal code

state

String

Project’s state

country

String

Project’s country

id

String

The internal ID of the project

externalProjectId

String

The ID of the project in the external system, must be unique within the organization

projectNumber

String

The human readable project identifier

organizationId

String

The internal ID of the organization this project belongs to

name

String

The name of the project

description

String

The description of the project

location

String

The location of the project

projectGroupId

String

ID of the project group that this project belongs to

inactive

Boolean

Whether project is inactive or active

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 189

{
  "id" : "facc7e59-a1ea-4eaa-9a14-364bb297b38c",
  "externalProjectId" : "EXT_UPD_P1",
  "organizationId" : "99e0b00c-51b0-45fe-8b24-308ea38bb177",
  "name" : "P1",
  "inactive" : false
}

Update Project’s Project Group

Update Project’s Project Group ID API is used to update a project group ID of an existing project in Smartvid.
User calling this API must have permission to manage projects in the source and target project groups
Upon successful execution the API returns response payload along with 200 response code.
For any permission related errors the response code 401 is returned.
If project cannot be found the response code 404 is returned.

request
PATCH /api/v1/organization/279a3930-b92c-4973-b8e9-bd74904f9526/project/EXT_P1/projectGroupId?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 54

{
  "newId" : "df3be605-8c5e-49d1-bf0d-f8df4e9f2f4d"
}
Table 29. /api/v1/organization/{organizationId}/project/{projectId}/projectGroupId
Parameter Description

organizationId

The internal ID of the organization the projects belong to

projectId

The ID of the project for which a project group ID needs to be updated (internal or external, specified in the request

Table 30. request body
Path Type Description

newId

String

The new project group ID

Table 31. response fields description
Path Type Description

projectType

String

Type of the project. Can have one of the following values ASSET_REMOVAL

startDate

String

Start date of the project

endDate

String

End date of the project

longitude

Number

Longitude of the project

latitude

Number

Latitude of the project

budget

Number

Project’s budget ($)

addressLine1

String

Project’s address

city

String

Project’s city

postalCode

String

Project’s postal code

state

String

Project’s state

country

String

Project’s country

id

String

The internal ID of the project

externalProjectId

String

The ID of the project in the external system, must be unique within the organization

projectNumber

String

The human readable project identifier

organizationId

String

The internal ID of the organization this project belongs to

name

String

The name of the project

description

String

The description of the project

location

String

The location of the project

projectGroupId

String

ID of the project group that this project belongs to

inactive

Boolean

Whether project is inactive or active

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 246

{
  "id" : "f97aa1d0-387a-4d04-83cf-cbb665320eea",
  "externalProjectId" : "EXT_P1",
  "organizationId" : "279a3930-b92c-4973-b8e9-bd74904f9526",
  "name" : "P1",
  "projectGroupId" : "df3be605-8c5e-49d1-bf0d-f8df4e9f2f4d",
  "inactive" : false
}

Get Project API

Get Project API is used to get an existing project from Smartvid.
The project is retrieved based on the projectExternalId or id depending on the value of the useExternalId parameter.
User calling this API must have permission to access the organization to which the project belongs to.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
If project cannot be found the response code 404 is returned.

request
GET /api/v1/organization/61d68816-8d84-452f-908b-4963c78281df/project/EXT_P1?useExternalId=true HTTP/1.1
Host: api-public.smartvid.io
Table 32. /api/v1/organization/{organizationId}/project/{projectId}
Parameter Description

organizationId

The internal ID of the organization the projects belong to

projectId

The ID of the project either in Smartvid or in the external system, depending on the value of the useExternalId parameter

Table 33. request parameters
Parameter Description

useExternalId

When set to true, projectId is the ID of the project in the external system

Table 34. response fields description
Path Type Description

projectType

String

Type of the project. Can have one of the following values ASSET_REMOVAL

startDate

String

Start date of the project

endDate

String

End date of the project

longitude

Number

Longitude of the project

latitude

Number

Latitude of the project

budget

Number

Project’s budget ($)

addressLine1

String

Project’s address

city

String

Project’s city

postalCode

String

Project’s postal code

state

String

Project’s state

country

String

Project’s country

id

String

The internal ID of the project

externalProjectId

String

The ID of the project in the external system

projectNumber

String

The human readable project identifier

organizationId

String

The internal ID of the organization this project belongs to

name

String

The name of the project

inactive

Boolean

Whether project is inactive or active

description

String

The description of the project

location

String

The location of the project

projectGroup

Object

An optional Project Group object

projectGroup.id

String

The internal ID of the project group (region/business unit)

projectGroup.organizationId

String

The internal ID of the organization this project group belongs to

projectGroup.name

String

The name of the project group

projectGroup.description

String

The description of the project group

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 421

{
  "id" : "6536b222-fb34-4fab-b3d4-d117cae9a3a1",
  "externalProjectId" : "EXT_P1",
  "organizationId" : "61d68816-8d84-452f-908b-4963c78281df",
  "name" : "P1",
  "inactive" : false,
  "projectType" : "COMMERCIAL",
  "projectGroup" : {
    "id" : "c2e37267-0184-4a01-ba8b-f3b16142a8a6",
    "organizationId" : "61d68816-8d84-452f-908b-4963c78281df",
    "name" : "Group 1",
    "description" : "Group description"
  }
}

Set Project Status API

Set Project Status API is used to set 'active' or 'inactive' status for an existing project from Smartvid.
The client executing request must provide either projectExternalId or internal project id as the value of the path variable {projectId} depending on the value of useExternalId parameter.
User calling this API must have permission to access the organization to which the project belongs to.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
If project cannot be found the response code 404 is returned.

request
PATCH /api/v1/organization/b9f1c443-5fa3-4bad-83dd-a361aeffe240/project/EXT_P1/activation/status/true?useExternalId=true HTTP/1.1
Host: api-public.smartvid.io
Table 35. /api/v1/organization/{organizationId}/project/{projectId}/activation/status/{isInactive}
Parameter Description

organizationId

The internal ID of the organization the projects belong to

projectId

The ID of the project either in Smartvid or in the external system, depending on the value of the useExternalId parameter

isInactive

Set 'Inactive' or 'Active' status of the project depending on the isInactive parameter

Table 36. request parameters
Parameter Description

useExternalId

When set to true, projectId is the ID of the project in the external system

sample response
HTTP/1.1 200 OK

Get Projects API

Get Projects API is used to get the organization’s projects from Smartvid.
The returned list of projects is always sorted by name in the alphabetical order. User calling this API must have permission to access the organization to which the projects belong to.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.

request
GET /api/v1/organization/b35055c8-9fd5-4056-be2e-3f8b8a9fc83b/project?page=0&perPage=11&includeInactive=true HTTP/1.1
Host: api-public.smartvid.io
Table 37. /api/v1/organization/{organizationId}/project
Parameter Description

organizationId

The internal ID of the organization the projects belong to

Table 38. request parameters
Parameter Description

page

The zero based page number of the result set

perPage

The number of projects per page (max. 1000)

includeInactive

By default, 'includeInactive' = false. If set to true, return all objects including inactive ones. If set to false, only return the active ones, do not return inactive projects

Table 39. response fields description
Path Type Description

projects[]projectType

String

Type of the project. Can have one of the following values ASSET_REMOVAL

projects[]startDate

String

Start date of the project

projects[]endDate

String

End date of the project

projects[]longitude

Number

Longitude of the project

projects[]latitude

Number

Latitude of the project

projects[]budget

Number

Project’s budget ($)

projects[]addressLine1

String

Project’s address

projects[]city

String

Project’s city

projects[]postalCode

String

Project’s postal code

projects[]state

String

Project’s state

projects[]country

String

Project’s country

projects[].id

String

The internal ID of the project

projects[].externalProjectId

String

The ID of the project in the external system

projects[].projectNumber

String

The human readable project identifier

projects[].organizationId

String

The internal ID of the organization this project belongs to

projects[].name

String

The name of the project

projects[].description

String

The description of the project

projects[].location

String

The location of the project

projects[].projectGroupId

String

The internal ID of the project group (region/business unit)

projects[].inactive

Boolean

Whether project is inactive or active

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 792

{
  "projects" : [ {
    "id" : "e44a9276-a49d-4d86-b76c-fec5d0b41dcc",
    "projectNumber" : "P12345",
    "externalProjectId" : "12345",
    "organizationId" : "b35055c8-9fd5-4056-be2e-3f8b8a9fc83b",
    "name" : "P1",
    "description" : "Project description",
    "location" : "Project location",
    "projectGroupId" : "49fac1a1-2815-4129-ae80-445e247f4a13",
    "inactive" : false
  }, {
    "id" : "38d03618-32c1-4800-a9bb-a849e9db59db",
    "externalProjectId" : "EXT_P1",
    "organizationId" : "b35055c8-9fd5-4056-be2e-3f8b8a9fc83b",
    "name" : "P2",
    "inactive" : false
  }, {
    "id" : "e8c3e5a1-adc6-457e-ab9b-cd4a63fd660f",
    "externalProjectId" : "EXT_P1",
    "organizationId" : "b35055c8-9fd5-4056-be2e-3f8b8a9fc83b",
    "name" : "P3",
    "inactive" : false
  } ]
}

Delete Project API

Delete Project API is used to delete an existing project from Smartvid.
This API deletes project and all project related data (e.g. assets, observations, etc.).
The project is deleted based on the projectExternalId or id depending on the value of the useExternalId parameter.
User calling this API must have permission to manage projects in the organization to which the project belongs to.
Upon successful execution the API returns 204 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
Client calling this API will not receive an error if the project specified by the ID cannot be not found, the response code 204 is returned in this case instead.

request
DELETE /api/v1/organization/3900bad4-cad5-451c-8360-3794767945d2/project/EXT_P1?useExternalId=true HTTP/1.1
Host: api-public.smartvid.io
Table 40. /api/v1/organization/{organizationId}/project/{projectId}
Parameter Description

organizationId

The internal ID of the organization the projects belong to

projectId

The ID of the project either in Smartvid or in the external system, depending on the value of the useExternalId parameter

Table 41. request parameters
Parameter Description

useExternalId

When set to true, projectId is the ID of the project in the external system

sample response
HTTP/1.1 204 No Content

Trade Partners

Sync Trade Partners API

Sync Trade Partners API is used to create new or update existing trade partners in Smartvid.
The organizationId path parameter must match to all of the organizationId’s in the payload, this means that user can sync only the trade partners from a single organization in a single call to this API.
The system will try to locate existing trade partners based on the tradePartnerExternalId or id depending on the value of the useExternalId parameter.
For existing trade partners the following fields cannot be updated: id, organizationId and externalTradePartnerId.
The API is limited to work with 100 trade partners at a time.
User calling this API must have permission to create and update trade partners for the organization specified.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.

request
POST /api/v1/organization/8e329f42-4919-463f-8aa6-94cec1a41199/tradepartner/sync?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 829

{
  "tradePartners" : [ {
    "organizationId" : "8e329f42-4919-463f-8aa6-94cec1a41199",
    "externalTradePartnerId" : "EXT_ID_1",
    "name" : "TP1 Updated",
    "description" : "TP1 Descr Updated",
    "trade" : "TP1 Trade Updated",
    "telephone" : "111-111-1111",
    "email" : "tp1@examples.com",
    "fieldsToClear" : [ ]
  }, {
    "organizationId" : "8e329f42-4919-463f-8aa6-94cec1a41199",
    "externalTradePartnerId" : "EXT_ID_2",
    "name" : "TP2",
    "description" : "TP2 Descr",
    "trade" : "TP2 Trade Updated",
    "email" : "tp2@examples.com",
    "fieldsToClear" : [ ]
  }, {
    "organizationId" : "8e329f42-4919-463f-8aa6-94cec1a41199",
    "externalTradePartnerId" : "EXT_ID_3",
    "name" : "TP3 new",
    "description" : "TP3 descr_new",
    "trade" : "TP3 trade new",
    "fieldsToClear" : [ ]
  } ]
}
Table 42. /api/v1/organization/{organizationId}/tradepartner/sync
Parameter Description

organizationId

The internal ID of the organization the trade partners belong to

Table 43. request parameters
Parameter Description

useExternalId

When set to true, projectId is the ID of the project in the external system

Table 44. request body
Path Type Description

tradePartners[].id

String

The internal ID of the trade partner

tradePartners[].externalTradePartnerId

String

The ID of the trade partner in the external system

tradePartners[].organizationId

String

The internal ID of the organization this trade partner is associated with. This is a required field.

tradePartners[].name

String

The name of the trade partner

tradePartners[].description

String

The description of the trade partner

tradePartners[].email

String

The e-mail address of the trade partner

tradePartners[].trade

String

The trade of the trade partner

tradePartners[].addressLine1

String

The first line of the trade partner’s address

tradePartners[].addressLine2

String

The second line of the trade partner’s address

tradePartners[].city

String

The city of the trade partner’s address

tradePartners[].postalCode

String

The postal code of the trade partner’s address

tradePartners[].state

String

The state of the trade partner’s address

tradePartners[].country

String

The country of the trade partner’s address

tradePartners[].telephone

String

The phone of the trade partner

tradePartners[].companyWebsite

String

The company website of the trade partner

tradePartners[].taxId

String

The tax ID of the trade partner

tradePartners[].isActive

Boolean

The indicator if the given trade partner is active or not

tradePartners[].fieldsToClear[]

Array

The list of fields that need to be cleared (set to null). The allowed values are: "trade", "city", "description", "addressLine1", "addressLine2", "telephone", "companyWebsite", "country", "state", "postalCode", "taxId", "isActive", "email"

Table 45. response fields description
Path Type Description

tradePartners[].id

String

The internal ID of the trade partner

tradePartners[].externalTradePartnerId

String

The ID of the trade partner in the external system

tradePartners[].organizationId

String

The internal ID of the organization this trade partner is associated with

tradePartners[].name

String

The name of the trade partner

tradePartners[].description

String

The description of the trade partner

tradePartners[].email

String

The e-mail address of the trade partner

tradePartners[].trade

String

The trade of the trade partner

tradePartners[].addressLine1

String

The first line of the trade partner’s address

tradePartners[].addressLine2

String

The second line of the trade partner’s address

tradePartners[].city

String

The city of the trade partner’s address

tradePartners[].postalCode

String

The postal code of the trade partner’s address

tradePartners[].state

String

The state of the trade partner’s address

tradePartners[].country

String

The country of the trade partner’s address

tradePartners[].telephone

String

The phone of the trade partner

tradePartners[].companyWebsite

String

The company website of the trade partner

tradePartners[].taxId

String

The tax ID of the trade partner

tradePartners[].isActive

Boolean

The indicator if the given trade partner is active or not

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 970

{
  "tradePartners" : [ {
    "id" : "db0a13d7-5586-4bbe-b69e-8eeea8d23636",
    "organizationId" : "8e329f42-4919-463f-8aa6-94cec1a41199",
    "externalTradePartnerId" : "EXT_ID_3",
    "name" : "TP3 new",
    "description" : "TP3 descr_new",
    "trade" : "TP3 trade new",
    "isActive" : true
  }, {
    "id" : "18b641ff-5e9c-4aa0-a1be-e9f980984f62",
    "organizationId" : "8e329f42-4919-463f-8aa6-94cec1a41199",
    "externalTradePartnerId" : "EXT_ID_1",
    "name" : "TP1 Updated",
    "description" : "TP1 Descr Updated",
    "trade" : "TP1 Trade Updated",
    "telephone" : "111-111-1111",
    "isActive" : true,
    "email" : "tp1@examples.com"
  }, {
    "id" : "aa7cfa73-5010-4882-8bdf-6c047b9687d6",
    "organizationId" : "8e329f42-4919-463f-8aa6-94cec1a41199",
    "externalTradePartnerId" : "EXT_ID_2",
    "name" : "TP2",
    "description" : "TP2 Descr",
    "trade" : "TP2 Trade Updated",
    "isActive" : true,
    "email" : "tp2@examples.com"
  } ]
}

Get Trade Partner API

Get Trade Partner API is used to get an existing trade partner from Smartvid.
The trade partner is retrieved based on the tradePartnerExternalId or id depending on the value of the useExternalId parameter.
User calling this API must have permission to access the trade partners in the organization with which the trade partner is associated.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
If trade partner cannot be found the response code 404 is returned.

request
GET /api/v1/organization/10e37416-fb55-4e59-8fd1-a5f9d9e5294a/tradepartner/EXT_ID_1?useExternalId=true HTTP/1.1
Host: api-public.smartvid.io
Table 46. /api/v1/organization/{organizationId}/tradepartner/{tradePartnerId}
Parameter Description

organizationId

The internal ID of the organization the trade partner belongs to

tradePartnerId

The ID of the trade partner either in Smartvid or in the external system, depending on the value of the useExternalId parameter

Table 47. request parameters
Parameter Description

useExternalId

When set to true, tradePartnerId is the ID of the trade partner in the external system

Table 48. response fields description
Path Type Description

id

String

The internal ID of the trade partner

externalTradePartnerId

String

The ID of the trade partner in the external system

organizationId

String

The internal ID of the organization this trade partner is associated with

name

String

The name of the trade partner

description

String

The description of the trade partner

email

String

The e-mail address of the trade partner

trade

String

The trade of the trade partner

addressLine1

String

The first line of the trade partner’s address

addressLine2

String

The second line of the trade partner’s address

city

String

The city of the trade partner’s address

postalCode

String

The postal code of the trade partner’s address

state

String

The state of the trade partner’s address

country

String

The country of the trade partner’s address

telephone

String

The phone of the trade partner

companyWebsite

String

The company website of the trade partner

taxId

String

The tax ID of the trade partner

isActive

Boolean

The indicator if the given trade partner is active or not

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 281

{
  "id" : "9a20b1b4-9b23-4787-b1d2-2181896edd62",
  "organizationId" : "10e37416-fb55-4e59-8fd1-a5f9d9e5294a",
  "externalTradePartnerId" : "EXT_ID_1",
  "name" : "TP1",
  "description" : "TP1 Descr",
  "trade" : "TP1 Trade",
  "telephone" : "111-111-11111",
  "isActive" : true
}

Get Trade Partners for Organization API

Get Trade Partners for Organization API is used to obtain a paged list of trade partners for a given organization from Smartvid.
It returns a sorted (by name) and paged list of trade partners where maximum page size cannot exceed 100 items.
User calling this API must have permission to access the trade partners in the organization with which the trade partners are associated.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.

request
GET /api/v1/organization/f55378b6-48dc-4504-ae09-fada9f5f66a6/tradepartner?offset=0&limit=100 HTTP/1.1
Host: api-public.smartvid.io
Table 49. /api/v1/organization/{organizationId}/tradepartner
Parameter Description

organizationId

The internal ID of the organization the trade partner belongs to

Table 50. request parameters
Parameter Description

offset

Offset (in the number of items) for the returned result set

limit

Limit (in the number of items, max. 100) for the returned result set

Table 51. response fields description
Path Type Description

tradePartners[].id

String

The internal ID of the trade partner

tradePartners[].externalTradePartnerId

String

The ID of the trade partner in the external system

tradePartners[].organizationId

String

The internal ID of the organization this trade partner is associated with

tradePartners[].name

String

The name of the trade partner

tradePartners[].description

String

The description of the trade partner

tradePartners[].email

String

The e-mail address of the trade partner

tradePartners[].trade

String

The trade of the trade partner

tradePartners[].addressLine1

String

The first line of the trade partner’s address

tradePartners[].addressLine2

String

The second line of the trade partner’s address

tradePartners[].city

String

The city of the trade partner’s address

tradePartners[].postalCode

String

The postal code of the trade partner’s address

tradePartners[].state

String

The state of the trade partner’s address

tradePartners[].country

String

The country of the trade partner’s address

tradePartners[].telephone

String

The phone of the trade partner

tradePartners[].companyWebsite

String

The company website of the trade partner

tradePartners[].taxId

String

The tax ID of the trade partner

tradePartners[].isActive

Boolean

The indicator if the given trade partner is active or not

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 327

{
  "tradePartners" : [ {
    "id" : "ad05f30f-7fbb-44ca-9452-7a369a5992b3",
    "organizationId" : "f55378b6-48dc-4504-ae09-fada9f5f66a6",
    "externalTradePartnerId" : "EXT_ID_1",
    "name" : "TP1",
    "description" : "TP1 Descr",
    "trade" : "TP1 Trade",
    "telephone" : "111-111-11111",
    "isActive" : true
  } ]
}

Get Trade Partners for Project API

Get Trade Partners for Project API is used to obtain a paged list of trade partners for a given project from Smartvid.
It returns a sorted (by name) and paged list of trade partners where maximum page size cannot exceed 100 items.
User calling this API must have permission to access the trade partners in the project of the organization with which the trade partners are associated.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.

request
GET /api/v1/organization/a84a946a-5d36-4321-a482-7f6b8281ec71/project/ba2fc111-1f73-48fb-b86d-8c4e794f4798/tradepartner?offset=0&limit=100 HTTP/1.1
Host: api-public.smartvid.io
Table 52. /api/v1/organization/{organizationId}/project/{projectId}/tradepartner
Parameter Description

organizationId

The internal ID of the organization the trade partner belongs to

projectId

The internal ID of the project the trade partner belongs to

Table 53. request parameters
Parameter Description

offset

Offset (in the number of items) for the returned result set

limit

Limit (in the number of items, max. 100) for the returned result set

Table 54. response fields description
Path Type Description

tradePartners[].id

String

The internal ID of the trade partner

tradePartners[].externalTradePartnerId

String

The ID of the trade partner in the external system

tradePartners[].organizationId

String

The internal ID of the organization this trade partner is associated with

tradePartners[].name

String

The name of the trade partner

tradePartners[].description

String

The description of the trade partner

tradePartners[].email

String

The e-mail address of the trade partner

tradePartners[].trade

String

The trade of the trade partner

tradePartners[].addressLine1

String

The first line of the trade partner’s address

tradePartners[].addressLine2

String

The second line of the trade partner’s address

tradePartners[].city

String

The city of the trade partner’s address

tradePartners[].postalCode

String

The postal code of the trade partner’s address

tradePartners[].state

String

The state of the trade partner’s address

tradePartners[].country

String

The country of the trade partner’s address

tradePartners[].telephone

String

The phone of the trade partner

tradePartners[].companyWebsite

String

The company website of the trade partner

tradePartners[].taxId

String

The tax ID of the trade partner

tradePartners[].isActive

Boolean

The indicator if the given trade partner is active or not

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 327

{
  "tradePartners" : [ {
    "id" : "d5a44744-7f20-4250-8810-b3be4accfbc8",
    "organizationId" : "a84a946a-5d36-4321-a482-7f6b8281ec71",
    "externalTradePartnerId" : "EXT_ID_1",
    "name" : "TP1",
    "description" : "TP1 Descr",
    "trade" : "TP1 Trade",
    "telephone" : "111-111-11111",
    "isActive" : true
  } ]
}

Delete Trade Partner API

Delete Trade Partner API is used to delete an existing trade partner from Smartvid.
The trade partner is deleted based on the tradePartnerExternalId or id depending on the value of the useExternalId parameter.
User calling this API must have permission to delete trade partners in the organization with which the trade partner is associated.
Upon successful execution the API returns 204 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
Client calling this API will not receive an error if the trade partner specified by the ID cannot be not found, the response code 204 is returned in this case instead.

request
DELETE /api/v1/organization/19df540e-66af-4250-8397-738b8eafd89f/tradepartner/EXT_ID_1?useExternalId=true HTTP/1.1
Host: api-public.smartvid.io
Table 55. /api/v1/organization/{organizationId}/tradepartner/{tradePartnerId}
Parameter Description

organizationId

The internal ID of the organization the trade partner belongs to

tradePartnerId

The ID of the trade partner either in Smartvid or in the external system, depending on the value of the useExternalId parameter

Table 56. request parameters
Parameter Description

useExternalId

When set to true, tradePartnerId is the ID of the trade partner in the external system

sample response
HTTP/1.1 204 No Content

Assign Trade Partners to Project API

Assign Trade Partners to Project API is used to assign maltiple trade partners specified by their IDs to an existing project in Smartvid.
The trade partners' IDs are either internal Smartvid IDs or external trade partners IDs based on the useExternalId parameter.
User calling this API must have permission to assign trade partners to the project in the organization with which the trade partner is associated.
Upon successful execution the API returns 201 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
If trade partner or the project cannot be found the response code 404 is returned.

request
PUT /api/v1/organization/087213af-7251-49aa-9eb4-5ec83e1b75c0/project/EXT_PROJ_ID_1/tradepartner?useExternalId=true HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: api-public.smartvid.io
Content-Length: 52

{
  "tradePartnerIds" : [ "EXT_ID_1", "EXT_ID_2" ]
}
Table 57. /api/v1/organization/{organizationId}/project/{projectId}/tradepartner
Parameter Description

organizationId

The internal ID of the organization the trade partner belongs to

projectId

The ID of the project, either in Smartvid or in the external system, depending on the value of the useExternalId parameter

Table 58. request parameters
Parameter Description

useExternalId

When set to true, projectId is the ID of the project in the external system

sample response
HTTP/1.1 201 Created

Remove Trade Partner from Project API

Remove Trade Partner from Project API is used to remove a trade partner specified by ID from an existing project in Smartvid.
The trade partner’s ID is either internal Smartvid ID or external trade partner’s ID based on the useExternalId parameter.
User calling this API must have permission to remove trade partners from the project in the organization with which the trade partner is associated.
Upon successful execution the API returns 201 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
If trade partner or the project cannot be found the response code 404 is returned.

request
DELETE /api/v1/organization/ecb3db85-2bdc-47a3-a10e-377cb6b75ddb/project/EXT_PROJ_ID_1/tradepartner/EXT_ID_1?useExternalId=true HTTP/1.1
Host: api-public.smartvid.io
Table 59. /api/v1/organization/{organizationId}/project/{projectId}/tradepartner/{tradePartnerId}
Parameter Description

organizationId

The internal ID of the organization the trade partner belongs to

projectId

The ID of the project, either in Smartvid or in the external system, depending on the value of the useExternalId parameter

tradePartnerId

The ID of the trade partner either in Smartvid or in the external system, depending on the value of the useExternalId parameter

Table 60. request parameters
Parameter Description

useExternalId

When set to true, projectId and tradePartnerId are the IDs of the project and trade partner in the external system

sample response
HTTP/1.1 204 No Content

Users and project members

Invite Users To Project Group API

Invite Users To Project Group API can be used to invite new or existing users to a project group.

request
POST /api/v1/organization/fbac73a6-aba1-4534-8698-575151f291dc/projectgroup/46660ad4-184c-479f-bcc5-2db9d90c844b/invitation HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 608

{
  "users" : [ {
    "email" : "joe@smartvid.io",
    "externalUserId" : "EXT_U1",
    "isSso" : true,
    "firstName" : "fn",
    "lastName" : "ln",
    "roles" : [ {
      "roleName" : "ADMIN",
      "moduleType" : "ASSETS"
    }, {
      "roleName" : "REGIONAL_SAFETY_ADMIN",
      "moduleType" : "OBSERVATIONS"
    }, {
      "roleName" : "REGIONAL_TRADE_PARTNER_ADMIN",
      "moduleType" : "TRADE_PARTNERS"
    } ],
    "fieldsToClear" : [ ]
  }, {
    "email" : "jane@smartvid.io",
    "roles" : [ {
      "roleName" : "ADMIN",
      "moduleType" : "ASSETS"
    } ],
    "fieldsToClear" : [ ]
  } ]
}
Table 61. /api/v1/organization/{organizationId}/projectgroup/{projectGroupId}/invitation
Parameter Description

organizationId

The internal ID of the organization

projectGroupId

ID of the project group

Table 62. request body
Path Type Description

users[].email

String

Email of user to invite

users[].externalUserId

String

Sets external ID of the user

users[].isSso

Boolean

Sets if user is a single sign-on user. When set to true, user will automatically be set to active user status. If set to false and applied to an existing user previously set to true, the flag will be set and the user will be returned to an invited status

users[].firstName

String

Sets first name or user

users[].lastName

String

Sets last name of user

users[].fieldsToClear[]

Array

The list of fields that need to be cleared (set to null). The allowed values are: "firstName", "lastName"

users[].roles[].roleName

String

Can have one of the following values for ASSETS NON_MEMBER,USER,REGION_VIEWER,ADMIN. Can have one of the following values for OBSERVATIONS NON_MEMBER,USER,REGIONAL_SAFETY_ADMIN. Can have one of the following values for TRADE_PARTNERS NON_MEMBER,USER,REGIONAL_TRADE_PARTNER_ADMIN.

users[].roles[].moduleType

String

Module user is to be invited to. Can have one of the following values ASSETS,OBSERVATIONS,TRADE_PARTNERS

sample response
HTTP/1.1 201 Created

Invite Users To Project API

Invite Users To Project API can be used to invite new or existing users to a project.

request
POST /api/v1/organization/32187a61-7484-4207-86a2-a0b55da5f7fa/project/EXT_P1/member/invitation?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 597

{
  "users" : [ {
    "email" : "joe@smartvid.io",
    "externalUserId" : "EXT_U1",
    "isSso" : true,
    "firstName" : "fn",
    "lastName" : "ln",
    "roles" : [ {
      "roleName" : "COLLABORATOR",
      "moduleType" : "ASSETS"
    }, {
      "roleName" : "SAFETY_COLLABORATOR",
      "moduleType" : "OBSERVATIONS"
    }, {
      "roleName" : "VIEWER",
      "moduleType" : "TRADE_PARTNERS"
    } ],
    "fieldsToClear" : [ ]
  }, {
    "email" : "jane@smartvid.io",
    "roles" : [ {
      "roleName" : "CONTRIBUTOR",
      "moduleType" : "ASSETS"
    } ],
    "fieldsToClear" : [ ]
  } ]
}
Table 63. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/member/invitation
Parameter Description

organizationId

The internal ID of the organization

projectOrExternalProjectId

ID of project

Table 64. request parameters
Parameter Description

useExternalId

When set to true, projectOrExternalProjectId will expect and external ID

preventEmailSending

Prevents project invite emails from being sent to users when set to true. Defaults to false

Table 65. request body
Path Type Description

users[].email

String

Email of user to invite

users[].externalUserId

String

Sets external ID of the user

users[].isSso

Boolean

Sets if user is a single sign-on user. When set to true, user will automatically be set to active user status. If set to false and applied to an existing user previously set to true, the flag will be set and the user will be returned to an invited status

users[].firstName

String

Sets first name or user

users[].lastName

String

Sets last name of user

users[].fieldsToClear[]

Array

The list of fields that need to be cleared (set to null). The allowed values are: "firstName", "lastName"

users[].roles[].roleName

String

Can have one of the following values for ASSETS NON_MEMBER,COLLABORATOR,RECEIVER,VIEWER,CONTRIBUTOR,OWNER. Can have one of the following values for OBSERVATIONS NON_MEMBER,SAFETY_ADMIN,SAFETY_COLLABORATOR,SAFETY_USER,SAFETY_OBSERVER. Can have one of the following values for TRADE_PARTNERS NON_MEMBER,VIEWER,TRADE_PARTNER_ADMIN.

users[].roles[].moduleType

String

Module user is to be invited to. Can have one of the following values ASSETS,OBSERVATIONS,TRADE_PARTNERS

sample response
HTTP/1.1 201 Created

Invite Users To Organization API

Invite Users To Organization API can be used to invite new or existing users to an organization.

request
POST /api/v1/organization/EXT_O1/member/invitation?useExternalId=true HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 628

{
  "users" : [ {
    "email" : "joe@smartvid.io",
    "externalUserId" : "EXT_U1",
    "isSso" : true,
    "firstName" : "fn",
    "lastName" : "ln",
    "roles" : [ {
      "roleName" : "ORGANIZATION_ADMIN",
      "moduleType" : "ASSETS"
    }, {
      "roleName" : "ORGANIZATION_SAFETY_ADMIN",
      "moduleType" : "OBSERVATIONS"
    }, {
      "roleName" : "ORGANIZATION_TRADE_PARTNER_ADMIN",
      "moduleType" : "TRADE_PARTNERS"
    } ],
    "fieldsToClear" : [ ]
  }, {
    "email" : "jane@smartvid.io",
    "roles" : [ {
      "roleName" : "USER",
      "moduleType" : "ASSETS"
    } ],
    "fieldsToClear" : [ ]
  } ]
}
Table 66. /api/v1/organization/{organizationOrExternalOrganizationId}/member/invitation
Parameter Description

organizationOrExternalOrganizationId

ID of organization

Table 67. request parameters
Parameter Description

useExternalId

When set to true, organizationOrExternalOrganizationId will expect an external ID

preventEmailSending

Prevents organization invite emails from being sent to users when set to true. Defaults to false

Table 68. request body
Path Type Description

users[].email

String

Email of user to invite

users[].externalUserId

String

Sets external ID of the user.

users[].isSso

Boolean

Sets if user is a single sign-on user. When set to true, user will automatically be set to active user status. If set to false and applied to an existing user previously set to true, the flag will be set and the user will be returned to an invited status

users[].firstName

String

Sets first name or user

users[].lastName

String

Sets last name of user

users[].fieldsToClear[]

Array

The list of fields that need to be cleared (set to null). The allowed values are: "firstName", "lastName"

users[].roles[].roleName

String

Can have one of the following values for ASSETS NO_ACCESS,ORGANIZATION_VIEWER,GUEST,USER,ORGANIZATION_ADMIN,PRIMARY_OWNER. Can have one of the following values for OBSERVATIONS NON_MEMBER,USER,ORGANIZATION_SAFETY_ADMIN. Can have one of the following values for TRADE_PARTNERS NON_MEMBER,USER,ORGANIZATION_TRADE_PARTNER_ADMIN.

users[].roles[].moduleType

String

Module user is to be invited to. Can have one of the following values ASSETS,OBSERVATIONS,TRADE_PARTNERS

sample response
HTTP/1.1 201 Created

Uninvite Users From Project Group API

Uninvite Users From Project Group API can be used to revoke a project group users membership.

request
DELETE /api/v1/organization/9edb81ef-047e-4cab-92c8-0d34ff105dc0/projectgroup/006f3f7e-68a1-4ff1-bb6b-43db01206aec/invitation/email@example.com HTTP/1.1
Host: public-api.smartvid.io
Table 69. /api/v1/organization/{organizationId}/projectgroup/{projectGroupId}/invitation/{userEmail}
Parameter Description

organizationId

The internal ID of the organization

projectGroupId

ID of the project group

userEmail

Email of user to uninvite

Table 70. request parameters
Parameter Description
sample response
HTTP/1.1 204 No Content

Uninvite Users From Project API

Uninvite Users From Project API can be used to revoke a project users membership.

request
DELETE /api/v1/organization/27041929-4169-486c-a592-7011f368c0dd/project/EXT_P1/member/invitation/email@example.com?useExternalId=true HTTP/1.1
Host: public-api.smartvid.io
Table 71. /api/v1/organization/{organizationId}/project/{projectOrExternalProjectId}/member/invitation/{userEmail}
Parameter Description

organizationId

The internal ID of the organization

projectOrExternalProjectId

ID of project

userEmail

Email of user to uninvite

Table 72. request parameters
Parameter Description

useExternalId

When set to true, projectOrExternalProjectId will expect an external ID

preventEmailSending

Prevents project un-invite emails from being sent to users when set to true. Defaults to false

sample response
HTTP/1.1 204 No Content

Uninvite Users From Organization API

Uninvite Users From Organization API can be used to revoke an organization users membership.

request
DELETE /api/v1/organization/EXT_O1/member/invitation/email@example.com?useExternalId=true HTTP/1.1
Host: public-api.smartvid.io
Table 73. /api/v1/organization/{organizationOrExternalOrganizationId}/member/invitation/{userEmail}
Parameter Description

organizationOrExternalOrganizationId

ID of organization

userEmail

Email of user to uninvite

Table 74. request parameters
Parameter Description

useExternalId

When set to true, organizationOrExternalOrganizationId will expect an external ID

preventEmailSending

Prevents project un-invite emails from being sent to users when set to true. Defaults to false

sample response
HTTP/1.1 204 No Content

Get Organization Users API

Get the list of users for a given organization.

request
GET /api/v1/organization/22d4f1f2-903a-4b51-93f2-7a10825598c0/user?page=0&perPage=1000 HTTP/1.1
Host: public-api.smartvid.io
Table 75. /api/v1/organization/{organizationId}/user
Parameter Description

organizationId

Internal ID of the organization

Table 76. request parameters
Parameter Description

page

Page

perPage

Number of users per page. This value cannot be greater than 1,000

Table 77. response fields description
Path Type Description

users[].id

String

Internal ID of the user

users[].firstName

String

First name

users[].lastName

String

Last name

users[].email

String

Email

users[].externalUserId

String

External ID of the user

users[].isActive

Boolean

The indicator if the given user is active

users[].isInvited

Boolean

The indicator if the given user is invited

users[].isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 687

{
  "users" : [ {
    "id" : "31ecdc7d-9e13-41c2-83a2-f553a78b3c97",
    "firstName" : "fn",
    "lastName" : "ln",
    "email" : "email@example.com",
    "externalUserId" : "EXT_USER1",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : true
  }, {
    "id" : "219e7094-d3c8-47ac-85ac-86fe5d08838c",
    "firstName" : "fn2",
    "lastName" : "ln2",
    "email" : "email2@example.com",
    "externalUserId" : "EXT_USER2",
    "isActive" : false,
    "isInvited" : false,
    "isSso" : true
  }, {
    "id" : "1",
    "firstName" : "Admin",
    "lastName" : "Admin",
    "email" : "admin@smartvid.io",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : false
  } ]
}

Get Project Users API

Get the list of users for a given project.

request
GET /api/v1/organization/4cec50b5-ff04-46e8-82b5-20460e6564c7/project/59ccb1e7-0d5f-4694-b2e3-aab2867ef9d3/user?page=0&perPage=1000 HTTP/1.1
Host: public-api.smartvid.io
Table 78. /api/v1/organization/{organizationId}/project/{extOrIntProjectId}/user
Parameter Description

organizationId

Internal ID of the organization

extOrIntProjectId

External or internal ID of the project

Table 79. request parameters
Parameter Description

useExternalId

When set to true, extOrIntProjectId will expect an external ID

page

Page number

perPage

Number of users per page. This value cannot be greater than 1,000

Table 80. response fields description
Path Type Description

projectUsers[].id

String

Internal ID of the user

projectUsers[].firstName

String

First name

projectUsers[].lastName

String

Last name

projectUsers[].email

String

Email

projectUsers[].externalUserId

String

External ID of the user

projectUsers[].isActive

Boolean

The indicator if the given user is active

projectUsers[].isInvited

Boolean

The indicator if the given user is invited

projectUsers[].isSso

Boolean

Sets to true if user is a single sign-on user otherwise to false

projectUsers[].assetsProjectRole

String

Project role for the ASSETS module. Can have one of the following values NON_MEMBER, COLLABORATOR, RECEIVER, VIEWER, CONTRIBUTOR, OWNER

projectUsers[].observationsProjectRole

String

Project role for the OBSERVATIONS module. Can have one of the following values NON_MEMBER, SAFETY_ADMIN, SAFETY_COLLABORATOR, SAFETY_USER, SAFETY_OBSERVER

projectUsers[].tradePartnersProjectRole

String

Project role for the TRADE_PARTNERS module. Can have one of the following values NON_MEMBER, VIEWER, TRADE_PARTNER_ADMIN

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 408

{
  "projectUsers" : [ {
    "id" : "8bef81f4-9447-41ea-997a-72657e64df4f",
    "firstName" : "fn",
    "lastName" : "ln",
    "email" : "email@example.com",
    "externalUserId" : "EXT_USER1",
    "isActive" : true,
    "isInvited" : false,
    "isSso" : true,
    "assetsProjectRole" : "COLLABORATOR",
    "observationsProjectRole" : "SAFETY_COLLABORATOR",
    "tradePartnersProjectRole" : "VIEWER"
  } ]
}

Update User’s external ID API

Update User’s external ID API is used to update an external ID of an existing user in Smartvid.
User calling this API must have permission to manage at least one of organizations which the user belong to.
To set an external ID for the user that doesn’t have one, omit the oldId field in the request payload.
Upon successful execution the API returns response payload along with 200 response code.
For any incorrect parameters passed the response code 400 is returned.
For any permission related errors the response code 401 is returned.
If user cannot be found the response code 404 is returned.

request
PATCH /api/v1/organization/9788d841-3998-4819-9c70-541b78678032/user/email@example.com/externalId HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 64

{
  "oldId" : "OLD_EXTERNAL_ID",
  "newId" : "NEW_EXTERNAL_ID"
}
Table 81. /api/v1/organization/{organizationId}/user/{email:.+}/externalId
Parameter Description

organizationId

The internal ID of the organization

email

User’s email

Table 82. request body
Path Type Description

oldId

String

The old external ID of an existing user - currently unused and can be omitted from request

newId

String

The new external ID of an existing user. NB: user’s external id should be unique

sample response
HTTP/1.1 200 OK

Get User settings API

Get User Settings

request
GET /api/v1/organization/d72326f5-0a70-4e0b-b73f-f1cc6765e3ee/user/email@example.com/settings HTTP/1.1
Host: public-api.smartvid.io
Table 83. /api/v1/organization/{organizationId}/user/{email}/settings
Parameter Description

organizationId

The internal ID of the organization

email

User’s email

Table 84. response fields description
Path Type Description

defaultHomePage

String

Default Home Page (ASSETS or OBSERVATIONS currently)

sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 34

{
  "defaultHomePage" : "ASSETS"
}

Update User settings API

Update user settings

request
POST /api/v1/organization/d01ae4b4-4381-4799-b8be-8693b862d937/user/email@example.com/settings HTTP/1.1
Content-Type: application/json
Host: public-api.smartvid.io
Content-Length: 34

{
  "defaultHomePage" : "ASSETS"
}
Table 85. /api/v1/organization/{organizationId}/user/{email}/settings
Parameter Description

organizationId

The internal ID of the organization

email

User’s email

Table 86. request body
Path Type Description

defaultHomePage

String

Default Home Page (ASSETS or OBSERVATIONS currently)

sample response
HTTP/1.1 200 OK

Organizations and Project Groups

Retrieve project groups for an organization

Get the list of project groups for a given organization.

request
GET /api/v1/organization/f4422c09-f2a6-4813-9c34-33b91e21d6dd/projectgroup HTTP/1.1
Host: api-public.smartvid.io
Table 87. /api/v1/organization/{organizationId}/projectgroup
Parameter Description

organizationId

The internal ID of the organization projects groups belong to

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 587

{
  "projectGroups" : [ {
    "id" : "6438dc21-7786-4857-b94a-25f548595a47",
    "organizationId" : "f4422c09-f2a6-4813-9c34-33b91e21d6dd",
    "name" : "Group 2",
    "description" : "Group 2 description"
  }, {
    "id" : "36d1d233-fb22-47dc-9142-e48c21c3ab30",
    "organizationId" : "f4422c09-f2a6-4813-9c34-33b91e21d6dd",
    "name" : "Group 1",
    "description" : "Group 1 description"
  }, {
    "id" : "c4ece8dc-59ce-4d1a-bce0-f4c2f0286e15",
    "organizationId" : "f4422c09-f2a6-4813-9c34-33b91e21d6dd",
    "name" : "Group 0",
    "description" : "Group 0 description"
  } ]
}

Retrieve organizations for the current user

Get the list of all organizations that the current user belongs to.

request
GET /api/v1/organization HTTP/1.1
Host: api-public.smartvid.io
Table 88. /api/v1/organization
Parameter Description
sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 537

{
  "organizations" : [ {
    "id" : "8838c504-f48b-6cc2-c260-c611163bb49f",
    "name" : "Smith Alice's Org"
  }, {
    "id" : "ac7c23c6-605b-461b-88f8-50cc7d2b9623",
    "name" : "Organization MVqufXzIye",
    "description" : "Test organization 0"
  }, {
    "id" : "4324ba59-8ced-43e9-9b92-89b111948e55",
    "name" : "Organization SmnadnMUNR",
    "description" : "Test organization 1"
  }, {
    "id" : "bfaf9a27-197e-4718-9531-2aed71693ad4",
    "name" : "Organization TlQduscSCK",
    "description" : "Test organization 2"
  } ]
}

Reporting

Schedule/run photo report for the project

Schedule photo report to be emailed to a set of users for photos with the defined set of tags. Multiple photo reports can be scheduled per project with various sets of users, tags and other settings.

Calling this API with reportFixedScheduleInterval set to NEVER will generate a one-time report instead of scheduling it to be generated periodically.

request
POST /api/v1/organization/eb3656df-06c5-41d8-8387-e9357f091ffe/project/a78937a7-d2c6-4ce0-99ee-a3f451e31f50/report/photo HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 377

{
  "isConstructionRelatedOnly" : true,
  "includedTags" : [ "PPE" ],
  "toUserEmails" : [ "admin@smartvid.io" ],
  "startDate" : "2020-06-23T14:18:08.928+0000",
  "endDate" : "2020-06-23T14:18:08.928+0000",
  "reportFixedScheduleInterval" : "DAILY",
  "photoReportSubType" : "DUAL_IMAGE",
  "recipeType" : "PDF",
  "tagConfidenceLevel" : "HIGH",
  "isIncludeAllTags" : false
}
Table 89. /api/v1/organization/{organizationId}/project/{projectId}/report/photo
Parameter Description

organizationId

Internal ID of the organization

projectId

Internal ID of the project

Table 90. request body
Path Type Description

isConstructionRelatedOnly

Boolean

Only include photos tagged as 'construction'

includedTags

Array

Only include photos that are tagged with tags in this list

toUserEmails

Array

List of recipient emails to send the report to

startDate

String

Start date of the reporting interval

endDate

String

End date of the reporting interval

reportFixedScheduleInterval

String

Should contain one of the following values NEVER,HOURLY,DAILY,WEEKLY,MONTHLY

photoReportSubType

String

Should contain one of the following values SINGLE_IMAGE,DUAL_IMAGE

recipeType

String

Should contain one of the following values HTML,PDF

tagConfidenceLevel

String

Should contain one of the following values LOW,MEDIUM,HIGH

isIncludeAllTags

Boolean

Must include all specified tags

description

String

Text description for report

Schedule/run photo report for the project on behalf of a user

Only organization admins can call this API

request
POST /api/v1/organization/b7c8712e-17dc-4df4-8612-cf97ca9a75cb/project/a3a28947-2217-4a36-bf68-8205ac583000/on_behalf_of_user/super_user/report/photo?useExternalUserId=true HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 377

{
  "isConstructionRelatedOnly" : true,
  "includedTags" : [ "PPE" ],
  "toUserEmails" : [ "admin@smartvid.io" ],
  "startDate" : "2020-06-23T14:18:08.227+0000",
  "endDate" : "2020-06-23T14:18:08.227+0000",
  "reportFixedScheduleInterval" : "DAILY",
  "photoReportSubType" : "DUAL_IMAGE",
  "recipeType" : "PDF",
  "tagConfidenceLevel" : "HIGH",
  "isIncludeAllTags" : false
}
Table 91. /api/v1/organization/{organizationId}/project/{projectId}/on_behalf_of_user/{userId}/report/photo
Parameter Description

organizationId

Internal ID of the organization

projectId

Internal ID of the project

userId

Internal user ID who can run reports in this project

Table 92. request body
Path Type Description

isConstructionRelatedOnly

Boolean

Only include photos tagged as 'construction'

includedTags

Array

Only include photos that are tagged with tags in this list

toUserEmails

Array

List of recipient emails to send the report to

startDate

String

Start date of the reporting interval

endDate

String

End date of the reporting interval

reportFixedScheduleInterval

String

Should contain one of the following values NEVER,HOURLY,DAILY,WEEKLY,MONTHLY

photoReportSubType

String

Should contain one of the following values SINGLE_IMAGE,DUAL_IMAGE

recipeType

String

Should contain one of the following values HTML,PDF

tagConfidenceLevel

String

Should contain one of the following values LOW,MEDIUM,HIGH

isIncludeAllTags

Boolean

Must include all specified tags

description

String

Text description for report

Get the list of scheduled photo reports for the project

Retrieve the list of scheduled photo reports and their settings for a given project.

request
GET /api/v1/organization/eb3656df-06c5-41d8-8387-e9357f091ffe/project/a78937a7-d2c6-4ce0-99ee-a3f451e31f50/report HTTP/1.1
Host: api-public.smartvid.io
Table 93. /api/v1/organization/{organizationId}/project/{projectId}/report
Parameter Description

organizationId

Internal ID of the organization

projectId

Internal ID of the project

Table 94. request body
Path Type Description

photoReports[]

Array

photoReports[].id

String

Internal ID of the scheduled report instance

photoReports[].isConstructionRelatedOnly

Boolean

Only include photos tagged as 'construction'

photoReports[].includedTags

Array

Only include photos that are tagged with tags in this list

photoReports[].toUserEmails

Array

List of recipient emails to send the report to

photoReports[].startDate

String

Start date of the reporting interval

photoReports[].endDate

String

End date of the reporting interval

photoReports[].reportFixedScheduleInterval

String

Photo report will be generated and emailed with the following periodicity

photoReports[].photoReportSubType

String

Layout of the photo report

photoReports[].recipeType

String

Generate HTML or PDF

photoReports[].tagConfidenceLevel

String

Only consider tags with the following confidence

sample response
HTTP/1.1 200 OK
Content-Type: application/problem+json;charset=UTF-8
Content-Length: 445

{
  "photoReports" : [ {
    "id" : "283da174-d154-4cd4-97e9-1074d527febc",
    "isConstructionRelatedOnly" : true,
    "includedTags" : [ "PPE" ],
    "toUserEmails" : [ "admin@smartvid.io" ],
    "startDate" : "2020-06-24T14:18:08.928+0000",
    "endDate" : "2020-06-24T14:18:08.928+0000",
    "reportFixedScheduleInterval" : "DAILY",
    "photoReportSubType" : "DUAL_IMAGE",
    "recipeType" : "PDF",
    "tagConfidenceLevel" : "HIGH"
  } ]
}

Remove scheduled photo report

Remove scheduled photo report for the project. This API only removes one scheduled photo report. Other scheduled photo reports are not changed.

request
DELETE /api/v1/organization/eb3656df-06c5-41d8-8387-e9357f091ffe/project/a78937a7-d2c6-4ce0-99ee-a3f451e31f50/report/photo/283da174-d154-4cd4-97e9-1074d527febc HTTP/1.1
Host: api-public.smartvid.io
Table 95. /api/v1/organization/{organizationId}/project/{projectId}/report/photo/{photoReportId}
Parameter Description

organizationId

Internal ID of the organization

projectId

Internal ID of the project

photoReportId

Internal ID of the scheduled report instance. Can be obtained by calling /api/v1/organization/{organizationId}/project/{projectId}/report API

Metrics

The following metrics are currently available:

Table 96. List of supported metrics
Metric Name Description

Activity Metrics

ASSET_UPLOAD_COUNT

Count of assets uploaded, by type

ASSET_CREATED_COUNT

Count of assets created, by type

AVG_UPLOAD_PER_DAY

Average number of uploads per day

TAG_INSTANCE_CREATION_COUNT

Number of tags created, by type

UPLOADER_USER_COUNT

Number of unique users who uploaded assets

ACTIVE_USER_COUNT

Number of active users

INTEGRATION_CREATED_COUNT

Number of assets created via integration(s), by content source type

USER_CREATED_COUNT

Number of assets created via direct uploads from WWW/mobile or public API, by content source type

INTEGRATION_UPLOADER_EXTERNAL_USER_COUNT

Count of unique integration system user ids who have uploaded assets through different sources of integrations per integration type

INTEGRATION_EXTERNAL_USER_ASSET_CREATED_COUNT

Count of assets created by integration system users

USER_ASSET_CREATED_COUNT

Count of assets created by users

USER_TAG_INSTANCE_CREATION_COUNT

Number of tags created by user, by type

USER_COMMENT_COUNT

Number of comments created by user

Safety Metrics

CONSTRUCTION_ASSET_COUNT

Count of assets with tag "Construction"

CONSTRUCTION_PHOTO_COUNT

Count of photos with tag "Construction"

CONSTRUCTION_TO_TOTAL_ASSET_RATIO

Count of Images with tag "Construction" / Total Assets

ALL_LADDERS_COUNT

Count of assets tagged with "Ladder", "Folding Ladder", "Extension Ladder", "Site Ladder"

LADDER_COUNT

Count of assets tagged with "Ladder"

FOLDING_LADDER_COUNT

Count of Folding Ladders

EXTENSION_LADDER_COUNT

Count of Extension Ladders

SITE_LADDER_COUNT

Count of Site Ladders

ALL_LIFTS_COUNT

Count of assets tagged with "Boom Lift", "Scissor Lift"

BOOM_LIFT_COUNT

Count of Boom lifts

SCISSOR_LIFT_COUNT

Count of Scissor lifts

SCAFFOLDING_COUNT

Count of Scaffolding

WAH_PER_HUNDRED_CONSTRUCTION

Count of Work at Height per 100 construction photos

LADDER_TO_LIFT_RATIO

Ladder-to-Lift Ratio

HOUSEKEEPING_AND_STANDING_WATER_PER_HUNDRED_CONSTRUCTION

Count of Housekeeping & Standing Water per 100 construction photos

HOUSEKEEPING_PER_HUNDRED_CONSTRUCTION

Count of Housekeeping per 100 construction photos

STANDING_WATER_PER_HUNDRED_CONSTRUCTION

Count of Standing Water per 100 construction photos

PERSONS_PER_HUNDRED_CONSTRUCTION

Count of Persons per 100 construction photos

AVERAGE_PPE

Average PPE Compliance

PERSON_COUNT

Count of assets tagged with "Person"

PPE_INCIDENT_COUNT

Count of assets tagged with "No Glasses", "No Gloves", "No Hard Hat", "No Hi-Vis"

GLASSES_COMPLIANCE

Glasses Compliance (values 0-1)

GLOVE_COMPLIANCE

Gloves Compliance (values 0-1)

HARD_HAT_COMPLIANCE

Hard Hat Compliance (values 0-1)

HI_VIS_COMPLIANCE

Hi-Vis Compliance (values 0-1)

GLASSES_INCIDENT_COUNT

Count of assets tagged with "No Glasses"

GLOVE_INCIDENT_COUNT

Count of assets tagged with "No Gloves"

HARD_HAT_INCIDENT_COUNT

Count of assets tagged with "No Hard Hat"

HI_VIS_INCIDENT_COUNT

Count of assets tagged with "No Hi-Vis"

AVG_CREATED_PER_DAY

Average number of assets created per day

AVG_CREATED_BY_DAY_OF_WEEK

Average number of assets created by day of week

AVG_DIFFERENCE_CREATED_UPLOADED

Average lag of uploading

PERCENT_OF_ASSETS_WITH_NO_CREATED_DATE

Percentage of photos with no created date

PERCENT_OF_CONSTRUCTION_ASSETS_WITH_NO_CREATED_DATE

Percentage of construction photos with no created date

PERSON_COVERAGE_PERCENT

Percentage of photos with people

PERCENT_FIT_OUT

Percentage of fit-out photos

PERCENT_FINISH_DETAIL

Percentage of Finish Detail photos

CONSTRUCTION_ACTIVITY_COUNT

Count of photos with Construction Activity tags in them

PROJECT_SCORE

Project’s overall weighted safety score as compared to other projects in organization

PERCENT_OF_PEOPLE_IN_GROUP

Percentage of assets with "Person in Group" tag

PEOPLE_IN_GROUP_COUNT

Count of assets with "Person in Group" tag

PERSON_AT_HEIGHT_PER_HUNDRED_CONSTRUCTION

Count of "person at height" tags per 100 construction photos

FACE_MASK_INCIDENT_COUNT

Count of instances without face mask

ASSETS_WITH_PEOPLE_COUNT

Count of images with people in them

FACE_MASK_COMPLIANCE

Face mask Compliance

Observation Metrics

OBSERVATION_COUNT_TOTAL

Count of total observations

OBSERVATION_COUNT_BY_TYPE

Count of observations by type (POSITIVE, RISK)

OBSERVATION_POSITIVE_TO_RISK_RATIO

Positive-to-Risk Observation Ratio

OBSERVATION_RISK_COUNT_BY_HAZARD_CATEGORY

Count of risk observations by Hazard Category

OBSERVATION_POSITIVE_COUNT_BY_HAZARD_CATEGORY

Count of positive observations by Hazard Category

OBSERVATION_RISK_COUNT_BY_IDENTIFICATION_METHOD

Count of risk observations by Identification Method

OBSERVATION_POSITIVE_COUNT_BY_IDENTIFICATION_METHOD

Count of positive observations by Identification Method

OBSERVATION_RISK_COUNT_BY_RISK_BAND

Count of risk observations by Risk Band

OBSERVATION_RISK_COUNT_OPEN_BY_RISK_BAND

Count of currently open observations of type "Risk", grouped by Risk band (very similar to OBSERVATION_RISK_COUNT_OPEN_BY_STATUS)

OBSERVATION_RISK_COUNT_BY_RISK_SCORE

Count of risk observations by Risk Score (1 - 25)

OBSERVATION_RISK_AVERAGE_RISK_SCORE

Average Risk Score for risk observations

OBSERVATION_RISK_MAXIMUM_RISK_SCORE

Maximum Risk Score for risk observations

OBSERVATION_GREAT_CATCH_COUNT_TOTAL

Count of the total number of observations marked as Great Catch

OBSERVATION_GREAT_CATCH_COUNT_BY_TYPE

Count of observations by type (POSITIVE, RISK) marked as Great Catch

OBSERVATION_RISK_GREAT_CATCH_AVERAGE_RISK_SCORE

Average Risk Score for risk observations marked as Great Catch

OBSERVATION_COUNT_OPEN_BY_TYPE

Count of open observations by type (POSITIVE, RISK)

OBSERVATION_COUNT_CLOSED_BY_TYPE

Count of closed observations by type (POSITIVE, RISK)

OBSERVATION_RISK_COUNT_OPEN_BY_STATUS

Count of risk observations by status

OBSERVATION_POSITIVE_COUNT_OPEN_BY_STATUS

Count of positive observations by status

OBSERVATION_RISK_AVERAGE_DAYS_OPEN

Number of average days open - for risk observations

OBSERVATION_RISK_AVERAGE_DAYS_OPEN_BY_RISK_BAND

Number of average days open by Risk Band - for risk observations

OBSERVATION_RISK_AVERAGE_DAYS_IT_TOOK_TO_CLOSE

Number of average days it took to close a risk observation opened in a non-Closed state

OBSERVATION_RISK_AVERAGE_DAYS_IT_TOOK_TO_CLOSE_BY_RISK_BAND

Number of average days it took to close a risk observation opened in a non-Closed state grouped by risk band

OBSERVATION_RISK_COUNT_PAST_DUE

Count of past due observations - for risk observations

OBSERVATION_RISK_COUNT_PAST_DUE_BY_RISK_BAND

Count of past due observations - for risk observations, grouped by risk band

OBSERVATION_RISK_AVERAGE_DAYS_LATENESS_FOR_PAST_DUE

Average lateness in days for past due observations - for risk observations

OBSERVATION_RISK_AVERAGE_DAYS_LATENESS_FOR_PAST_DUE_BY_RISK_BAND

Average lateness in days for past due observations - for risk observations, grouped by risk band

OBSERVATION_COUNT_BY_CREATOR

Count of observations by its creator

OBSERVATION_COUNT_BY_CREATOR_AND_TYPE

Count of observations by its creator by observation types (POSITIVE, RISK)

OBSERVATION_COUNT_OF_UNIQUE_CREATORS

Count of unique observation creators

OBSERVATION_COUNT_OF_UNIQUE_ASSIGNEES

Count of unique observation assignees

Get Metrics API

Returns a batch of metrics data. The API enables you to get multiple metric types and date ranges in a single request.

HTTP request
POST /api/v1/metrics/batch-get HTTP/1.1
Content-Type: application/json
Host: api-public.smartvid.io
Content-Length: 6187

{
  "organizationId" : "adfdb0d2-1b1a-4adb-b654-7d28c5b54c85",
  "metricRequests" : [ {
    "objectType" : "ORGANIZATION_METRIC",
    "objectIds" : {
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_COUNT_TOTAL",
    "timeFrame" : "LAST_1",
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_COUNT_BY_TYPE",
    "timeFrame" : "ALL_TIME",
    "details" : {
      "observationType" : [ "NEGATIVE" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "ASSET_UPLOAD_COUNT",
    "timeFrame" : "LAST_1",
    "details" : {
      "assetType" : [ "IMAGE" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_GROUP_METRIC",
    "objectIds" : {
      "projectGroupId" : "f1cf7eb6-625a-4f86-848d-0d6b9d4361a9",
      "useExternalProjectId" : false
    },
    "metricName" : "TAG_INSTANCE_CREATION_COUNT",
    "timeFrame" : "LAST_30",
    "details" : {
      "tagType" : [ "MANUAL" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "ORGANIZATION_METRIC",
    "metricName" : "INTEGRATION_CREATED_COUNT",
    "timeFrame" : "LAST_7",
    "details" : {
      "integrationSourceType" : [ "BOX" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_RISK_COUNT_BY_RISK_SCORE",
    "timeFrame" : "LAST_1",
    "details" : {
      "riskScore" : [ "25" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "TRADE_PARTNER_METRIC",
    "objectIds" : {
      "tradePartnerId" : "2d013175-e7bc-4622-8582-84decae70059",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_RISK_COUNT_BY_RISK_BAND",
    "timeFrame" : "LAST_1",
    "details" : {
      "riskBand" : [ "HIGH" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_RISK_COUNT_OPEN_BY_STATUS",
    "timeFrame" : "LAST_1",
    "details" : {
      "observationStatus" : [ "NEW" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_RISK_COUNT_BY_HAZARD_CATEGORY",
    "timeFrame" : "LAST_1",
    "details" : {
      "hazardCategory" : [ "Chemical Safety" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_RISK_COUNT_BY_IDENTIFICATION_METHOD",
    "timeFrame" : "LAST_1",
    "details" : {
      "identificationMethod" : [ "AI Detected" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "TRADE_PARTNER_USER_METRIC",
    "objectIds" : {
      "userId" : "fe8c3e52-4bca-4d34-a62d-65385f8561bf",
      "tradePartnerId" : "2d013175-e7bc-4622-8582-84decae70059",
      "useExternalProjectId" : false
    },
    "metricName" : "OBSERVATION_COUNT_BY_CREATOR",
    "timeFrame" : "LAST_1",
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "ORGANIZATION_METRIC",
    "metricName" : "INTEGRATION_CREATED_COUNT",
    "timeFrame" : "LAST_7",
    "aggregationType" : "AVG",
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "CONSTRUCTION_ACTIVITY_COUNT",
    "timeFrame" : "LAST_1",
    "details" : {
      "constructionActivity" : [ "CONCRETE_POUR" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "ORGANIZATION_METRIC",
    "metricName" : "USER_CREATED_COUNT",
    "timeFrame" : "LAST_7",
    "details" : {
      "userContentSourceType" : [ "WWW" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "INTEGRATION_UPLOADER_EXTERNAL_USER_COUNT",
    "timeFrame" : "LAST_7",
    "details" : {
      "integrationType" : [ "PROCORE" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  }, {
    "objectType" : "PROJECT_METRIC",
    "objectIds" : {
      "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
      "useExternalProjectId" : false
    },
    "metricName" : "AVG_CREATED_BY_DAY_OF_WEEK",
    "timeFrame" : "LAST_1",
    "details" : {
      "dayOfWeek" : [ "THURSDAY" ]
    },
    "startDate" : "2020-05-03",
    "endDate" : "2020-05-03",
    "page" : 0,
    "pageSize" : 60
  } ]
}

The request body contains data with the following structure:

Table 97. Request body
Path Type Description

organizationId

String

The internal ID of the organization the projects belong to

metricRequests[].metricName

String

Metric name. See the list of Supported Metrics above

metricRequests[].objectType

String

Metric object type. All metrics are grouped by the following object types PROJECT_METRIC, PROJECT_GROUP_METRIC, ORGANIZATION_METRIC, TRADE_PARTNER_METRIC, PROJECT_USER_METRIC, PROJECT_GROUP_USER_METRIC, ORGANIZATION_USER_METRIC, TRADE_PARTNER_USER_METRIC. Find which object types and metrics can be queried together in the Metrics Details table

metricRequests[].objectIds

Object

List of identifiers for which the metric was calculated

metricRequests[].objectIds.projectId

String

The internal or external project ID. Mandatory for the following object types: PROJECT_METRIC, PROJECT_USER_METRIC

metricRequests[].objectIds.projectGroupId

String

The internal project group ID. Mandatory for the following object types: PROJECT_GROUP_METRIC, PROJECT_GROUP_USER_METRIC

metricRequests[].objectIds.userId

String

The internal user ID Mandatory for the following object types: PROJECT_USER_METRIC, PROJECT_GROUP_USER_METRIC, ORGANIZATION_USER_METRIC

metricRequests[].objectIds.tradePartnerId

String

The internal trade partner ID. Mandatory for the following object types: TRADE_PARTNER_METRIC, TRADE_PARTNER_USER_METRIC

metricRequests[].objectIds.useExternalProjectId

Boolean

Use the projectId field as the project ID in the external system

metricRequests[].timeFrame

String

Time frame for rolling window metrics. Can have one of the following values LAST_1, LAST_7, LAST_30, LAST_60, LAST_90, WEEK_TO_DATE, MONTH_TO_DATE, CALENDAR_MONTH, ALL_TIME

metricRequests[].startDate

String

The start date for the query in ISO8601 date format YYYY-MM-DD

metricRequests[].endDate

String

The end date for the query in ISO8601 date format YYYY-MM-DD

metricRequests[].page

Number

The page number

metricRequests[].pageSize

Number

Number of metrics per page. (default is 60)

metricRequests[].aggregationType

String

Optional type of results aggregation. Can have one of the following values AVG, SUM, MAX

metricRequests[].details

Object

Possible options for searching the metrics by its details. It’s optional. Find what details and metrics can be queried together in the Metrics Details table

metricRequests[].details.observationType

Array

Can have one of the following values: POSITIVE, NEGATIVE. Available for the following metrics: OBSERVATION_COUNT_BY_TYPE, OBSERVATION_COUNT_CLOSED_BY_TYPE, OBSERVATION_COUNT_BY_CREATOR_AND_TYPE, OBSERVATION_COUNT_OPEN_BY_TYPE, OBSERVATION_GREAT_CATCH_COUNT_BY_TYPE

metricRequests[].details.observationStatus

Array

Can have one of the following values: NEW, IN_PROGRESS, WITH_PARTNER, DELAYED, CLOSED, READY_TO_REVIEW, CLOSED_REVIEWED, OBSERVED, NOT_APPLICABLE. Available for the following metrics: OBSERVATION_POSITIVE_COUNT_OPEN_BY_STATUS, OBSERVATION_RISK_COUNT_OPEN_BY_STATUS

metricRequests[].details.hazardCategory

Array

The hazard category. Available for the following metrics: OBSERVATION_POSITIVE_COUNT_BY_HAZARD_CATEGORY, OBSERVATION_RISK_COUNT_BY_HAZARD_CATEGORY

metricRequests[].details.identificationMethod

Array

The method of identification. Available for the following metrics: OBSERVATION_POSITIVE_COUNT_BY_IDENTIFICATION_METHOD, OBSERVATION_RISK_COUNT_BY_IDENTIFICATION_METHOD

metricRequests[].details.riskScore

Array

This is a risk score. Value from 1 to 25. Available for the following metrics: OBSERVATION_RISK_COUNT_BY_RISK_SCORE

metricRequests[].details.riskBand

Array

Can have one of the following values: EXTREME, HIGH, MEDIUM, LOW. Available for the following metrics: OBSERVATION_RISK_COUNT_PAST_DUE_BY_RISK_BAND, OBSERVATION_RISK_COUNT_BY_RISK_BAND, OBSERVATION_RISK_AVERAGE_DAYS_IT_TOOK_TO_CLOSE_BY_RISK_BAND, OBSERVATION_RISK_AVERAGE_DAYS_OPEN_BY_RISK_BAND, OBSERVATION_RISK_AVERAGE_DAYS_LATENESS_FOR_PAST_DUE_BY_RISK_BAND, OBSERVATION_RISK_COUNT_OPEN_BY_RISK_BAND

metricRequests[].details.assetType

Array

Can have one of the following values: TOTAL, VIDEO, IMAGE, IMAGE_AUDIO, SPHERICAL_IMAGE, OTHER. Available for the following metrics: USER_ASSET_CREATED_COUNT, ASSET_UPLOAD_COUNT

metricRequests[].details.tagType

Array

Can have one of the following values: TOTAL, MANUAL, ASR, IMREC, INTEGRATION. Available for the following metrics: USER_TAG_INSTANCE_CREATION_COUNT, TAG_INSTANCE_CREATION_COUNT

metricRequests[].details.integrationSourceType

Array

Can have one of the following values: TOTAL, SHAREPOINT, PROCORE, BIM360_FIELD, EGNYTE, FORGE, FORGE_ISSUE, OXBLUE, PLANGRID, BOX, ACONEX. Available for the following metrics: INTEGRATION_CREATED_COUNT

metricRequests[].details.integrationType

Array

Can have one of the following values: TOTAL, PROCORE, BIM360_FIELD, EGNYTE, FORGE, FORGE_ISSUE, FORGE_CHECKLIST_INSTANCE, FORGE_ISSUE_CREATED, OXBLUE, PLANGRID, BOX, ACONEX. Available for the following metrics: INTEGRATION_UPLOADER_EXTERNAL_USER_COUNT

metricRequests[].details.userContentSourceType

Array

Can have one of the following values: TOTAL, UNKNOWN, WWW, ANDROID, IOS, API. Available for the following metrics: USER_CREATED_COUNT

metricRequests[].details.constructionActivity

Array

Can have one of the following values: CONCRETE_POUR, DEMOLITION, EXCAVATION, FOUNDATION, MEP, TRENCH_WORK. Available for the following metrics: CONSTRUCTION_ACTIVITY_COUNT

metricRequests[].details.dayOfWeek

Array

Can have one of the following values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. Available for the following metrics: AVG_CREATED_BY_DAY_OF_WEEK

HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1808

{
  "metrics" : [ {
    "metricName" : "OBSERVATION_COUNT_TOTAL",
    "timeFrame" : "LAST_1",
    "value" : 10.0,
    "metricDate" : "2020-05-03",
    "version" : "1.0.0",
    "organizationId" : "adfdb0d2-1b1a-4adb-b654-7d28c5b54c85",
    "objectType" : "ORGANIZATION_METRIC"
  }, {
    "metricName" : "OBSERVATION_COUNT_BY_TYPE",
    "timeFrame" : "ALL_TIME",
    "details" : "NEGATIVE",
    "value" : 10.0,
    "metricDate" : "2020-05-03",
    "version" : "1.0.0",
    "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
    "objectType" : "PROJECT_METRIC"
  }, {
    "metricName" : "TAG_INSTANCE_CREATION_COUNT",
    "timeFrame" : "LAST_30",
    "details" : "MANUAL",
    "value" : 10.0,
    "metricDate" : "2020-05-03",
    "version" : "1.0.1",
    "projectGroupId" : "f1cf7eb6-625a-4f86-848d-0d6b9d4361a9",
    "objectType" : "PROJECT_GROUP_METRIC"
  }, {
    "metricName" : "TAG_INSTANCE_CREATION_COUNT",
    "timeFrame" : "LAST_30",
    "details" : "MANUAL",
    "value" : 99.0,
    "metricDate" : "2020-05-03",
    "version" : "1.0.1",
    "aggregationType" : "AVG",
    "projectGroupId" : "f1cf7eb6-625a-4f86-848d-0d6b9d4361a9",
    "objectType" : "PROJECT_GROUP_METRIC"
  }, {
    "metricName" : "OBSERVATION_COUNT_BY_CREATOR",
    "timeFrame" : "LAST_1",
    "value" : 10.0,
    "metricDate" : "2020-05-03",
    "version" : "1.0.0",
    "tradePartnerId" : "2d013175-e7bc-4622-8582-84decae70059",
    "userId" : "fe8c3e52-4bca-4d34-a62d-65385f8561bf",
    "objectType" : "TRADE_PARTNER_USER_METRIC"
  }, {
    "metricName" : "CONSTRUCTION_ACTIVITY_COUNT",
    "timeFrame" : "LAST_1",
    "details" : "CONCRETE_POUR",
    "value" : 10.0,
    "metricDate" : "2020-05-03",
    "version" : "1.0.1",
    "projectId" : "2348f8b5-68f2-49f5-8433-ef834c5bb04f",
    "objectType" : "PROJECT_METRIC"
  } ]
}

If successful, the response body contains data with the following structure:

Table 98. Response body
Path Type Description

metrics[].metricName

String

Metric name. See the list of Supported Metrics above

metrics[].objectType

String

Metric object type. Can have one of the following values PROJECT_METRIC, PROJECT_GROUP_METRIC, ORGANIZATION_METRIC, TRADE_PARTNER_METRIC, PROJECT_USER_METRIC, PROJECT_GROUP_USER_METRIC, ORGANIZATION_USER_METRIC, TRADE_PARTNER_USER_METRIC

metrics[].timeFrame

String

Time frame for rolling window metricsCan have one of the following values LAST_1, LAST_7, LAST_30, LAST_60, LAST_90, WEEK_TO_DATE, MONTH_TO_DATE, CALENDAR_MONTH, ALL_TIME

metrics[].value

Number

Metric value

metrics[].details

String

Metric details. See Metrics Details table

metrics[].metricDate

String

The date for which the metric was calculated (in ISO8601 format YYYY-MM-DD)

metrics[].version

String

Metric version

metrics[].projectId

String

The internal project ID

metrics[].projectGroupId

String

The internal project group ID

metrics[].organizationId

String

The internal organization ID

metrics[].tradePartnerId

String

The internal trade partner ID

metrics[].aggregationType

String

Type of results aggregation. Can have one of the following values , [Lio.smartvid.model.metrics.MetricAggregationType;@25d0f2c6

metrics[].userId

String

The internal user ID

Not all object types and metrics can be requested together. Refer to the following table for object types, details, and time periods corresponding to which metrics.

Table 99. Metrics Details
Metric Name Object Types Time Frames Details

Activity Metrics

ASSET_UPLOAD_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

assetType

ASSET_CREATED_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

assetType

AVG_UPLOAD_PER_DAY

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

TAG_INSTANCE_CREATION_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

tagType

UPLOADER_USER_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

ACTIVE_USER_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

INTEGRATION_CREATED_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

contentSourceType

USER_CREATED_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

contentSourceType

INTEGRATION_UPLOADER_EXTERNAL_USER_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

integrationType

INTEGRATION_EXTERNAL_USER_ASSET_CREATED_COUNT

PROJECT_USER_METRIC,
PROJECT_GROUP_USER_METRIC,
ORGANIZATION_USER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

integrationType

USER_ASSET_CREATED_COUNT

PROJECT_USER_METRIC,
PROJECT_GROUP_USER_METRIC,
ORGANIZATION_USER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

assetType

USER_TAG_INSTANCE_CREATION_COUNT

PROJECT_USER_METRIC,
PROJECT_GROUP_USER_METRIC,
ORGANIZATION_USER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

tagType

USER_COMMENT_COUNT

PROJECT_USER_METRIC,
PROJECT_GROUP_USER_METRIC,
ORGANIZATION_USER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

Safety Metrics

CONSTRUCTION_ASSET_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

CONSTRUCTION_PHOTO_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

CONSTRUCTION_TO_TOTAL_ASSET_RATIO

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

ALL_LADDERS_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

LADDER_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

FOLDING_LADDER_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

EXTENSION_LADDER_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

SITE_LADDER_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

ALL_LIFTS_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

BOOM_LIFT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

SCISSOR_LIFT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

SCAFFOLDING_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

WAH_PER_HUNDRED_CONSTRUCTION

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

LADDER_TO_LIFT_RATIO

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

HOUSEKEEPING_AND_STANDING_WATER_PER_HUNDRED_CONSTRUCTION

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

HOUSEKEEPING_PER_HUNDRED_CONSTRUCTION

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

STANDING_WATER_PER_HUNDRED_CONSTRUCTION

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERSONS_PER_HUNDRED_CONSTRUCTION

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

AVERAGE_PPE

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERSON_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PPE_INCIDENT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

GLASSES_COMPLIANCE

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

GLOVE_COMPLIANCE

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

HARD_HAT_COMPLIANCE

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

HI_VIS_COMPLIANCE

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

FACE_MASK_COMPLIANCE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

FACE_MASK_INCIDENT_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

ASSETS_WITH_PEOPLE_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

GLASSES_INCIDENT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

GLOVE_INCIDENT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

HARD_HAT_INCIDENT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

HI_VIS_INCIDENT_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

AVG_CREATED_PER_DAY

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

AVG_CREATED_BY_DAY_OF_WEEK

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

dayOfWeek

AVG_DIFFERENCE_CREATED_UPLOADED

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERCENT_OF_ASSETS_WITH_NO_CREATED_DATE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERCENT_OF_CONSTRUCTION_ASSETS_WITH_NO_CREATED_DATE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERSON_COVERAGE_PERCENT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERCENT_FIT_OUT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERCENT_FINISH_DETAIL

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

CONSTRUCTION_ACTIVITY_COUNT

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

constructionActivity

PROJECT_SCORE

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERCENT_OF_PEOPLE_IN_GROUP

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PEOPLE_IN_GROUP_COUNT

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

PERSON_AT_HEIGHT_PER_HUNDRED_CONSTRUCTION

PROJECT_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

Observation Metrics

OBSERVATION_COUNT_TOTAL

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_COUNT_BY_TYPE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationType

OBSERVATION_POSITIVE_TO_RISK_RATIO

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_RISK_COUNT_BY_HAZARD_CATEGORY

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

hazardCategory

OBSERVATION_POSITIVE_COUNT_BY_HAZARD_CATEGORY

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

hazardCategory

OBSERVATION_RISK_COUNT_BY_IDENTIFICATION_METHOD

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

identificationMethod

OBSERVATION_POSITIVE_COUNT_BY_IDENTIFICATION_METHOD

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

identificationMethod

OBSERVATION_RISK_COUNT_OPEN_BY_RISK_BAND

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskType

OBSERVATION_RISK_COUNT_BY_RISK_BAND

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskType

OBSERVATION_RISK_COUNT_BY_RISK_SCORE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskScore

OBSERVATION_RISK_AVERAGE_RISK_SCORE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_RISK_MAXIMUM_RISK_SCORE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_GREAT_CATCH_COUNT_TOTAL

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_GREAT_CATCH_COUNT_BY_TYPE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationType

OBSERVATION_RISK_GREAT_CATCH_AVERAGE_RISK_SCORE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_COUNT_OPEN_BY_TYPE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationType

OBSERVATION_COUNT_CLOSED_BY_TYPE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationType

OBSERVATION_RISK_COUNT_OPEN_BY_STATUS

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationStatus

OBSERVATION_POSITIVE_COUNT_OPEN_BY_STATUS

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationStatus

OBSERVATION_RISK_AVERAGE_DAYS_OPEN

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_RISK_AVERAGE_DAYS_OPEN_BY_RISK_BAND

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskType

OBSERVATION_RISK_AVERAGE_DAYS_IT_TOOK_TO_CLOSE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_RISK_AVERAGE_DAYS_IT_TOOK_TO_CLOSE_BY_RISK_BAND

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskType

OBSERVATION_RISK_COUNT_PAST_DUE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_RISK_COUNT_PAST_DUE_BY_RISK_BAND

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskType

OBSERVATION_RISK_AVERAGE_DAYS_LATENESS_FOR_PAST_DUE

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_RISK_AVERAGE_DAYS_LATENESS_FOR_PAST_DUE_BY_RISK_BAND

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationRiskType

OBSERVATION_COUNT_BY_CREATOR

PROJECT_USER_METRIC,
PROJECT_GROUP_USER_METRIC,
ORGANIZATION_USER_METRIC,
TRADE_PARTNER_USER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_COUNT_BY_CREATOR_AND_TYPE

PROJECT_USER_METRIC,
PROJECT_GROUP_USER_METRIC,
ORGANIZATION_USER_METRIC,
TRADE_PARTNER_USER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

observationType

OBSERVATION_COUNT_OF_UNIQUE_CREATORS

PROJECT_METRIC,
PROJECT_GROUP_METRIC,
ORGANIZATION_METRIC,
TRADE_PARTNER_METRIC

ALL_TIME, LAST_1, LAST_7, LAST_30, LAST_60, LAST_90

OBSERVATION_COUNT_OF_UNIQUE_ASSIGNEES