Cet endpoint est utilisé pour créer des objets dans EPC. Cela peut s’appliquer à différents scénarios d’importation, de synchronisation (unidirectionnelle et bidirectionnelle) de données depuis un système externe dans EPC, comme :

  • Importer un ensemble de dossiers et d’objets
  • Synchroniser via un script intégré dans le système externe (vous aurez également besoin de l’endpoint de mise à jour)
  • Envoyer des données depuis un webhook pour créer un objet (comme notre intégration Jira)
  • Et plus encore…

Voici quelques exemples de code :

Créer un processus à partir d’une liste de tâches

Dans cet exemple, nous allons créer ce processus de développement, avec 3 tâches :

1. Créer le processus

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

10:42:51.655 request:
1 > POST http://votreepc.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: votreepc.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. Ajouter toutes les tâches (nœuds) au processus

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

10:42:51.756 request:
2 > POST http://votreepc.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: votreepc.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
  }
]

Réponse

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
  }
]

Créer un document Wiki

PUT https://votreepc.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>"
}

Réponse

{
    "@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
}

Exemple CURL

curl --request POST --url 'http://votreepc.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>"
}'

Créer un document avec un fichier joint


1. Téléchargez le fichier souhaité à attacher au document EPC

Pour télécharger un fichier, vous devez envoyer une requête POST contenant le contenu du fichier en tant que corps de la requête. Vous devez également fournir un resumableIdentifier qui peut être une chaîne unique qui sera utilisée pour attacher le fichier téléchargé au document EPC. Il est possible de télécharger un fichier en plusieurs morceaux, mais cet exemple envoie le fichier entier en un seul morceau (ce qui devrait être approprié la plupart du temps). Vous devez également fournir le nom du fichier dans resumableFilename et resumableRelativePath. Pour télécharger le fichier en un seul morceau, vous pouvez définir resumableChunkSize, resumableChunkNumber et resumableTotalSize sur 1.

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

15:35:04.960 request:
1 > POST http://votreepc.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: votreepc.interfacing.com
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.15)
1 > Accept-Encoding: gzip,deflate

Réponse

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. Créer un document EPC de type fichier

Lors de la création de l’objet EPC, vous devez définir fileInfo.uploadIdentifier et fileInfo.name sur resumableIdentifier et resumableFilename du fichier précédemment téléchargé.

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

15:35:04.967 request:
2 > POST http://votreepc.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: votreepc.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"
}

Réponse

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
}

Exemple CURL

curl --request POST --url 'http://votreepc.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"
}'

Informations techniques

  • URL de l’endpoint : https://VOTREEPC.interfacing.com/api/v1/items
  • URL Swagger : https://VOTREEPC.interfacing.com/api/v1/swagger/#/Common/createItem

Quelle est cette fonctionnalité dans EPC ?

Les objets EPC sont les éléments ou le contenu stockés dans l’application Web. Ils peuvent être un ensemble, un dossier ou des éléments spécifiques à un module, tels que des contrôles dans le module de contrôle, des indicateurs dans le module de performance, des termes dans le module de glossaire, etc. Dans un système EPC, des milliers d’objets peuvent être stockés dans différents modules, en fonction de la taille et des besoins commerciaux de votre organisation.

Pour en savoir plus sur la fonctionnalité “créer un objet”, veuillez cliquer ici.

Sujets connexes

Réaction

Était-ce utile?

Oui Non
Vous avez indiqué que ce sujet ne vous a pas été utile ...
Pouvez-vous SVP laisser un commentaire nous disant pourquoi? Merci!
Merci pour vos commentaires.

Laissez votre avis sur ce sujet.

SVP ne pas utiliser pour des questions de support technique.
Visit the Support Portal

Valider