Insert record/records into record collection

post

/gsdata/v1/{appName}/{recordCollectionType}/{recordCollection}

Insert records into the specified record collection. If record with the same id already exist in the collection it will be overwritten. Users must not manipulate system created record collections, eg records in /cloud/data/catalog, as these changes would be overridden on the next catalog indexing event.

Request

Supported Media Types
Path Parameters
  • Specifies the name of your application. For example, "cloud".
  • Name of the record collection. A valid record collection name is defined by the regular expression "^[a-zA-Z0-9._-]+$" and cannot exceed 128 characters.
  • Type of record collection, currently can only write to/delete from "data" record collections, "dimvals" record collections are read only.
Body ()
Represents a list of guided search records.
Root Schema : RecordList
Type: object
Represents a list of guided search records.
Show Source
Nested Schema : items
Type: array
Show Source
  • RecordItem
    Represents a record from a Guided Search record collection. As well as the properties listed below a record will also have 1 or more additional properties.
Nested Schema : RecordItem
Type: object
Represents a record from a Guided Search record collection. As well as the properties listed below a record will also have 1 or more additional properties.
Show Source
Security
Back to Top

Response

Supported Media Types

201 Response

POST request was successful.
Body ()
Root Schema : PostRecordsResponse
Type: object
Represents the response received from a POST request to insert records into record collection.
Show Source
Nested Schema : ImportRecordsStatus
Type: object
Represents a status of records being imported by this POST request.
Show Source
Nested Schema : ImportRecordsSummary
Type: object
Represents a summary of records imported by this POST request.
Show Source
Back to Top

Examples

The following example shows how to insert records into a record collection:

curl -X POST -H "Authorization:Bearer <token>" -H "Content-Type:application/json" -d@pathname/filename.json http://host:port/gsadmin/v1/cloud/data/storeLocations

Request Body Example

The following example shows the records to be inserted:

{
  links :[{ 
    "rel" : "self",
    "href" : "http://gsadminhost:port/ifcr/gsdata/v1/cloud/data/storeLocations"
  }],
  items : [
    {
      "record.action": "deleteAll"  
    },
    {
      links :[{  
        "rel" : "self",
        "href" : "http://gsadminhost:port/ifcr/gsdata/v1/cloud/data/storeLocations/store1000"
      }],
      "record.id": "store1000",    
      "record.action": "upsert",   
      "store.state": "CA",         
      "store.amenities": [         
        "Coffee Shop",
        "Pharmacy"
      ]
    },
    {
      "record.action": "delete",   
      "record.id": "store1011"
    },
    ...
  ]
}
Back to Top