[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-1051) Further simplify JSON Batch Format
[ https://issues.oasis-open.org/browse/ODATA-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Pizzo updated ODATA-1051: --------------------------------- Proposal: Remove the outer object wrapper in the proposed JSON batch format. Add an "atomicityGroup" property; all requests that have the same value for atomicityGroup are processed as an atomic unit. Members with the same atomicityGroup must be adjacent in a request payload. dependsOn can reference an individual request that is not within an atomicityGroup, or the identifier for the atomicityGroup if the request is within an atomicityGroup. Support server-driven paging in this format. For an async batch response, the nextLink can return 202 with a location header and retry after. was:Remove the outer object wrapper in the proposed JSON batch format. Add an "atomicityGroup" property; all requests that have the same value for atomicityGroup are processed as an atomic unit. Members with the same atomicityGroup must be adjacent in a request payload. dependsOn can reference an individual request that is not within an atomicityGroup, or the identifier for the atomicityGroup if the request is within an atomicityGroup. > Further simplify JSON Batch Format > ---------------------------------- > > Key: ODATA-1051 > URL: https://issues.oasis-open.org/browse/ODATA-1051 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Bug > Components: JSON Format > Affects Versions: V4.01_CS02 > Environment: [Proposed] > Reporter: Michael Pizzo > Fix For: V4.01_CSD02 > > > In OData-1046 we approved addition of a JSON-format for Batch requests and responses. > In the discussion we considered a format that included groups of requests as top-level JSON objects with common batch options. > We can simplify this proposal by removing this outer grouping and allowing the individual requests to specify that they are part of a particular atomicityGroup. By adding additional semantics (members of an atomicityGroup must be adjacent in a request) we can simplify construction and processing of a batch request. > Example batch request: > POST /v1.0/$batch HTTP/1.1 > { > requests: [ > { > id: "1", > atomicityGroup: "atom1", > method: "post", > url: "/users", > headers: { > "Content-Type": "application/json" > }, > body: { > displayName: "John Smith", > userPrincipalName: "jsmith@contoso.com" > } > }, > { > id: "2", > atomicityGroup: "atom1", > dependsOn: ["1"], > method: "put", > url: "$1/photo", > headers: { > Content-Type: "image/jpeg" > }, > body: "FRwvAAIAAAANAA4AFAAhAPNTUAAAAAAAAAAAAAAQUAAAAAAADHrQX+" > }, > { > id: "3", > method: "get", > url: "/groups?top=10", > headers: { > Accept: "application/atom+xml", > } > }, > { > id: "4", > dependsOn: ["atom1"], > method: "get", > url: "$1/thumbnail", > headers: { > Accept: "image/jpeg" > } > } > ] > } > { > responses: [ > { > id: "1", > status: 201, > headers: { > Location: "/users/jsmith" > } > }, > { > id: "2", > status: 204 > }, > { > id: "3", > status: 406, > error: { > message: "Atom Format not supported" > }, > { > id: "4", > status: 200, > headers: { > Content-Type: "image/jpeg" > }, > body: "FRwvAAIAAAANAA4AFAAhAPNTUAAAAAAAAAAAAAAQUAAAAAAADHrQX+" > }, > } > } -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]