Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Change l'URL du endpoint Parcoursup vers /api/parcoursup/certification/search?ine={ine} (PIX-15913). #10931

Merged

Conversation

HEYGUL
Copy link
Contributor

@HEYGUL HEYGUL commented Jan 2, 2025

🎄 Problème

Les 2 endpoints Parcoursup ne sont pas cohérents.

🎁 Proposition

Utiliser un endpoint unique de recherche avec des paramètres de query spécifiques aux usages.

🧦 Remarques

🎅 Pour tester

Sur https://api-pr10931.review.pix.fr/api/documentation, générer un token valide avec les bons client_id, client_secret et scope

TOKEN=<token>
curl https://api-pr10931.review.pix.fr/api/parcoursup/certification/search?ine=714347660RP \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -X GET

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@alexandrecoin alexandrecoin added Func Review OK PO validated functionally the PR and removed 👀 Func Review Needed labels Jan 3, 2025
handler: certificationController.getCertificationResult,
tags: ['api', 'parcoursup'],
notes: [
'- **Cette route est accessible uniquement à Parcours Sup**\n' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'- **Cette route est accessible uniquement à Parcours Sup**\n' +
'- **Cette route est accessible uniquement à Parcoursup**\n' +

api/src/parcoursup/application/certification-route.js Outdated Show resolved Hide resolved
Comment on lines 41 to 61
context('return 400 error when the param is missing', function () {
let httpTestServer, headers;
beforeEach(async function () {
httpTestServer = new HttpTestServer();
httpTestServer.setupAuthentication();
await httpTestServer.register(moduleUnderTest);

const PARCOURSUP_CLIENT_ID = 'test-parcoursupClientId';
const PARCOURSUP_SCOPE = 'parcoursup';
const PARCOURSUP_SOURCE = 'parcoursup';

headers = {
authorization: generateValidRequestAuthorizationHeaderForApplication(
PARCOURSUP_CLIENT_ID,
PARCOURSUP_SOURCE,
PARCOURSUP_SCOPE,
),
};
});

it('case of organizationUai', async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
context('return 400 error when the param is missing', function () {
let httpTestServer, headers;
beforeEach(async function () {
httpTestServer = new HttpTestServer();
httpTestServer.setupAuthentication();
await httpTestServer.register(moduleUnderTest);
const PARCOURSUP_CLIENT_ID = 'test-parcoursupClientId';
const PARCOURSUP_SCOPE = 'parcoursup';
const PARCOURSUP_SOURCE = 'parcoursup';
headers = {
authorization: generateValidRequestAuthorizationHeaderForApplication(
PARCOURSUP_CLIENT_ID,
PARCOURSUP_SOURCE,
PARCOURSUP_SCOPE,
),
};
});
it('case of organizationUai', async function () {
context('when the param is missing', function () {
let httpTestServer, headers;
beforeEach(async function () {
httpTestServer = new HttpTestServer();
httpTestServer.setupAuthentication();
await httpTestServer.register(moduleUnderTest);
const PARCOURSUP_CLIENT_ID = 'test-parcoursupClientId';
const PARCOURSUP_SCOPE = 'parcoursup';
const PARCOURSUP_SOURCE = 'parcoursup';
headers = {
authorization: generateValidRequestAuthorizationHeaderForApplication(
PARCOURSUP_CLIENT_ID,
PARCOURSUP_SOURCE,
PARCOURSUP_SCOPE,
),
};
});
it('return 400 error', async function () {

yaf and others added 2 commits January 3, 2025 10:39
@AndreiaPena AndreiaPena force-pushed the pix-15913-refactor-parcoursup-ine-endpoint branch from cd4a7aa to 4e02346 Compare January 3, 2025 09:39
@pix-service-auto-merge pix-service-auto-merge merged commit 5603315 into dev Jan 3, 2025
7 of 9 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the pix-15913-refactor-parcoursup-ine-endpoint branch January 3, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants