SokoPro API (0.0.3)

Download OpenAPI specification:Download

This is a in progress documentation for SokoPro REST API.

Remarks:
- the endpoints of some download and upload operations have a different server providing streaming capabilities
- at some point, the integer type of id's (of projects, folders and files) will be deprecated in favor of string uuid's exclusively.

Authentication Resources

The authentication methods required for successful operation authentication.

Client to get access token

Can be used to get client_credentials or password_grant by defining grant_type to client_credentials or password_grant

Authorizations:
OAuth2
query Parameters
authorization_code (object) or client_credentials (object) or client_credentials_username_password (object) or password_grant (object)

Query parameters to be used for token request. It's recommended to use authorization_code. Other grant types are supported for previous users.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Authorize

Authorize client

Authorizations:
OAuth2
query Parameters
response_type
required
string
Value: "code"

For the moment supported response_type is code

client_id
required
string
Example: client_id=exampleclientid

Registered client identifier

redirect_uri
required
string
Example: redirect_uri=httpspreviously.requested.redirect.address.com

Client's redirection endpoint, which has been added to the client during client registration

scope
required
string
Value: "full_access"

For the moment only supported scope is full_access

state
required
string

State value from client

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Authorize

Authorize client

Authorizations:
OAuth2
query Parameters
response_type
required
string
Value: "code"

For the moment supported response_type is code

client_id
required
string

Registered client identifier

redirect_uri
required
string

Client's redirection endpoint, which has been added to the client during client registration

scope
required
string
Value: "full_access"

For the moment only supported scope is full_access

state
required
string

State value from client

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get information of current user

Specific information about the user

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "username": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "firstTimeLogin": false,
  • "company": "string",
  • "avatar": "string",
  • "hasAcceptedTerms": false,
  • "termsVersion": 0,
  • "language": [
    ],
  • "federated": false,
  • "level": "string"
}

Verify validity of the token

Check validity of current token

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": "string"
}

Project

Basic project resource specific operations.

List all projects what user has

List all projects what user has

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Information about single project

Get information about specific project

Authorizations:
BearerAuth
path Parameters
projectId
required
integer <int64>

Id of the project as integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "type": "string",
  • "projectId": 0,
  • "uuid": "string",
  • "rootFolderIdentifier": "string",
  • "rootFolder": "string",
  • "bookmarked": true,
  • "updatedAt": "string",
  • "visitedAt": "string",
  • "perm": 0,
  • "showPartiesTab": true,
  • "template": true,
  • "Author": {
    },
  • "createdAt": "string",
  • "deletedAt": "string"
}

Project metadata schema

Get project's metadata schema which is useful as an example when saving uploaded files

Authorizations:
BearerAuth
path Parameters
projectId
required
integer <int64>

Id of the project as integer

Responses

Response samples

Content type
application/json
{
  • "project_id": 0,
  • "metadata": [
    ],
  • "created_at": "string",
  • "updated_at": 0,
  • "deleted_at": 0
}

Copy project

End point which can be used to copy one project to a new project.

Usage of this endpoint is limited to customer admins and this is not available for normal users.

Authorizations:
BearerAuth
Request Body schema: application/json

Body will contain the information of the source template to be used and which data will be copied or not for the new project

type
string

Type of source project, only valid value for this is "TEMPLATE"

copyFrom
integer

Id of the source template project

projectName
string

New project name

projectDescription
string

New project desciption

folderStructure
boolean

Will the folder structure to be copied. This value must be true.

files
boolean

Will the files to be copied. This value must be true.

userGroups
boolean

Will the user groups to be copied. This value must be true.

users
boolean

Will the users to be copied. This value must be true.

Responses

Request samples

Content type
application/json
{
  • "type": "TEMPLATE",
  • "copyFrom": 0,
  • "projectName": "string",
  • "projectDescription": "string",
  • "folderStructure": true,
  • "files": true,
  • "userGroups": true,
  • "users": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "type": "string",
  • "uuid": "string",
  • "name": "string",
  • "rootFolderIdentifier": "string",
  • "rootFolder": 0,
  • "bookmarked": true,
  • "projectStatus": {
    },
  • "projectType": {
    },
  • "projectAdmins": [
    ],
  • "customerName": "string",
  • "template": true,
  • "description": "string",
  • "hasNotes": true,
  • "showPartiesTab": true,
  • "projectId": 0,
  • "updatedAt": 0,
  • "visitedAt": null,
  • "perm": 0,
  • "notes": "string",
  • "customer": {
    },
  • "author": {
    },
  • "billingInformations": [
    ],
  • "notifyFollowing": [
    ],
  • "createdAt": 0,
  • "conversionService": "string"
}

Folders and files

Basic operations related to folder and file resources.

List folder content

List the content of the folder. This endpoint can be used to list latest files in project as well

Authorizations:
BearerAuth
path Parameters
projectId
required
integer <int64>

Id of the project as integer

folderId
required
integer <int64>

Id of the folder as integer

query Parameters
toggleRecents
boolean

Toggle reacents option on or off

includeSubFolders
boolean

Determine if subfolders and their contents will be included or not

date
number

From date

dateTo
number

To date

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "node": {
    },
  • "path": [
    ],
  • "total": 0
}

Find revisions of given file

Return revision of the filer

Authorizations:
BearerAuth
path Parameters
fileId
required
integer <int64>

If of file as integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get latest revision of the given file

Return latest revision of requested file or error

Authorizations:
BearerAuth
path Parameters
fileUuid
required
string

fileUuid of the requested file

Responses

Response samples

Content type
application/json
{
  • "project": 0,
  • "projectUuid": "string",
  • "parentUuid": "string",
  • "description": "string",
  • "notifications": {
    },
  • "author": {
    },
  • "preview": {
    },
  • "id": 0,
  • "uuid": "string",
  • "file": 0,
  • "fileUuid": "string",
  • "name": "string",
  • "type": "string",
  • "bookmarked": true,
  • "parent": 0,
  • "version": 0,
  • "customMeta": [
    ]
}

Create folder

Creating folder is a two step process. Before one can create a folder, one must check it's existance.

Authorizations:
BearerAuth
Request Body schema: application/json
required
description
string

Folder description

name
required
string

Folder name

parent
required
number

Parent folder id

project
required
number

Project number

type
required
string
Value: "Folder"

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string",
  • "parent": 0,
  • "project": 0,
  • "type": "Folder"
}

Response samples

Content type
application/json
{
  • "project": 0,
  • "length": "string",
  • "projectUuid": "string",
  • "created_at": "string",
  • "description": "string",
  • "author": "string",
  • "parentUuid": "string",
  • "permissions": "READABLE",
  • "path": "string",
  • "notifications": {
    },
  • "hasSubFolders": true,
  • "newFolderPermission": "string",
  • "userPermission": "string",
  • "customMeta": {
    },
  • "customMetaUuid": "string",
  • "id": 0,
  • "uuid": "string",
  • "name": "string",
  • "type": "string",
  • "bookmarked": true,
  • "parent": 0
}

Delete folder or file

Delete one or multiple files or folders

Authorizations:
BearerAuth
Request Body schema:
id
required
Array of numbers

Responses

Request samples

Content type
Example
[
  • 0
]

Response samples

Content type
application/json
{
  • "data": 0
}

Fetch metadata

When used with file revisions or folders this resource will return metadata of the given items. Alternatively, when 'uuids' is a sessionUuid and type is 'SESSION' the resource will return the metadata of the upload session.

Authorizations:
BearerAuth
Request Body schema: application/json
required
uuids
required
Array of strings

List of file revisions, folders or session as uuid

type
required
string
Enum: "REVISION_OR_FOLDER" "SESSION"

Responses

Request samples

Content type
application/json
{
  • "uuids": [
    ],
  • "type": "REVISION_OR_FOLDER"
}

Response samples

Content type
application/json
{
  • "project": 0,
  • "projectUuid": "string",
  • "parentUuid": "string",
  • "description": "string",
  • "notifications": {
    },
  • "author": {
    },
  • "preview": {
    },
  • "id": 0,
  • "uuid": "string",
  • "file": 0,
  • "fileUuid": "string",
  • "name": "string",
  • "type": "string",
  • "bookmarked": true,
  • "parent": 0,
  • "version": 0,
  • "customMeta": [
    ]
}

Edit folder or file information

Edit folder or file information, can be used but not limited to rename or change description of selected item

Authorizations:
BearerAuth
path Parameters
id
required
number
Request Body schema:

Values should contain an object of key value pairs corresponding to the project meta data schema. In the example

file
required
number
required
object

Responses

Request samples

Content type
{
  • "file": 0,
  • "values": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "type": "string",
  • "name": "string",
  • "uuid": "string",
  • "bookmarked": true,
  • "parent": 0,
  • "parentUuid": "string",
  • "project": 0,
  • "projectUuid": "string",
  • "author": null,
  • "customMeta": [
    ],
  • "notifications": {
    },
  • "perm": 0,
  • "length": 0,
  • "meta": {
    }
}

Remove revision

Delete requested revision of a file. This can't be used to remove revision if there's only 1 revision, for that purposes one should use the other delete endpoint.

Authorizations:
BearerAuth
Request Body schema: application/json
uuid
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "uuid": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "uuid": "string",
  • "file": 0,
  • "fileUuid": "string",
  • "type": "string",
  • "bookmarked": true,
  • "parent": 0,
  • "parentUuid": "string",
  • "project": 0,
  • "projectUuid": "string",
  • "version": 0,
  • "author": {
    },
  • "customMeta": [
    ],
  • "notifications": {
    },
  • "prev": null,
  • "next": null,
  • "meta": {
    }
}

Move folders or files

Authorizations:
BearerAuth
Request Body schema: application/json

items which will be moved and the destination

uuids
required
Array of strings

folder or file uuids which will be moved

ignored
required
Array of strings
destination
required
string non-empty

folder uuid where items will be moved into

Responses

Request samples

Content type
application/json
{
  • "uuids": [
    ],
  • "ignored": [
    ],
  • "destination": "string"
}

Response samples

Content type
application/json
{
  • "message": true
}

Copy folders or files

Copy requested folders or files to the requested destination. In the case the destination contains folder or file with the same name the file will be revisioned and folder will be renamed with a number as an example if you are moving folder name "Example" and the destination already has that folder the copied folder will be renamed "Example (1)"

Authorizations:
BearerAuth
Request Body schema: application/json

items which will be copied and the destination

uuids
required
Array of strings
ignored
required
Array of strings
destination
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "uuids": [
    ],
  • "ignored": [
    ],
  • "destination": "string"
}

Response samples

Content type
application/json
{
  • "status": 0,
  • "message": true
}

Upload

Uploading file(s) requires multiple steps to complete the operation to get file(s) visible and usable.

Fetch metadata

When used with file revisions or folders this resource will return metadata of the given items. Alternatively, when 'uuids' is a sessionUuid and type is 'SESSION' the resource will return the metadata of the upload session.

Authorizations:
BearerAuth
Request Body schema: application/json
required
uuids
required
Array of strings

List of file revisions, folders or session as uuid

type
required
string
Enum: "REVISION_OR_FOLDER" "SESSION"

Responses

Request samples

Content type
application/json
{
  • "uuids": [
    ],
  • "type": "REVISION_OR_FOLDER"
}

Response samples

Content type
application/json
{
  • "project": 0,
  • "projectUuid": "string",
  • "parentUuid": "string",
  • "description": "string",
  • "notifications": {
    },
  • "author": {
    },
  • "preview": {
    },
  • "id": 0,
  • "uuid": "string",
  • "file": 0,
  • "fileUuid": "string",
  • "name": "string",
  • "type": "string",
  • "bookmarked": true,
  • "parent": 0,
  • "version": 0,
  • "customMeta": [
    ]
}

Create upload session

Creates an upload session which is used to upload a certain set of files. The upload session is treated as a single upload process.

Authorizations:
BearerAuth
Request Body schema: application/json
required
parentFolderUUID
required
string

The uuid of the parent folder

Responses

Request samples

Content type
application/json
{
  • "parentFolderUUID": "string"
}

Response samples

Content type
application/json
{
  • "created_at": 0,
  • "finished": 0,
  • "id": 0,
  • "parent": 0,
  • "pending": 0,
  • "project": "string",
  • "uuid": "string",
  • "author": {
    }
}

Get upload session

Get information about an upload session to verify pending and finished file uploads

Authorizations:
BearerAuth
path Parameters
sessionUuid
required
string

The uuid of the upload session

Responses

Response samples

Content type
application/json
{
  • "created_at": 0,
  • "finished": 0,
  • "id": 0,
  • "parent": 0,
  • "pending": 0,
  • "project": "string",
  • "uuid": "string",
  • "author": {
    }
}

Upload files

This operation uploads files. N.B. meta data needs to be set separately after succesful file upload to complete the full upload process.

Authorizations:
BearerAuth
header Parameters
Content-Type
required
string

application/offset+octet-stream

Content-Size
required
integer <int64>

The size of the content as an integer to be streamed.

Upload-Length
required
integer <int64>

The length as an integer of streamed octet.

Upload-Offset
required
integer <int64>

The offset of stream as an integer.

Upload-Metadata
required
string
Example: filename ZXhhbXBsZS5wZGY=,filetype YXBwbGljYXRpb24vcGRm,parent NTUw,project NTQ2,projectUuid ZDk5MjIzZjAtNDU3Yy00ZDBmLWJmNjktYmI2MmE4YTg4ODQx,parentUUID NWY1ZDY5OGEtYWQ3Ny00M2UyLTg0MWUtODQ3ZjI5YzQxOGY3,session NmJjMWM4NDQtYTA3Yi00MDRkLTg1MzMtZjI2YWEzNWE5NTJk,unzip ZmFsc2U=,replace ZmFsc2U=,file

This header describes some file meta data for system required processing purposes. The string value is a comma separated list of keys and base64 encoded values. Required keys: filename, filetype, parent, project, projectUuid, parentUUID, session, unzip, replace and file.

Request Body schema: application/offset+octet-stream
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "uuid": "string",
  • "file": {
    }
}

Complete upload session

Save the given upload session files with their corresponding provided meta data. Files will be available on files listing after they have been saved

Authorizations:
BearerAuth
Request Body schema: application/json
required
hierarchyType
required
string
Value: "SESSION"
sessionUuid
required
string

The uuid of the upload session

required
object

Dictionaries of file revision uuid's containing custom meta data objects

Responses

Request samples

Content type
application/json
{
  • "hierarchyType": "SESSION",
  • "sessionUuid": "string",
  • "metas": {
    }
}

Response samples

Content type
application/json
{
  • "created_at": 0,
  • "finished": 0,
  • "id": 0,
  • "parent": 0,
  • "pending": 0,
  • "project": "string",
  • "uuid": "string",
  • "author": {
    }
}

Check file existence

Before uploading a file, it's existence can be verified using this operation

Authorizations:
BearerAuth
Request Body schema: application/json
required
parent
required
number

Id of the project as integer

required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "parent": 0,
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "data": true
}

Download

Download operations are using streams thus separated to different API endpoint.

Download single revision

Stream of requested file

Authorizations:
BearerAuth
path Parameters
revisionUuid
required
string

Revision uuid to download

Responses

Download folder or multiple files

This resource offers download of multiple file(s) and/or folder(s). The content will be streamed as a compressed zip file.

Authorizations:
BearerAuth
path Parameters
generatedUrl
required
string

A pre-generated url part for the compressed zip

Responses

Generate URL part to download folders and/or multiple files

The offered resource to download multiple files and/or folders expects a pre-generated URL part. This endpoint generates that needed URL part.

Authorizations:
BearerAuth
Request Body schema: application/json
required
uuids
Array of strings

List of folder and/or files uuids

Responses

Request samples

Content type
application/json
{
  • "uuids": [
    ]
}

Response samples

Content type
application/json
{
  • "url": "string"
}

SokoSite

Operations related to SokoSite (Forms) feature

Fetch SokoSite forms

SokoSite forms of the project

Authorizations:
BearerAuth
path Parameters
projectId
required
integer <int64>

Id of the project as integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

SokoSite - Worksite diary

Operations related to worksite diaries under SokoSite feature

Fetch a worksite diary

Worksite diary info

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string

UUID of the worksite diary

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "diary_uuid": "string",
  • "project_uuid": "string",
  • "form_type": "string",
  • "name": "string",
  • "site_number": "string",
  • "perm": 0,
  • "usergroup_id": 0,
  • "created_at": "string",
  • "folder_id": 0,
  • "folder_uuid": "string"
}

Get all diaries

Fetches all worksite diaries

Authorizations:
BearerAuth
path Parameters
projectUuid
required
string

UUID of the project

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string

UUID of the diary

Request Body schema: application/json
required
diary_uuid
required
string
diary_date
required
string

Responses

Request samples

Content type
application/json
{
  • "diary_uuid": "string",
  • "diary_date": "2022-08-15T12:22:21+03:00"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "entry_uuid": "string",
  • "diary_uuid": "string",
  • "created_by": "string",
  • "diary_date": "string",
  • "updated_by": "string",
  • "deleted_at": 0,
  • "weather_info": {
    },
  • "plan_info": "string",
  • "review_info": 0,
  • "small_critical_changes": "string",
  • "change_offers": "string",
  • "additional_time": "string",
  • "supervisor_notes": "string",
  • "additional_notes": "string",
  • "employee_status": {
    },
  • "equipment_status": {
    },
  • "jobs": [
    ],
  • "comments": [
    ],
  • "other_notes": "string",
  • "master_signature": "string",
  • "supervisor_signature": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "ui_diary_date": "string",
  • "ui_created_at": "string",
  • "ui_updated_at": "string",
  • "workday": 0,
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "images_folder_uuid": "string",
  • "images_folder_id": 0,
  • "folder": {
    },
  • "images_folder": {
    },
  • "attachments": [
    ],
  • "images": [
    ],
  • "next_entry_uuid": "string",
  • "previous_entry_uuid": "string"
}

Fetch all entries

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string

UUID of the diary

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Fetch the entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "entry_uuid": "string",
  • "diary_uuid": "string",
  • "created_by": "string",
  • "diary_date": "string",
  • "updated_by": "string",
  • "deleted_at": 0,
  • "weather_info": {
    },
  • "plan_info": "string",
  • "review_info": 0,
  • "small_critical_changes": "string",
  • "change_offers": "string",
  • "additional_time": "string",
  • "supervisor_notes": "string",
  • "additional_notes": "string",
  • "employee_status": {
    },
  • "equipment_status": {
    },
  • "jobs": [
    ],
  • "comments": [
    ],
  • "other_notes": "string",
  • "master_signature": "string",
  • "supervisor_signature": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "ui_diary_date": "string",
  • "ui_created_at": "string",
  • "ui_updated_at": "string",
  • "workday": 0,
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "images_folder_uuid": "string",
  • "images_folder_id": 0,
  • "folder": {
    },
  • "images_folder": {
    },
  • "attachments": [
    ],
  • "images": [
    ],
  • "next_entry_uuid": "string",
  • "previous_entry_uuid": "string"
}

Update entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string
Request Body schema: application/json
required
id
required
number
entry_uuid
required
string
diary_uuid
required
string
created_by
required
string
diary_date
required
string
updated_by
string
deleted_at
number
object (Weather)
plan_info
string
review_info
number
small_critical_changes
string
change_offers
string
additional_time
string
supervisor_notes
string
additional_notes
string
object (EmployeeOrEquipment)
object (EmployeeOrEquipment)
Array of objects (Job)
Array of objects (Comment)
other_notes
string
master_signature
string
supervisor_signature
string
created_at
number
updated_at
number
ui_diary_date
string
ui_created_at
string
ui_updated_at
string
workday
number
folder_uuid
string
folder_id
number
images_folder_uuid
string
images_folder_id
number
object (Folder)
object (Folder)
Array of Revision (object) or Folder (object) (RevisionOrFolder)
Array of Revision (object) or Folder (object) (RevisionOrFolder)
next_entry_uuid
string
previous_entry_uuid
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "entry_uuid": "string",
  • "diary_uuid": "string",
  • "created_by": "string",
  • "diary_date": "string",
  • "updated_by": "string",
  • "deleted_at": 0,
  • "weather_info": {
    },
  • "plan_info": "string",
  • "review_info": 0,
  • "small_critical_changes": "string",
  • "change_offers": "string",
  • "additional_time": "string",
  • "supervisor_notes": "string",
  • "additional_notes": "string",
  • "employee_status": {
    },
  • "equipment_status": {
    },
  • "jobs": [
    ],
  • "comments": [
    ],
  • "other_notes": "string",
  • "master_signature": "string",
  • "supervisor_signature": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "ui_diary_date": "string",
  • "ui_created_at": "string",
  • "ui_updated_at": "string",
  • "workday": 0,
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "images_folder_uuid": "string",
  • "images_folder_id": 0,
  • "folder": {
    },
  • "images_folder": {
    },
  • "attachments": [
    ],
  • "images": [
    ],
  • "next_entry_uuid": "string",
  • "previous_entry_uuid": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "entry_uuid": "string",
  • "diary_uuid": "string",
  • "created_by": "string",
  • "diary_date": "string",
  • "updated_by": "string",
  • "deleted_at": 0,
  • "weather_info": {
    },
  • "plan_info": "string",
  • "review_info": 0,
  • "small_critical_changes": "string",
  • "change_offers": "string",
  • "additional_time": "string",
  • "supervisor_notes": "string",
  • "additional_notes": "string",
  • "employee_status": {
    },
  • "equipment_status": {
    },
  • "jobs": [
    ],
  • "comments": [
    ],
  • "other_notes": "string",
  • "master_signature": "string",
  • "supervisor_signature": "string",
  • "created_at": 0,
  • "updated_at": 0,
  • "ui_diary_date": "string",
  • "ui_created_at": "string",
  • "ui_updated_at": "string",
  • "workday": 0,
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "images_folder_uuid": "string",
  • "images_folder_id": 0,
  • "folder": {
    },
  • "images_folder": {
    },
  • "attachments": [
    ],
  • "images": [
    ],
  • "next_entry_uuid": "string",
  • "previous_entry_uuid": "string"
}

Delete entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "Bad Request"
}

Create a comment

Post a comment onto a entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string
Request Body schema: application/json
required
id
number
comment_uuid
string
entry_id
string
created_at
string
comment
string
object (User)
user_fullname
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "comment_uuid": "string",
  • "entry_id": "string",
  • "created_at": "string",
  • "comment": "string",
  • "user": {
    },
  • "user_fullname": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "comment_uuid": "string",
  • "entry_id": "string",
  • "created_at": "string",
  • "comment": "string",
  • "user": {
    },
  • "user_fullname": "string"
}

Fetch comments

Gets all comments for the entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update entry's jobs

Updates jobs and their statuses for the diary entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string
Request Body schema: application/json
required
Array
name
string
object (JobRevision)
id
number
job_uuid
string

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Fetch jobs

Gets all job statuses for the entry

Authorizations:
BearerAuth
path Parameters
worksiteDiaryUUID
required
string
worksiteDiaryEntryUUID
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

SokoSite - TR/MVR meter

Operations related to TR/MVR meters under SokoSite feature

Fetch a TR/MVR meter

TR/MVR meter info

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the meter

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "trmvrmeter_uuid": "string",
  • "project_uuid": "string",
  • "form_type": "string",
  • "name": "string",
  • "site_number": "string",
  • "perm": 0,
  • "usergroup_id": 0,
  • "created_at": 0,
  • "folder_id": 0,
  • "folder_uuid": "string"
}

Fetch all meters

Gets all TR/MVR meters for the project

Authorizations:
BearerAuth
path Parameters
projectUuid
required
string

UUID of the project

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post a new TR/MVR entry

Creates a new TR/MVR entry for the given date

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

Request Body schema: application/json
required
date
required
string

Date for which to create new entry

Responses

Request samples

Content type
application/json
{
  • "date": "2022-08-15T12:22:21+03:00"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "uuid": "string",
  • "trmeter_uuid": "string",
  • "date": "string",
  • "ui_date": "string",
  • "week_number": "string",
  • "draft": true,
  • "meter_type": "TRMETER",
  • "created_by": "string",
  • "ui_created_by": 0,
  • "measurements": [
    ],
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "employer_signature": "string",
  • "employee_signature": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "deleted_at": "string",
  • "remark_status": "string"
}

Fetch TR/MVR meter entry

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "uuid": "string",
  • "trmeter_uuid": "string",
  • "date": "string",
  • "ui_date": "string",
  • "week_number": "string",
  • "draft": true,
  • "meter_type": "TRMETER",
  • "created_by": "string",
  • "ui_created_by": 0,
  • "measurements": [
    ],
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "employer_signature": "string",
  • "employee_signature": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "deleted_at": "string",
  • "remark_status": "string"
}

Update entry

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

Request Body schema: application/json
required
id
required
number
uuid
string
trmeter_uuid
string
date
string
ui_date
string
week_number
string
draft
boolean
meter_type
string
Enum: "TRMETER" "MVRMETER"
created_by
string
ui_created_by
number
Array of objects (Measurement)
folder_uuid
required
string
folder_id
required
number
employer_signature
string
employee_signature
string
created_at
required
string
updated_at
string
deleted_at
string
remark_status
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "uuid": "string",
  • "trmeter_uuid": "string",
  • "date": "string",
  • "ui_date": "string",
  • "week_number": "string",
  • "draft": true,
  • "meter_type": "TRMETER",
  • "created_by": "string",
  • "ui_created_by": 0,
  • "measurements": [
    ],
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "employer_signature": "string",
  • "employee_signature": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "deleted_at": "string",
  • "remark_status": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "uuid": "string",
  • "trmeter_uuid": "string",
  • "date": "string",
  • "ui_date": "string",
  • "week_number": "string",
  • "draft": true,
  • "meter_type": "TRMETER",
  • "created_by": "string",
  • "ui_created_by": 0,
  • "measurements": [
    ],
  • "folder_uuid": "string",
  • "folder_id": 0,
  • "employer_signature": "string",
  • "employee_signature": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "deleted_at": "string",
  • "remark_status": "string"
}

Delete the entry

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

Responses

Response samples

Content type
application/json
{
  • "message": "Bad Request"
}

Fetch all entries

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new remark

Creates a new entry remark for the TR/MVR meter

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

Responses

Response samples

Content type
application/json
{
  • "entry_uuid": "string",
  • "created_by": 0,
  • "meter_type": "TRMETER"
}

Entry remark

Fetch entry remark

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

trmvrMeterEntryRemarkUUID
required
string

UUID of the entry remark

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "uuid": "string",
  • "entry_uuid": "string",
  • "created_by": {
    },
  • "confirmed_by": {
    },
  • "meter_type": "TRMETER",
  • "target": "string",
  • "remark": 0,
  • "responsible_company": 0,
  • "must_be_fixed_at": "string",
  • "additional_info": "string",
  • "confirmed_at": "string",
  • "confirmation_comment": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "image_folder_id": 0,
  • "image_folder_uuid": "string",
  • "image_folder": {
    },
  • "confirmation_image_folder_id": 0,
  • "confirmation_image_folder_uuid": "string",
  • "confirmation_image_folder": {
    },
  • "remark_status": "string"
}

Entry remarks

Fetch TR/MVR meter entry remarks

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update remark

Update existing TR/MVR entry remark

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

trmvrmeterEntryUUID
required
string

UUID of the entry

remarkUUID
required
string

UUID of the remark

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "uuid": "string",
  • "entry_uuid": "string",
  • "created_by": {
    },
  • "confirmed_by": {
    },
  • "meter_type": "TRMETER",
  • "target": "string",
  • "remark": 0,
  • "responsible_company": 0,
  • "must_be_fixed_at": "string",
  • "additional_info": "string",
  • "confirmed_at": "string",
  • "confirmation_comment": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "image_folder_id": 0,
  • "image_folder_uuid": "string",
  • "image_folder": {
    },
  • "confirmation_image_folder_id": 0,
  • "confirmation_image_folder_uuid": "string",
  • "confirmation_image_folder": {
    },
  • "remark_status": "string"
}

Fetch all remarks

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Fetch pending remarks

Fetches all TR/MVR meter remarks that haven't been confirmed

Authorizations:
BearerAuth
path Parameters
trmvrMeterUUID
required
string

UUID of the TR/MVR meter

Responses

Response samples

Content type
application/json
[
  • {
    }
]