curl --location --request POST 'https://app.hustro.com/api/v2/project//issue' \
--header 'hustro-client: web' \
--header 'hustro-client-version: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"process": "PROCESS_ENV",
"stage": "DRAFT",
"primaryData": {
"assignee": "5f479169f7ef7fe33b3cca36",
"contractNumbers": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"title": "string",
"description": "string",
"detectionDate": "2020-12-01T11:32:01+01:00",
"executor": "5f479169f7ef7fe33b3cca36",
"site": "5f479169f7ef7fe33b3cca36",
"level": "5f479169f7ef7fe33b3cca36",
"subcontractors": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"positionOnMap": {
"x": 0,
"y": 0
},
"targetAreas": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
],
"finalAreas": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
],
"selectedLocationType": "pin"
},
"extendedData": {
"costCode": "string",
"estimatedCost": [
{
"cost": 0,
"coveredBy": "5f479169f7ef7fe33b3cca36"
}
],
"finalCost": [
{
"outstanding": 0,
"settled": 0,
"coveredBy": "5f479169f7ef7fe33b3cca36"
}
],
"finalCompletionDate": "2020-12-01T11:32:01+01:00",
"targetCompletionDate": "2020-12-01T11:32:01+01:00",
"impact": "5f479169f7ef7fe33b3cca36",
"proposedCorrectiveAction": "5f479169f7ef7fe33b3cca36",
"rootCauses": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"solutionMethod": "string",
"solutionProposal": "string",
"subcontractorRepresentative": "string",
"workTypes": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"effect": "5f479169f7ef7fe33b3cca36",
"daysOfInabilityToWork": 0,
"personUnableToWork": "string",
"circumstances": "5f479169f7ef7fe33b3cca36",
"environmentalAspect": "5f479169f7ef7fe33b3cca36"
},
"inspection": "5f479169f7ef7fe33b3cca36",
"protocolItem": "5f479169f7ef7fe33b3cca36",
"mainImage": "5f479169f7ef7fe33b3cca36"
}'{
"documents": [
{
"description": "string",
"data": {
"bucketName": "hustro-documents-staging",
"documentType": "FILE",
"extension": "jpg",
"isDrawn": true,
"key": "client/635a7a1e1ed39332efecfd94/project/635a7a1e22eda9be81e7c88e/issue/63a2f0c5b3b49a3d8b7b5d42/event/63ac505fbbaa4ce8525afca8/document/63ac51e9bbaa4ce8525b04e9.jpg",
"name": "pexels-olga-lioncat-7245366",
"thumbnailKey": "client/635a7a1e1ed39332efecfd94/project/635a7a1e22eda9be81e7c88e/issue/63a2f0c5b3b49a3d8b7b5d42/event/63ac505fbbaa4ce8525afca8/document/63ac51e9bbaa4ce8525b04e9_thumbnail.jpg",
"type": "image/jpeg",
"uploadStatus": "SUCCESS",
"url": "string"
},
"deleted": true,
"_id": "5f479169f7ef7fe33b3cca36",
"createdAt": "2020-12-01T11:32:01+01:00",
"createdBy": "5f479169f7ef7fe33b3cca36",
"modifiedAt": "2020-12-01T11:32:01+01:00",
"modifiedBy": "5f479169f7ef7fe33b3cca36"
}
],
"hashtag": "da9b",
"inspection": "5f479169f7ef7fe33b3cca36",
"protocolItem": "5f479169f7ef7fe33b3cca36",
"userAccesses": [
{
"accessLevel": "EDIT",
"accessingUser": "5f479169f7ef7fe33b3cca36",
"deleted": true,
"_id": "5f479169f7ef7fe33b3cca36",
"createdAt": "2020-12-01T11:32:01+01:00",
"createdBy": "5f479169f7ef7fe33b3cca36",
"modifiedAt": "2020-12-01T11:32:01+01:00",
"modifiedBy": "5f479169f7ef7fe33b3cca36"
}
],
"events": [
{
"description": [
{
"type": "text",
"text": "some text"
}
],
"documents": [
{
"description": "string",
"data": {
"bucketName": "hustro-documents-staging",
"documentType": "FILE",
"extension": "jpg",
"isDrawn": true,
"key": "client/635a7a1e1ed39332efecfd94/project/635a7a1e22eda9be81e7c88e/issue/63a2f0c5b3b49a3d8b7b5d42/event/63ac505fbbaa4ce8525afca8/document/63ac51e9bbaa4ce8525b04e9.jpg",
"name": "pexels-olga-lioncat-7245366",
"thumbnailKey": "client/635a7a1e1ed39332efecfd94/project/635a7a1e22eda9be81e7c88e/issue/63a2f0c5b3b49a3d8b7b5d42/event/63ac505fbbaa4ce8525afca8/document/63ac51e9bbaa4ce8525b04e9_thumbnail.jpg",
"type": "image/jpeg",
"uploadStatus": "SUCCESS",
"url": "string"
},
"deleted": true,
"_id": "5f479169f7ef7fe33b3cca36",
"createdAt": "2020-12-01T11:32:01+01:00",
"createdBy": "5f479169f7ef7fe33b3cca36",
"modifiedAt": "2020-12-01T11:32:01+01:00",
"modifiedBy": "5f479169f7ef7fe33b3cca36"
}
],
"title": "string",
"deleted": true,
"_id": "5f479169f7ef7fe33b3cca36",
"createdAt": "2020-12-01T11:32:01+01:00",
"createdBy": "5f479169f7ef7fe33b3cca36",
"modifiedAt": "2020-12-01T11:32:01+01:00",
"modifiedBy": "5f479169f7ef7fe33b3cca36"
}
],
"deleted": true,
"_id": "5f479169f7ef7fe33b3cca36",
"createdAt": "2020-12-01T11:32:01+01:00",
"createdBy": "5f479169f7ef7fe33b3cca36",
"modifiedAt": "2020-12-01T11:32:01+01:00",
"modifiedBy": "5f479169f7ef7fe33b3cca36",
"process": "PROCESS_ENV",
"stage": "DRAFT",
"primaryData": {
"assignee": "5f479169f7ef7fe33b3cca36",
"contractNumbers": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"title": "string",
"description": "string",
"detectionDate": "2020-12-01T11:32:01+01:00",
"executor": "5f479169f7ef7fe33b3cca36",
"site": "5f479169f7ef7fe33b3cca36",
"level": "5f479169f7ef7fe33b3cca36",
"subcontractors": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"positionOnMap": {
"x": 0,
"y": 0
},
"targetAreas": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
],
"finalAreas": [
[
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 0
}
]
],
"selectedLocationType": "pin"
},
"extendedData": {
"costCode": "string",
"estimatedCost": [
{
"cost": 0,
"coveredBy": "5f479169f7ef7fe33b3cca36"
}
],
"finalCost": [
{
"outstanding": 0,
"settled": 0,
"coveredBy": "5f479169f7ef7fe33b3cca36"
}
],
"finalCompletionDate": "2020-12-01T11:32:01+01:00",
"targetCompletionDate": "2020-12-01T11:32:01+01:00",
"impact": "5f479169f7ef7fe33b3cca36",
"proposedCorrectiveAction": "5f479169f7ef7fe33b3cca36",
"rootCauses": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"solutionMethod": "string",
"solutionProposal": "string",
"subcontractorRepresentative": "string",
"workTypes": [
"5e417e81cc65ea28d1ff0fac",
"6396dfeca92a10590a6ada9b"
],
"effect": "5f479169f7ef7fe33b3cca36",
"daysOfInabilityToWork": 0,
"personUnableToWork": "string",
"circumstances": "5f479169f7ef7fe33b3cca36",
"environmentalAspect": "5f479169f7ef7fe33b3cca36"
},
"mainImage": "5f479169f7ef7fe33b3cca36"
}