This endpoint is used to create objects in EPC. This can apply to different scenarios of importing, synchronizing (1-way and 2-way) data from an external system into EPC, like:

  • Importing a set of folders and object
  • Synchronizing through an integrated script in the external system (you will need the update endpoint as well)
  • Sending data from a webhook to create an object (like our Jira integration)
  • And more…

Here are some code examples:

Create a process from a list of tasks

In this example, we’ll create this Development Process, with 3 tasks:

1. Create the Process

POST http://myepc.interfacing.com/api/v1/items?draft=true

10:42:51.655 request:
1 > POST http://myepc.interfacing.com/api/v1/items?draft=true
1 > Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
1 > X-Cache-Control: private
1 > Content-Type: application/json; charset=UTF-8
1 > Content-Length: 128
1 > Host: myepc.interfacing.com
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.15)
1 > Accept-Encoding: gzip,deflate
{
  "parent": {
    "nodeId": "0D6AF657-0C16-04E4-50BB-19E9A9D0FCBC"
  },
  "@type": "Process",
  "name": "Development Process",
  "nodeType": "PROCESS"
}

Response

10:42:51.745 response time in milliseconds: 89
1 < 200
1 < Server: nginx/1.21.6
1 < Date: Tue, 28 Jun 2022 14:42:51 GMT
1 < Content-Type: application/json
1 < X-Varnish: 590197
1 < Age: 0
1 < Via: 1.1 varnish (Varnish/7.1)
1 < Connection: keep-alive
1 < Transfer-Encoding: chunked
{
  "nodeSubTypeName": null,
  "userNodeSubType": null,
  "@type": "BaseElement",
  "nodeVersionId": "BF3A6E68-F79B-4CF8-9236-D7894044B657",
  "nodeType": "PROCESS",
  "creationDate": "2022-06-28T10:42:51.680-04:00",
  "nodeStatus": "IN_PROGRESS",
  "publishedNodeVersionId": null,
  "version": "0.0001",
  "nodeSubType": null,
  "modificationDate": "2022-06-28T10:42:51.680-04:00",
  "extensions": null,
  "deleted": false,
  "system": false,
  "referenceNumber": null,
  "name": "Development Process",
  "locked": false,
  "nodeId": "C9A2E210-BD57-4096-B107-EB79C9920500",
  "favorite": false
}

2. Add all tasks (nodes) to the process

POST http://myepc.interfacing.com/api/v1/process/nodes?process=C9A2E210-BD57-4096-B107-EB79C9920500&draft=true

10:42:51.756 request:
2 > POST http://myepc.interfacing.com/api/v1/process/nodes?process=C9A2E210-BD57-4096-B107-EB79C9920500&draft=true
2 > Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
2 > X-Cache-Control: private
2 > Content-Type: application/json; charset=UTF-8
2 > Content-Length: 937
2 > Host: myepc.interfacing.com
2 > Connection: Keep-Alive
2 > User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.15)
2 > Accept-Encoding: gzip,deflate
[
  {
    "sequenceNumber": 1,
    "topLeftY": 50,
    "topLeftX": 100,
    "@type": "TaskNode",
    "name": "Write Requirements",
    "width": 100,
    "edges": [
      {
        "sourceNodeId": "74e574e5-4777-425d-8588-576388fc94e2",
        "sourcePortPoint": {
          "x": 25,
          "y": 15
        },
        "targetNodeId": "a50b686e-d3a8-40db-be9e-fa216d040c26",
        "targetPortPoint": {
          "x": 75,
          "y": 20
        }
      }
    ],
    "editId": "74e574e5-4777-425d-8588-576388fc94e2",
    "nodeType": "TASK",
    "height": 50
  },
  {
    "sequenceNumber": 2,
    "topLeftY": 50,
    "topLeftX": 300,
    "@type": "TaskNode",
    "name": "Code Application",
    "width": 100,
    "edges": [
      {
        "sourceNodeId": "a50b686e-d3a8-40db-be9e-fa216d040c26",
        "sourcePortPoint": {
          "x": 125,
          "y": 15
        },
        "targetNodeId": "1486400e-30e7-4ce8-a944-78b382dcaee4",
        "targetPortPoint": {
          "x": 175,
          "y": 20
        }
      }
    ],
    "editId": "a50b686e-d3a8-40db-be9e-fa216d040c26",
    "nodeType": "TASK",
    "height": 50
  },
  {
    "sequenceNumber": 3,
    "topLeftY": 50,
    "topLeftX": 500,
    "@type": "TaskNode",
    "name": "Integration Tests",
    "width": 100,
    "editId": "1486400e-30e7-4ce8-a944-78b382dcaee4",
    "nodeType": "TASK",
    "height": 50
  }
]

Response

10:42:52.139 response time in milliseconds: 383
2 < 200
2 < Server: nginx/1.21.6
2 < Date: Tue, 28 Jun 2022 14:42:52 GMT
2 < Content-Type: application/json
2 < X-Varnish: 526213
2 < Age: 0
2 < Via: 1.1 varnish (Varnish/7.1)
2 < Connection: keep-alive
2 < Transfer-Encoding: chunked
[
  {
    "nodeSubTypeName": null,
    "userNodeSubType": null,
    "@type": "BaseElement",
    "nodeVersionId": "E6775E5C-08B5-4A1F-8717-9C1438E3929C",
    "editId": "74e574e5-4777-425d-8588-576388fc94e2",
    "nodeType": "TASK",
    "creationDate": "2022-06-28T10:42:51.847-04:00",
    "nodeStatus": "IN_PROGRESS",
    "publishedNodeVersionId": null,
    "version": "0.0002",
    "nodeSubType": null,
    "modificationDate": "2022-06-28T10:42:51.847-04:00",
    "extensions": null,
    "deleted": false,
    "system": false,
    "referenceNumber": null,
    "name": "Write Requirements",
    "locked": false,
    "nodeId": "5E8D7B08-74A4-43B4-B6F2-BD288448BEAE",
    "favorite": false
  },
  {
    "nodeSubTypeName": null,
    "userNodeSubType": null,
    "@type": "BaseElement",
    "nodeVersionId": "709D3C21-74CE-4BC0-BFCA-9102B923434D",
    "editId": "a50b686e-d3a8-40db-be9e-fa216d040c26",
    "nodeType": "TASK",
    "creationDate": "2022-06-28T10:42:51.897-04:00",
    "nodeStatus": "IN_PROGRESS",
    "publishedNodeVersionId": null,
    "version": "0.0002",
    "nodeSubType": null,
    "modificationDate": "2022-06-28T10:42:51.897-04:00",
    "extensions": null,
    "deleted": false,
    "system": false,
    "referenceNumber": null,
    "name": "Code Application",
    "locked": false,
    "nodeId": "9D58DB9B-611E-4A53-87C8-D0597DA8D7AB",
    "favorite": false
  },
  {
    "nodeSubTypeName": null,
    "userNodeSubType": null,
    "@type": "BaseElement",
    "nodeVersionId": "B1973029-DF12-49DA-8DF3-8FB53E8BC173",
    "editId": "1486400e-30e7-4ce8-a944-78b382dcaee4",
    "nodeType": "TASK",
    "creationDate": "2022-06-28T10:42:51.927-04:00",
    "nodeStatus": "IN_PROGRESS",
    "publishedNodeVersionId": null,
    "version": "0.0002",
    "nodeSubType": null,
    "modificationDate": "2022-06-28T10:42:51.927-04:00",
    "extensions": null,
    "deleted": false,
    "system": false,
    "referenceNumber": null,
    "name": "Integration Tests",
    "locked": false,
    "nodeId": "140222BF-3BC9-440B-9B4B-D21F0A1F826F",
    "favorite": false
  }
]

Create a Wiki document

PUT https://myepc.interfacing.com/api/v1/items?draft=true&language=en

{
  "@type": "Document",
  "nodeType": "DOCUMENT",
  "parent": {
    "nodeId": "98694AD2-F128-4352-88BE-90143BB75E69"
  },
  "url": "http://wiki.com",
  "name": "Reports",
  "referenceNumber": null,
  "documentType": "URL",
  "richTextDescription": "<html><body><p>Reports in Information Technology is the<strong>&nbsp;presentation of information in an organized and readable format as per the user&#39;s requirement</strong>&nbsp;is known as the report. Various complex reports can be generated that can help in taking decisions by the management. Report is the representation of data in printed form.</p>\n</body></html>"
}

Response

{
    "@type": "BaseElement",
    "nodeId": "1EE6744F-A8B1-4B1E-BC3B-C7B0827D042A",
    "nodeType": "DOCUMENT",
    "name": "Reports",
    "nodeVersionId": "340EEC26-8CE0-4DA0-8269-C129FF52E3FC",
    "version": "0.0001",
    "creationDate": "2022-06-13T18:53:31.877Z",
    "modificationDate": "2022-06-13T18:53:31.877Z",
    "nodeSubType": null,
    "nodeSubTypeName": null,
    "userNodeSubType": null,
    "nodeStatus": "IN_PROGRESS",
    "deleted": false,
    "locked": false,
    "system": false,
    "referenceNumber": null,
    "favorite": false,
    "publishedNodeVersionId": null,
    "extensions": null
}

CURL Example

curl --request POST --url 'http://myepc.interfacing.com/api/v1/items?draft=true' --header 'Content-Type: application/json' -b /tmp/cookie.tmp \
--data '{
  "@type": "Document",
  "nodeType": "DOCUMENT",
  "parent": {
    "nodeId": "98694AD2-F128-4352-88BE-90143BB75E69"
  },
  "url": "http://wiki.com",
  "name": "Reports",
  "referenceNumber": null,
  "documentType": "URL",
  "richTextDescription": "<html><body><p>Reports in Information Technology is the<strong>&nbsp;presentation of information in an organized and readable format as per the user&#39;s requirement</strong>&nbsp;is known as the report. Various complex reports can be generated that can help in taking decisions by the management. Report is the representation of data in printed form.</p>\n</body></html>"
}'

Create a document with a file attached


1. Upload the desired file to attach to the EPC document

To upload a file, you have to send a POST request containing the content of the file as the body. You must also provide a resumableIdentifier that can be any unique string that will be used to attach the uploaded file to the EPC document. It is possible to upload a file in multiple chunks but this example sends the whole file in one chunk (which should be appropriate most of the time). You must also provide the file’s name in resumableFilename and resumableRelativePath. To upload the file in a single chunk, you can set resumableChunkSize, resumableChunkNumber and resumableTotalSize to 1.

POST http://myepc.interfacing.com/bpc/upload/

15:35:04.960 request:
1 > POST http://myepc.interfacing.com/bpc/upload/?resumableIdentifier=55762fcc-c28b-4579-8afb-4141ba07bdf3&resumableFilename=Authoring%20Tools%20Comparison%20(1).xlsx&resumableRelativePath=Authoring%20Tools%20Comparison%20(1).xlsx&resumableChunkSize=1&resumableChunkNumber=1&resumableTotalSize=1
1 > Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
1 > Content-Type: text/plain; charset=UTF-8
1 > Content-Length: 16
1 > Host: myepc.interfacing.com
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.15)
1 > Accept-Encoding: gzip,deflate

Response

15:35:04.962 response time in milliseconds: 2
1 < 200
1 < Connection: keep-alive
1 < Content-Length: 0
1 < Date: Wed, 08 Jun 2022 19:35:04 GMT

2. Create an EPC Document of type file

When creating the EPC object, you must set fileInfo.uploadIdentifier and fileInfo.name to the resumableIdentifier and resumableFilename of the file previously uploaded.

POST http://myepc.interfacing.com/api/v1/items

15:35:04.967 request:
2 > POST http://myepc.interfacing.com/api/v1/items?draft=true
2 > Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
2 > Content-Type: application/json; charset=UTF-8
2 > Content-Length: 230
2 > Host: myepc.interfacing.com
2 > Connection: Keep-Alive
2 > User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.15)
2 > Accept-Encoding: gzip,deflate
{
  "parent": {
    "nodeId": "7BC41685-BD57-44F2-8807-0143FDFC619C"
  },
  "documentType": "FILE",
  "@type": "Document",
  "name": "Authoring Tools",
  "fileInfo": {
    "uploadIdentifier": "55762fcc-c28b-4579-8afb-4141ba07bdf3",
    "name": "Authoring Tools Comparison (1).xlsx"
  },
  "nodeType": "DOCUMENT"
}

Response

15:35:05.007 response time in milliseconds: 39
2 < 200
2 < Server: nginx/1.21.6
2 < Date: Wed, 08 Jun 2022 19:35:05 GMT
2 < Content-Type: application/json
2 < Content-Length: 507
2 < X-Varnish: 721243
2 < Age: 0
2 < Via: 1.1 varnish (Varnish/7.1)
2 < Connection: keep-alive
{
  "nodeSubTypeName": null,
  "userNodeSubType": null,
  "@type": "BaseElement",
  "nodeVersionId": "D6B0A34B-5C2C-4E1C-9F00-41BCCE09AE74",
  "nodeType": "DOCUMENT",
  "creationDate": "2022-06-08T15:35:04.977-04:00",
  "nodeStatus": "IN_PROGRESS",
  "publishedNodeVersionId": null,
  "version": "0.0001",
  "nodeSubType": null,
  "modificationDate": "2022-06-08T15:35:04.977-04:00",
  "extensions": null,
  "deleted": false,
  "system": false,
  "referenceNumber": null,
  "name": "Authoring Tools",
  "locked": false,
  "nodeId": "172CAE08-D725-49CD-BC39-3008FB394DD6",
  "favorite": false
}

CURL Example

curl --request POST --url 'http://myepc.interfacing.com/bpc/upload/?resumableIdentifier=55762fcc-c28b-4579-8afb-4141ba07bdf3&resumableFilename=Authoring%20Tools%20Comparison%20(1).xlsx&resumableRelativePath=Authoring%20Tools%20Comparison%20(1).xlsx&resumableChunkSize=1&resumableChunkNumber=1&resumableTotalSize=1' --data @Authoring\ Tools\ Comparison\ \(1\).xlsx -b /tmp/cookie.tmp
curl --request POST --url 'https://epcdev.interfacing.com/api/v1/items?draft=true' --header 'Content-Type: application/json' -b /tmp/cookie.tmp \
--data '{
  "parent": {
    "nodeId": "7BC41685-BD57-44F2-8807-0143FDFC619C"
  },
  "documentType": "FILE",
  "@type": "Document",
  "name": "Authoring Tools",
  "fileInfo": {
    "uploadIdentifier": "55762fcc-c28b-4579-8afb-4141ba07bdf3",
    "name": "Authoring Tools Comparison (1).xlsx"
  },
  "nodeType": "DOCUMENT"
}'

Technical Information

  • Endpoint URL: https://YOUREPC.interfacing.com/api/v1/items
  • Swagger URL: https://YOUREPC.interfacing.com/api/v1/swagger/#/Common/createItem

What is this feature in EPC?

EPC objects are the items or content stored in the Web App. They can be a set, a folder, or module-specific items, such as controls in the control module, indicators in the performance module, terms in the glossary module, and so on. In an EPC system, thousands of objects can be stored in different modules, depending on the size and business needs of your organization.

To know more about the “create object” feature, please click here.

Related Topics

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
Visit the Support Portal

Post Comment