administration
Module ADMIN de l'institution. Chaque operation exige ses permissions.
Descriptions come from the contract, which is written in French. They are reproduced verbatim so that the contract remains the source of truth.
GET /api/v1/admin/api-credentials
Identifiants machine
Identifiants machine, sans secret.
adminListApiCredentials
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<ApiCredentialOut> |
POST /api/v1/admin/api-credentials
Emettre un identifiant machine
Le secret n'est rendu qu'une fois. Exige une authentification renforcee.
adminIssueApiCredential
Parameters
No parameters.
Request body
- Content type
application/json- Type
ApiCredentialIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
201 | Successful Response | application/json | ApiCredentialIssuedOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/api-credentials/{credential_id}/revoke
Revoquer un identifiant machine
Revoque un identifiant machine, avec effet immediat.
adminRevokeApiCredential
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
credential_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
204 | Successful Response | — | |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/audit-events
Chaine d'audit de l'institution
Du plus recent au plus ancien. Exige `audit.read`.
adminListAuditEvents
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
before | query | integer | null | no | minimum: 1 |
limit | query | integer | no | minimum: 1 ; maximum: 200 ; default: 50 |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<AuditEventOut> |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/credit-products
Produits de credit
Produits de credit de l'institution.
adminListCreditProducts
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<CreditProductOut> |
POST /api/v1/admin/credit-products
Creer un produit de credit
Cree un produit, a l'etat de brouillon.
adminCreateCreditProduct
Parameters
No parameters.
Request body
- Content type
application/json- Type
CreditProductIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
201 | Successful Response | application/json | CreditProductOut |
422 | Validation Error | application/json | HTTPValidationError |
PUT /api/v1/admin/credit-products/{product_id}
Modifier un produit de credit
Modifie un produit ; sa structure est figee apres activation.
adminUpdateCreditProduct
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
product_id | path | string (uuid) | yes |
Request body
- Content type
application/json- Type
CreditProductIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | CreditProductOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/credit-products/{product_id}/activate
Activer un produit de credit
Active un produit complet.
adminActivateCreditProduct
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
product_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | CreditProductOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/credit-products/{product_id}/archive
Archiver un produit de credit
Archive un produit ; il ne reviendra pas.
adminArchiveCreditProduct
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
product_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | CreditProductOut |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/custom-fields
Champs personnalises
Champs personnalises de l'institution.
adminListCustomFields
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<CustomFieldOut> |
POST /api/v1/admin/custom-fields
Definir un champ personnalise
Definit un champ propre a l'institution.
adminCreateCustomField
Parameters
No parameters.
Request body
- Content type
application/json- Type
CustomFieldIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
201 | Successful Response | application/json | CustomFieldOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/custom-fields/{field_id}/retire
Retirer un champ personnalise
Retire un champ ; sa definition demeure.
adminRetireCustomField
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
field_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
204 | Successful Response | — | |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/exceptional-access
Acces exceptionnels de NEXCLARA
Autorisations recues de CONTROL : motif, perimetre, dates, etat effectif et consultations. Exige `exceptional_access.decide`.
adminListExceptionalAccess
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<ExceptionalAccessOut> |
POST /api/v1/admin/exceptional-access/{grant_id}/consent
Consentir a un acces exceptionnel
Exige `exceptional_access.decide` et une authentification renforcee recente. L'identite de support est invitee ; le lien n'est rendu que si le courriel n'est pas parti.
adminConsentExceptionalAccess
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
grant_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | ExceptionalAccessDecisionOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/exceptional-access/{grant_id}/opposition
S'opposer a un acces exceptionnel
Pendant le delai d'opposition seulement ; definitif.
adminOpposeExceptionalAccess
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
grant_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | ExceptionalAccessDecisionOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/exceptional-access/{grant_id}/refusal
Refuser un acces exceptionnel
Refuse le consentement ; rien ne s'ouvrira.
adminRefuseExceptionalAccess
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
grant_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | ExceptionalAccessDecisionOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/exceptional-access/{grant_id}/revocation
Mettre fin a un acces exceptionnel
Immediat : sessions et invitation de support revoquees.
adminRevokeExceptionalAccess
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
grant_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | ExceptionalAccessDecisionOut |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/invitations
Invitations
Invitations de l'institution, sans jeton.
adminListInvitations
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<InvitationOut> |
POST /api/v1/admin/invitations
Inviter un utilisateur
Emet une invitation ; le lien n'est rendu que si le courriel n'est pas parti.
adminIssueInvitation
Parameters
No parameters.
Request body
- Content type
application/json- Type
InvitationIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
201 | Successful Response | application/json | InvitationIssuedOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/invitations/{invitation_id}/reissue
Reemettre une invitation en attente ou echue
Memes roles, revalides ; l'ancienne invitation est revoquee.
adminReissueInvitation
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
invitation_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
201 | Successful Response | application/json | InvitationIssuedOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/invitations/{invitation_id}/revoke
Revoquer une invitation
Revoque une invitation en attente.
adminRevokeInvitation
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
invitation_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
204 | Successful Response | — | |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/roles
Roles et permissions
Matrice des roles attribuables : lisible par qui peut lire les comptes (`users.read`). Le role de l'identite de support n'y figure pas : aucun administrateur ne l'attribue (ADR-0046).
adminListRoles
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<RoleDescriptionOut> |
GET /api/v1/admin/usage
Usage facturable de l'institution, par mois
Mois `from` a `to` inclus (AAAA-MM, temps universel, 24 mois au plus), zeros compris. Exige `usage.read`.
adminReadUsage
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
from | query | string | yes | pattern: "^\\d{4}-\\d{2}$" |
to | query | string | yes | pattern: "^\\d{4}-\\d{2}$" |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<MonthlyUsageOut> |
422 | Validation Error | application/json | HTTPValidationError |
GET /api/v1/admin/users
Comptes
Comptes de l'institution (`users.read`).
adminListUsers
Parameters
No parameters.
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | array<UserOut> |
GET /api/v1/admin/users/{user_id}
Compte
Un compte de l'institution (`users.read`).
adminGetUser
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | UserOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/users/{user_id}/disable
Desactiver un compte
Definitif. Le compte et ses traces restent dans l'histoire.
adminDisableUser
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | UserOut |
422 | Validation Error | application/json | HTTPValidationError |
PUT /api/v1/admin/users/{user_id}/profile
Corriger la fiche d'un compte
Nom affiche et fonction d'un collegue. Exige `users.manage` et une authentification renforcee recente ; refuse sur son propre compte. L'interesse est avise.
adminUpdateUserProfile
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
- Content type
application/json- Type
AdminProfileIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | UserOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/users/{user_id}/reactivate
Reactiver un compte
Reactive un compte suspendu.
adminReactivateUser
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | UserOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/users/{user_id}/recovery
Emettre un lien de retablissement d'UN facteur
Remplace le mot de passe OU le second facteur ; l'interesse prouve toujours l'autre. Exige `users.manage` et une authentification renforcee recente. Le lien part par courriel ; sinon il est rendu une seule fois.
adminIssueAccountRecovery
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
- Content type
application/json- Type
RecoveryIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
201 | Successful Response | application/json | RecoveryIssuedOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/users/{user_id}/recovery/revoke
Revoquer le lien de retablissement en attente
Revoque le lien en attente d'un compte.
adminRevokeAccountRecovery
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
204 | Successful Response | — | |
422 | Validation Error | application/json | HTTPValidationError |
PUT /api/v1/admin/users/{user_id}/roles
Roles d'un compte
Exige `roles.assign` et une authentification renforcee recente.
adminSetUserRoles
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
- Content type
application/json- Type
RolesIn- Required
- yes
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | UserOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/users/{user_id}/sessions/revoke
Forcer la deconnexion d'un compte
Ferme toutes ses sessions ; ni mot de passe ni second facteur ne changent.
adminRevokeUserSessions
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | SessionsRevokedOut |
422 | Validation Error | application/json | HTTPValidationError |
POST /api/v1/admin/users/{user_id}/suspend
Suspendre un compte
Suspend un compte et revoque ses sessions.
adminSuspendUser
Parameters
| Parameter | Location | Type | Required | Constraints |
|---|---|---|---|---|
user_id | path | string (uuid) | yes |
Request body
No request body.
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
200 | Successful Response | application/json | UserOut |
422 | Validation Error | application/json | HTTPValidationError |