Code Monkey home page Code Monkey logo

anomalieadresse's Introduction

API AnomalieAdresse

Cet outil a été créé afin de respecter l’obligation réglementaire indiquée dans la Décision Arcep n° 2020-1432.

Il permet le traitement d’une demande de création ou de modification d’adresses immeuble dans les IPE grâce à des flux normalisés.

Documentation

La documentation du protocole peut être téléchargée à l'adresse suivante: https://github.com/before-interop/anomalieAdresse/raw/HEAD/protocole-anomalies-adresses.docx

Swagger

Le swagger est disponible à l'adresse suivante : https://before-interop.github.io/anomalieAdresse/

Types d'anomalies

Types de signalement

Cycle de vie d'une anomalie

Workflow

Cas d'utilisation

cas nominal

sequenceDiagram

  participant OC
  participant OI

  OC->>OI: Création d'une anomalie (ACKNOWLEDGED)
  loop Pour chaque pièce jointe
    OC->>OI: Ajout d'une pièce jointe
  end

  OI->>OI: Contrôles métier
  alt Contrôles OK
    OI->>OI: Passage en IN_PROGRESS
    OI->>OC: Event ticket_updated

    OI->>OI: Traitement de l'anomalie
    OI->>OI: Passage en RESOLVED
    OI->>OC: Event ticket_updated

    OC->>OI: Validation de la résolution (CLOSED)
  else Contrôles KO
    OI-->>OI: Passage en REJECTED
    OI->>OC: Event ticket_updated
  end
Loading

Cas incomplet (infos manquantes)

sequenceDiagram

  participant OC
  participant OI

  OC->>OI: Création d'une anomalie (ACKNOWLEDGED)
  loop Pour chaque pièce jointe
    OC->>OI: Ajout d'une pièce jointe
  end

  OI->>OI: Contrôles métier : OK
  OI->>OI: Passage en IN_PROGRESS
  OI->>OC: Event ticket_updated

  OI->>OI: Traitement de l'anomalie

  OI->>OI: Passage en PENDING
  OI->>OC: Event ticket_updated

  loop Pour chaque info demandée
    OC->>OI: Fourniture infos demandées (Note et/ou Attachment)
  end
  OC->>OI: Passage en IN_PROGRESS

  OI->>OI: Traitement de l'anomalie
  OI->>OI: Passage en RESOLVED
  OI->>OC: Event ticket_updated

  OC->>OI: Validation de la résolution (CLOSED)
Loading

Refus de la résolution par l'OC

sequenceDiagram

  participant OC
  participant OI

  OC->>OI: Création d'une anomalie (ACKNOWLEDGED)
  loop Pour chaque pièce jointe
    OC->>OI: Ajout d'une pièce jointe
  end

  OI->>OI: Contrôles métier : OK
  OI->>OI: Passage en IN_PROGRESS
  OI->>OC: Event ticket_updated

  loop Tant que la résolution n'est pas validé par l'OC
    OI->>OI: Traitement de l'anomalie
    OI->>OI: Passage en RESOLVED
    OI->>OC: Event ticket_updated

    alt Résolution acceptée
      OC->>OI: Validation de la résolution (CLOSED)
    else Résolution refusée
      OC->>OI: Refus de la résolution (IN PROGRESS + explications)
    end
  end
Loading

Délai informations complémentaires dépassé

sequenceDiagram

  participant OC
  participant OI

  OC->>OI: Création d'une anomalie (ACKNOWLEDGED)
  loop Pour chaque pièce jointe
    OC->>OI: Ajout d'une pièce jointe
  end

  OI->>OI: Contrôles métier : OK
  OI->>OI: Passage en IN_PROGRESS
  OI->>OC: Event ticket_updated

  OI->>OI: Traitement de l'anomalie
  OI->>OI: Passage en PENDING
  OI->>OC: Event ticket_updated

  OI->>OI: Fin délai infos complémentaires (Passage à RESOLVED)
  OI->>OC: Event ticket_updated

  alt Résolution acceptée
    OC->>OI: Validation de la résolution (CLOSED)
  else Résolution refusée
    OC->>OI: Refus de la résolution (IN PROGRESS + explications)
 end
Loading

Délai validation résolution dépassé

sequenceDiagram

  participant OC
  participant OI

  OC->>OI: Création d'une anomalie (ACKNOWLEDGED)
  loop Pour chaque pièce jointe
    OC->>OI: Ajout d'une pièce jointe
  end

  OI->>OI: Contrôles métier : OK
  OI->>OI: Passage en IN_PROGRESS
  OI->>OC: Event ticket_updated

  OI->>OI: Traitement de l'anomalie
  OI->>OI: Passage en RESOLVED
  OI->>OC: Event ticket_updated

  OI->>OI: Fin délai validation résolution (CLOSED)
  OI->>OC: Event ticket_updated
Loading

Exemples d'utilisation de l'API

Création d'une anomalie

curl -XPOST -d '{
  "@type": "AnomalieAdresseUpdateImb",
  "externalId": "123456789",
  "code_oi": "FTEL",
  "code_oc": "FTEL",
  "relatedEntity": [
    {
      "id": "ID-75120000012C"
    },
    {
      "id": "ID-7512000000H9"
    }
  ],
  "issues": {
    "building.address.city": {
      "description": "Ville inconnue"
    },
    "building.address.postcode": {
      "value": "75120"
    }
  }
}' https://localhost/api/anomalie-adresse

HTTP/1.1 201 Created
ETag: 123456789abcdef
Location: /api/anomalie-adresse/330e4b53-e426-4ac3-a4c2-1f9f9d875b6a

{
  "id": "330e4b53-e426-4ac3-a4c2-1f9f9d875b6a",
  "externalId": "123456789",
  "code_oi": "FTEL",
  "code_oc": "FTEL",
  "relatedEntity": [
    {
      "id": "ID-75120000012C"
    },
    {
      "id": "ID-7512000000H9"
    }
  ],
  "issues": {
    "building.address.city": {
      "description": "Ville inconnue"
    },
    "building.address.postcode": {
      "value": "75120"
    }
  },
  "sizeRefs": 2,
  "status": "ACKNOWLEDGED",
  "statusChangeReason": null,
  "statusChangeDetails": null,
  "creationDate": "2021-01-01T00:00:00Z",
  "lastUpdateDate": "2021-01-01T00:00:00Z",
  "statusChange": [
    {
      "status": "ACKNOWLEDGED",
      "date": "2021-01-01T00:00:00Z"
    }
  ],
  "severity": "LOW",
  "ticketType": "OC_REQUEST",
  "analysisDelay": null,
  "resolutionDelay": null,
  "@type": "AnomalieAdresseUpdateImb",
  "@baseType": "AnomalieAdresse",
  "@version": "123456789abcdef",
  "href": "/api/anomalie-adresse/330e4b53-e426-4ac3-a4c2-1f9f9d875b6a"
}

Refuser la résolution d'une anomalie

curl -H "If-Match: 234567890abcdef" -XPUT -d '{
  "status": "IN_PROGRESS",
  "statusChangeReason": "NOT_ACCEPTED",
  "statusChangeDetails": "Ville toujours inconnue",
}' https://localhost/api/anomalie-adresse/330e4b53-e426-4ac3-a4c2-1f9f9d875b6a

HTTP/1.1 200 OK
ETag: 345678901abcdef

{
  "id": "330e4b53-e426-4ac3-a4c2-1f9f9d875b6a",
  "externalId": "123456789",
  "code_oi": "FTEL",
  "code_oc": "FTEL",
  "relatedEntity": [
    {
      "id": "ID-75120000012C"
    },
    {
      "id": "ID-7512000000H9"
    }
  ],
  "issues": {
    "building.address.city": {
      "description": "Ville inconnue"
    },
    "building.address.postcode": {
      "value": "75120"
    }
  },
  "status": "IN_PROGRESS",
  "statusChangeReason": "NOT_ACCEPTED",
  "statusChangeDetails": "Ville toujours inconnue",
  "creationDate": "2021-01-01T00:00:00Z",
  "lastUpdateDate": "2021-01-04T00:00:00Z",
  "statusChange": [
    {
      "status": "ACKNOWLEDGED",
      "date": "2021-01-01T00:00:00Z"
    },
    {
      "status": "IN_PROGRESS",
      "date": "2021-01-02T00:00:00Z"
    },
    {
      "status": "RESOLVED",
      "date": "2021-01-03T00:00:00Z"
    },
    {
      "status": "IN_PROGRESS",
      "date": "2021-01-04T00:00:00Z"
    }
  ],
  "severity": "LOW",
  "ticketType": "OC_REQUEST",
  "analysisDelay": 172800,
  "resolutionDelay": 259200,
  "@type": "AnomalieAdresseUpdateImb",
  "@baseType": "AnomalieAdresse",
  "@version": "345678901abcdef",
  "href": "/api/anomalie-adresse/330e4b53-e426-4ac3-a4c2-1f9f9d875b6a"
}

Récupération des anomalies PENDING

curl "https://localhost/api/anomalie-adresse?status=PENDING"

Récupération des anomalies ZMD résolue en plus de 8 semaines

curl "https://localhost/api/anomalie-adresse?zone=ZMD&status=RESOLVED&resolutionDelay[gt]=4838400"

Lister les tickets en cours car la résolution n'a pas été acceptée

curl "https://localhost/api/anomalie-adresse?status=IN_PROGRESS&statusChangeReason=NOT_ACCEPTED"

Lister les tickets ouverts sur un code IMB

curl "https://localhost/api/anomalie-adresse?status[in]=ACKNOWLEDGED,IN_PROGRESS,PENDING&relatedEntity.id=ID-75120000012C"

Nombre total de tickets ZMD ouverts sur le mois de janvier 2021

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&creationDate[gte]=2021-01-01&creationDate[lt]=2021-02-01"

Nombre total de tickets ZMD clôturés sur le mois de janvier 2021 en moins d'une semaine

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&totalDuration[lt]=604800&resolutionDate[gte]=2021-01-01&resolutionDate[lt]=2021-02-01"

Nombre total de tickets ZMD ouverts sur le mois de janvier 2021 et clôturés en moins d'une semaine

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&status=CLOSED&totalDuration[lt]=604800&creationDate[gte]=2021-01-01&creationDate[lt]=2021-02-01"

Nombre total de tickets ZMD clôturés sur le mois de janvier 2021 en plus d'une semaine et moins de 4 semaines

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&totalDuration[gte]=604800&totalDuration[lt]=2419200&resolutionDate[gte]=2021-01-01&resolutionDate[lt]=2021-02-01"

Nombre total de tickets ZMD clôturés sur le mois de janvier 2021 en plus de 4 semaines et moins de 8 semaines

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&totalDuration[gte]=2419200&totalDuration[lt]=4838400&resolutionDate[gte]=2021-01-01&resolutionDate[lt]=2021-02-01"

Nombre total de tickets ZMD clôturés sur le mois de janvier 2021 en plus de 8 semaines

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&totalDuration[gte]=4838400&resolutionDate[gte]=2021-01-01&resolutionDate[lt]=2021-02-01"

Nombre total de tickets ZMD ouverts sur le mois de janvier 2021 et toujours en cours

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&status[in]=ACKNOWLEDGED,IN_PROGRESS,PENDING,RESOLVED&creationDate[gte]=2021-01-01&creationDate[lt]=2021-02-01"

Nombre total de tickets ZMD ouverts sur le mois de janvier 2021 et rejetés

curl -XHEAD "https://localhost/api/anomalie-adresse?zone=ZMD&status=REJECTED&creationDate[gte]=2021-01-01&creationDate[lt]=2021-02-01"

anomalieadresse's People

Contributors

ggrebert avatar christophedaudenthun avatar richard-olvera avatar aminvielledebat avatar aminesalmen-rekik avatar alexisthethe avatar acostaift avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.