# Trigger extraction jobs endpoint has incorrect OAS3 definition

**URL:** <https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256>\
**Category:** APIs & Connectors\
**Created:** [May 8, 2024, 12:28pm UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256 "2024-05-08T12:28:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![b.zafirov](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@b.zafirov](https://visier.discourse.group/u/b.zafirov)\
**Post date:** [May 8, 2024, 12:28pm UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256/1 "2024-05-08T12:28:12Z")

</div>

Dear Visier developer community,

After calling the endpoint `POST /v1/op/data/startExtractAndLoad` we have noticed that the endpoint doesn’t accept `application/json` request body, but it accepts `multipart/form-data`. Therefore, this [line](https://github.com/visier/openapi-clients/blob/main/res/data-handling-apis.yaml#L251) in the OAS3 spec should be changed to `multipart/form-data`. Furthermore, the response field `jobId` in the object definition `StartExtractionResponse` should start with a capital J letter, namely `JobId`.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![henrik.areskoug](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@henrik.areskoug](https://visier.discourse.group/u/henrik.areskoug)\
**Post date:** [May 9, 2024, 12:36am UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256/2 "2024-05-09T00:36:07Z")

</div>

Hello @b.zafirov ,  
Thanks for logging this.

- The API should be able to handle `application/json` and an internal ticket has been created for that.
- Element names, such as `jobId` are in camelCase by design.

Thanks,  
/Henrik

---

<div class="post-metadata">

**Author:** ![b.zafirov](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@b.zafirov](https://visier.discourse.group/u/b.zafirov)\
**Post date:** [May 13, 2024, 6:46am UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256/3 "2024-05-13T06:46:33Z")

</div>

Hello @henrik.areskoug,

> The API should be able to handle `application/json` and an internal ticket has been created for that.

Great, please update the OAS3 spec, when the ticket will be processed.

> - Element names, such as `jobId` are in camelCase by design.

Yes, we are aware of this. The problem here is that the first letter of the field is in capital case, namely it is `JobId`. Same as other fields the field name should be `jobId`.

Best regards

---

<div class="post-metadata">

**Author:** ![henrik.areskoug](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@henrik.areskoug](https://visier.discourse.group/u/henrik.areskoug)\
**Post date:** [May 13, 2024, 4:41pm UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256/4 "2024-05-13T16:41:38Z")

</div>

Hello @b.zafirov ,

The ticket is in the backlog and I can’t provide an exact time when it will be processed. It will be addressed however.

As for the casing, I’m not quite following you on this. Above you said:

> Furthermore, the response field `jobId` in the object definition `StartExtractionResponse` should start with a capital J letter, namely `JobId` .

This is incorrect as it should start with a lower-case letter, which [it does](https://github.com/visier/openapi-clients/blame/bed1775f13ad71ff4083bd62db2296054ec32684/res/data-handling-apis.yaml#L1879).

Then you said:

> The problem here is that the first letter of the field is in capital case, namely it is `JobId` . Same as other fields the field name should be `jobId` .

I’m not sure where you’re finding `JobId` as an element name. Please provide a line-level link into the file that has the invalid element name.

Thanks,  
/Henrik

---

<div class="post-metadata">

**Author:** ![b.zafirov](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@b.zafirov](https://visier.discourse.group/u/b.zafirov)\
**Post date:** [May 15, 2024, 1:53pm UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256/5 "2024-05-15T13:53:13Z")

</div>

Hi @henrik.areskoug,

Sorry for the misunderstanding. The problem is that the endpoint implementation and the OAS3 endpoint definition are not consistent. When called the endpoint returns the following response:

```json
{
	"JobId": "<VALID-JOB-ID>"
}

```

And in the OAS3 spec the field name starts with a lower case `j` (e.g. `jobId`), as it can be seen [here](https://github.com/visier/openapi-clients/blob/bed1775f13ad71ff4083bd62db2296054ec32684/res/data-handling-apis.yaml#L1879). So the endpoint implementation and the definition need to be consistent.

Best regards

---

<div class="post-metadata">

**Author:** ![henrik.areskoug](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@henrik.areskoug](https://visier.discourse.group/u/henrik.areskoug)\
**Post date:** [May 15, 2024, 4:29pm UTC](https://visier.discourse.group/t/trigger-extraction-jobs-endpoint-has-incorrect-oas3-definition/256/6 "2024-05-15T16:29:03Z")

</div>

Hi @b.zafirov,

My apologies. I finally get what you mean. Yes, that is an inconsistency that will be addressed. I’ll log a bug. Unfortunately, in order to maintain backward-compatibility for the API, the fix will be in the OAS3 definition itself.

Thanks,  
/Henrik
