Commit a43b002c authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

API Activity (POST)

 - Données de base
 - Jalons
 - Documents
parent 614cd4aa
Loading
Loading
Loading
Loading
Loading
+59 −0

File added.

Preview size limit exceeded, changes collapsed.

+46 −0
Changes for dev/api/request/activity-post-label.rest: 46 added lines, 0 removed lines.
Original line number Diff line number Diff line
### Envoi de données
POST http://localhost:8888/api/activity
Accept: application/json
x-api-user: {{user}}
x-api-key: {{key}}
Content-Type: application/json

{
  "label": "TEST UNITAIRE (Via des labels)",
  "description": "",
  "codeEOTP": "",
  "statusLabel": "Brouillon",
  "activityTypeLabel": "Accords cadre",
  "financialImpactLabel": "Recette",
  "amount": "",
  "tvaLabel": "Taux réduit 7%",
  "currencyLabel": "Euro",
  "fraisDeGestion": "",
  "fraisDeGestionPartHebergeur": "",
  "fraisDeGestionPartUnite": "",
  "fraisDeGestionPartGestionnaire": "",
  "assietteSubventionnable": "",
  "pcruPoleCompetitivite": "",
  "pcruValidPoleCompetitivite": "1",
  "pcruSourceFinancement": "",
  "noteFinanciere": "",
  "dateStart": "2026-01-01",
  "dateEnd": "",
  "dateSigned": "",
  "dateOpened": "",
  "dateNegociation": "",
  "dateDepotProjet": "",
  "ff_25_rest": "null",
  "ff_21_foo": "",
  "id": "",
  "remoteId": "unittest-arhskirpois-03"
}

> {%
    client.test("Retour d'erreur POST", function(){
        client.assert(response.status === 200, "Code 200 attendu")
    })
    client.test("Retour JSON attendu", function(){
        client.assert(response.contentType.mimeType === "json/application", "Retour JSON attendu")
    })
 %}
+37 −23
Changes for dev/api/request/activity-post.rest: 37 added lines, 23 removed lines.
Original line number Diff line number Diff line
@@ -5,7 +5,43 @@ x-api-user: {{user}}
x-api-key: {{key}}
Content-Type: application/json

{}
{
  "label": "TEST UNITAIRE (avec JALONS) CHANGE 1",
  "description": "",
  "codeEOTP": "",
  "status": 102,
  "activityType": "411",
  "financialImpact": "0",
  "amount": "",
  "tva": "1",
  "currency": "1",
  "fraisDeGestion": "",
  "fraisDeGestionPartHebergeur": "",
  "fraisDeGestionPartUnite": "",
  "fraisDeGestionPartGestionnaire": "",
  "assietteSubventionnable": "",
  "pcruPoleCompetitivite": "",
  "pcruValidPoleCompetitivite": "1",
  "pcruSourceFinancement": "",
  "noteFinanciere": "",
  "dateStart": "2026-01-01",
  "dateEnd": "",
  "dateSigned": "",
  "dateOpened": "",
  "dateNegociation": "",
  "dateDepotProjet": "",
  "ff_25_rest": "null",
  "ff_21_foo": "",
  "id": "",
  "remoteId": "unittest-arhskirpois-01",
  "milestones": [
    {
      "typeLabel": "Démo",
      "dateStart": "2026-03-20",
      "comment": "Exemple de jalon"
    }
  ]
}

> {%
    client.test("Retour d'erreur POST", function(){
@@ -15,25 +51,3 @@ Content-Type: application/json
        client.assert(response.contentType.mimeType === "json/application", "Retour JSON attendu")
    })
 %}

### Liste des activités
GET   http://localhost:8888/api/activity?f[]=at,411,,&p=11&rbp=50
Accept: application/json
x-api-user: {{user}}
x-api-key: {{key}}

> {%
    client.test("Retour d'erreur POST", function(){
        client.assert(response.status === 200, "Code 200 attendu")
    })
    client.test("Retour JSON attendu", function(){
        client.assert(response.contentType.mimeType === "json/application", "Retour JSON attendu")
    })
%}

### Information détaillées sur une activité
GET   http://localhost:8888/api/activity/15232
Accept: application/json
x-api-user: {{user}}
x-api-key: {{key}}
+29.2 KiB

File added.

No diff preview for this file type.

+28.5 KiB

File added.

No diff preview for this file type.

Loading