Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some update endpoint queries supports an update  object which extends together with the filtering above allows for "update by query" functionality. The update  is basically a JSON object with the following format

...

Aspire's API will return both an HTTP response code and a Json JSON body indicating success or failure of all calls. The following status codes are used

...

Response codeDescription
200

Success

Success with errors (batch mode)*

201 TODO: not implementedCreated
400Bad request
404Not found
406Not acceptable

...

Code Block
languagejs
{
  "connector": [{
    "id": "AAABcID5GBc=",
    "type": "filesystem",
    "description": "NetApp connector",
    "created": 1596707252548,
    "updated": 1596707252548,
    "properties": { This will be a dynamic JSON object }
  },
  {
    "id": "AAABcIueWUc=",
    "type": "sharepoint-online",
    "description": "SharePoint Online",
    "created": 1596707252548,
    "updated": 1596707252548,
    "properties": { This will be a dynamic JSON object } 
  }],
  "from": 100,
  "size": 10,
  "totalItems": 10000
}

Should multiple items/objects to be affected and some (or all) result in errors, information about any unsuccessful call will be included in an error section for the response. The response shown below is an example of the body returned if four connectors submitted for update and two encountered and error (response status 200)

Code Block
languagejs
{
  "connector": [{
    "id": "AAABcID5GBc=",
    "type": "filesystem",
    "description": "NetApp connector",
    "created": 1596707252548,
    "updated": 1596707252548,
    "properties": { This will be a dynamic JSON object }
  },
  {
    "id": "AAABcIueWUc=",
    "type": "sharepoint-online",
    "description": "SharePoint Online",
    "created": 1596707252548,
    "updated": 1596707252548,
    "properties": { This will be a dynamic JSON object } 
  }],
  "error": {
    "connector": [{
        "id": "aaf15f20-c334-4f5f-a34f-f308360c2092",
        "status": 406,
        "message": "java.lang.RuntimeException: testing exception"
      },
      {
        "id": "dde02131-ce63-4639-afee-d72293eef5e0",
        "status": 406,
        "message": "java.lang.RuntimeException: another testing exception"
      }
    ]
  }
}

...