Use specified job profile in /export endpoint

Description

Purpose:
/export endpoint request comes with a job profileID, Validate that the jobprofile Id is existing , and then use the job profile to fetch corresponding mapping profile and use the transformations provided.If no transformations in case of the default mapping profile, apply default mapping rules for the records generated on the fly and for the records in existing SRS record use that record.

Acceptance Criteria

  • Job profile Id provided in /export is used to perform exports

  • unit tests updated

  • API tests updated

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Andrii Novytskyi May 28, 2020 at 12:07 PM
Edited

Verified on folio-testing: Call data-export/export endpoint with default job profile id:
1. REQUEST:
curl --location --request POST 'https://folio-testing-okapi.aws.indexdata.com:443/data-export/export' \
--header 'X-Okapi-Tenant: diku' \
--header 'Content-Type: application/json' \
--header 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjhlMGI4MDhkLTk1YjItNTk4MS1hZjBiLWZmODg2NDZkNjBmOCIsImlhdCI6MTU5MDY1ODE0NCwidGVuYW50IjoiZGlrdSJ9.e1NFSTzafqStGVDRQXAk9NoVb1HWLKTEQBjCw1z45KM' \
--header 'Content-Type: text/plain' \
--data-raw '{
"fileDefinitionId": "9688c0bf-bf19-436b-951f-624580f096f6",
"jobProfileId": "6f7f3cd7-9f24-42eb-ae91-91af1cd54d0a"
}'
2.RESPONSE: Status: 204 No Content.

Try to call data-export/export endpoint with not existing job profile id:
1. REQUEST:
curl --location --request POST 'https://folio-testing-okapi.aws.indexdata.com:443/data-export/export' \
--header 'X-Okapi-Tenant: diku' \
--header 'Content-Type: application/json' \
--header 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjhlMGI4MDhkLTk1YjItNTk4MS1hZjBiLWZmODg2NDZkNjBmOCIsImlhdCI6MTU5MDY1ODE0NCwidGVuYW50IjoiZGlrdSJ9.e1NFSTzafqStGVDRQXAk9NoVb1HWLKTEQBjCw1z45KM' \
--header 'Content-Type: text/plain' \
--data-raw '{
"fileDefinitionId": "9688c0bf-bf19-436b-951f-624580f096f6",
"jobProfileId": "310be454-a0c6-11ea-bb37-0242ac130002"
}'
2.RESPONSE: Status 400 Bad Request
Message JobProfile not found with id 310be454-a0c6-11ea-bb37-0242ac130002:

Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Concorde

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created May 12, 2020 at 2:05 PM
Updated May 29, 2020 at 2:37 AM
Resolved May 28, 2020 at 8:58 PM
TestRail: Cases
TestRail: Runs

Flag notifications