Petals BC REST

Unable to create a Rest request with the same form-data several times

Details

  • Type: Improvement Request Improvement Request
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.2.3-BC
  • Fix Version/s: 2.3.0-BC
  • Component/s: Provider mode
  • Security Level: Public
  • Description:
    Hide

    Unable to generate REST request with the same form data several times, as following:

    curl -u $PASTELL_LOGIN:$PASTELL_PASSWORD $PASTELL_SITE/api/v2/entite/1/document/XGfvh1v/externalData/type_piece -d'type_pj[]=99_AI' -d'type_pj[]=99_AU' -d'type_pj[]=41_NC' -X PATCH

    We should be able to use a form-data as array.

    Show
    Unable to generate REST request with the same form data several times, as following: curl -u $PASTELL_LOGIN:$PASTELL_PASSWORD $PASTELL_SITE/api/v2/entite/1/document/XGfvh1v/externalData/type_piece -d'type_pj[]=99_AI' -d'type_pj[]=99_AU' -d'type_pj[]=41_NC' -X PATCH We should be able to use a form-data as array.
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:04:19 +0100

Nowadays, the form-datas of outgoing REST request are defined as following:

<rest:operation name="toto">
    ...

    <rest:form-data name="dummy[]">
        <rest:extracted-by-xpath>//*[local-name()='dummy']</rest:extracted-by-xpath>
    </rest:form-data>

    ..
</rest:operation>

The result of the XPath expression is expected to be a simple value. If we are able to manage a result as array, we can create several form datas with the same name and different values.

Show
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:04:19 +0100 Nowadays, the form-datas of outgoing REST request are defined as following:
<rest:operation name="toto">
    ...

    <rest:form-data name="dummy[]">
        <rest:extracted-by-xpath>//*[local-name()='dummy']</rest:extracted-by-xpath>
    </rest:form-data>

    ..
</rest:operation>
The result of the XPath expression is expected to be a simple value. If we are able to manage a result as array, we can create several form datas with the same name and different values.
Christophe DENEUX made changes - Fri, 19 Nov 2021 - 11:04:19 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Christophe DENEUX made changes - Fri, 19 Nov 2021 - 11:04:22 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:07:50 +0100

Done in branch 1.3.x with svn#43800

Show
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:07:50 +0100 Done in branch 1.3.x with svn#43800
Christophe DENEUX made changes - Fri, 19 Nov 2021 - 11:07:50 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 2.3.0-BC [ 11003 ]
Resolution Fixed [ 1 ]
Hide
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:08:09 +0100

Reopened to be merged in trunk

Show
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:08:09 +0100 Reopened to be merged in trunk
Christophe DENEUX made changes - Fri, 19 Nov 2021 - 11:08:09 +0100
Status Resolved [ 10004 ] Open [ 10002 ]
Resolution Fixed [ 1 ]
Christophe DENEUX made changes - Fri, 19 Nov 2021 - 11:08:10 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:08:20 +0100

Merged in trunk

Show
Christophe DENEUX added a comment - Fri, 19 Nov 2021 - 11:08:20 +0100 Merged in trunk
Christophe DENEUX made changes - Fri, 19 Nov 2021 - 11:08:20 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
15m 32s
1
Christophe DENEUX
Fri, 19 Nov 2021 - 11:04:19 +0100
Open Open In Progress In Progress
3s
1
Christophe DENEUX
Fri, 19 Nov 2021 - 11:04:22 +0100
In Progress In Progress Resolved Resolved
3m 28s
1
Christophe DENEUX
Fri, 19 Nov 2021 - 11:07:50 +0100
Resolved Resolved Open Open
19s
1
Christophe DENEUX
Fri, 19 Nov 2021 - 11:08:09 +0100
Open Open In Progress In Progress
1s
1
Christophe DENEUX
Fri, 19 Nov 2021 - 11:08:10 +0100
In Progress In Progress Resolved Resolved
10s
1
Christophe DENEUX
Fri, 19 Nov 2021 - 11:08:20 +0100



People

Dates

  • Created:
    Fri, 19 Nov 2021 - 10:48:47 +0100
    Updated:
    Fri, 19 Nov 2021 - 11:08:20 +0100
    Resolved:
    Fri, 19 Nov 2021 - 11:08:20 +0100