> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://akamai.ferndocs.com/demo-apis/api/data/objects/put-obj/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://akamai.ferndocs.com/_mcp/server. # Test objects PUT http://{hostname}/test-suite/v2/data/obj Content-Type: application/json This tests objects. Reference: https://akamai.ferndocs.com/demo-apis/api/data/objects/put-obj ## Request ### Query parameters - `accountSwitchKey` (string, optional) — For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys). ### Body (application/json) This endpoint expects an object. - `obj-additional-missing` (DataObjPutRequestBodyContentApplicationJsonSchemaObjAdditionalMissing, required) — Schema lacks `additionalProperties:false`. - `obj-additional-true` (DataObjPutRequestBodyContentApplicationJsonSchemaObjAdditionalTrue, required) — Schema specifies `additionalProperties:true`. - `obj-bool` (DataObjPutRequestBodyContentApplicationJsonSchemaObjBool, required) — Object members are all boolean, suggesting that an enum array might be better design. - `obj-max` (DataObjPutRequestBodyContentApplicationJsonSchemaObjMax, required) — Object specifies `maxProperties`. - `obj-max-threshold` (DataObjPutRequestBodyContentApplicationJsonSchemaObjMaxThreshold, required) — Object specifies many, many members. - `obj-min` (DataObjPutRequestBodyContentApplicationJsonSchemaObjMin, required) — Object specifies `minProperties`. - `obj-orphan` (DataObjPutRequestBodyContentApplicationJsonSchemaObjOrphan, required) — TBD object specs single member. - `obj-req-missing` (DataObjPutRequestBodyContentApplicationJsonSchemaObjReqMissing, required) — Object schema lacks a `required` array. - `obj-undefined` (DataObjPutRequestBodyContentApplicationJsonSchemaObjUndefined, required) — Object's `properties` are undefined. - `obj-undefined-req` (DataObjPutRequestBodyContentApplicationJsonSchemaObjUndefinedReq, required) — This object requires a `zeppo` member that's not defined as a property. - `schema-empty` (any, required) - `schema-required-read-only` (boolean, required) — __Read-only__ Schema is marked as both read-only and required. - `schema-required-with-default` (boolean, required, default: true) — This object key is marked as required, but the schema specifies a default value, logically contradictory. - `obj-undefined-additional-false` (DataObjPutRequestBodyContentApplicationJsonSchemaObjUndefinedAdditionalFalse, optional) — Complain that this schema has `additionalProperties` set to `false` with no defined `properties`. - `obj-undefined-additional-schema` (map from string to string, optional) — Note `additionalProperties` is set to a schema object with no defined `properties`, to properly describe an object mapping. - `obj-undefined-additional-true` (map from string to any, optional) — Complain that this schema has `additionalProperties` set to `true` with no defined `properties`. - `svc-tally-obj-keys` (DataObjPutRequestBodyContentApplicationJsonSchemaSvcTallyObjKeys, optional) — Complain that this set of keys is defined in more than one schema file. ## Response ### 200 Successful response. - `obj-additional-missing` (DataObjPutResponsesContentApplicationJsonSchemaObjAdditionalMissing, required) — Schema lacks `additionalProperties:false`. - `obj-additional-true` (DataObjPutResponsesContentApplicationJsonSchemaObjAdditionalTrue, required) — Schema specifies `additionalProperties:true`. - `obj-bool` (DataObjPutResponsesContentApplicationJsonSchemaObjBool, required) — Object members are all boolean, suggesting that an enum array might be better design. - `obj-max` (DataObjPutResponsesContentApplicationJsonSchemaObjMax, required) — Object specifies `maxProperties`. - `obj-max-threshold` (DataObjPutResponsesContentApplicationJsonSchemaObjMaxThreshold, required) — Object specifies many, many members. - `obj-min` (DataObjPutResponsesContentApplicationJsonSchemaObjMin, required) — Object specifies `minProperties`. - `obj-orphan` (DataObjPutResponsesContentApplicationJsonSchemaObjOrphan, required) — TBD object specs single member. - `obj-req-missing` (DataObjPutResponsesContentApplicationJsonSchemaObjReqMissing, required) — Object schema lacks a `required` array. - `obj-undefined` (DataObjPutResponsesContentApplicationJsonSchemaObjUndefined, required) — Object's `properties` are undefined. - `obj-undefined-req` (DataObjPutResponsesContentApplicationJsonSchemaObjUndefinedReq, required) — This object requires a `zeppo` member that's not defined as a property. - `schema-empty` (any, required) - `schema-required-read-only` (boolean, required) — __Read-only__ Schema is marked as both read-only and required. - `schema-required-with-default` (boolean, required, default: true) — This object key is marked as required, but the schema specifies a default value, logically contradictory. - `obj-undefined-additional-false` (DataObjPutResponsesContentApplicationJsonSchemaObjUndefinedAdditionalFalse, optional) — Complain that this schema has `additionalProperties` set to `false` with no defined `properties`. - `obj-undefined-additional-schema` (map from string to string, optional) — Note `additionalProperties` is set to a schema object with no defined `properties`, to properly describe an object mapping. - `obj-undefined-additional-true` (map from string to any, optional) — Complain that this schema has `additionalProperties` set to `true` with no defined `properties`. - `svc-tally-obj-keys` (DataObjPutResponsesContentApplicationJsonSchemaSvcTallyObjKeys, optional) — Complain that this set of keys is defined in more than one schema file. ## Types ### DataObjPutRequestBodyContentApplicationJsonSchemaObjAdditionalMissing Schema lacks `additionalProperties:false`. - `chico` (string, required) — Chico description. - `groucho` (string, required) — Groucho description. - `harpo` (string, required) — Harpo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjAdditionalTrue Schema specifies `additionalProperties:true`. - `chico` (string, required) — Chico description. - `groucho` (string, required) — Groucho description. - `harpo` (string, required) — Harpo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjBool Object members are all boolean, suggesting that an enum array might be better design. - `chico` (boolean, required) — Chico description. - `groucho` (boolean, required) — Groucho description. - `harpo` (boolean, required) — Harpo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjMax Object specifies `maxProperties`. - `chico` (boolean, optional) — Chico description. - `groucho` (boolean, optional) — Groucho description. - `harpo` (boolean, optional) — Harpo description. - `zeppo` (boolean, optional) — Zeppo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjMaxThreshold Object specifies many, many members. - `a` (string, required) — All work and no play makes Jack a dull boy. - `e` (string, required) — All work and no play makes Jack a dull boy. - `i` (string, required) — All work and no play makes Jack a dull boy. - `o` (string, required) — All work and no play makes Jack a dull boy. - `u` (string, required) — All work and no play makes Jack a dull boy. - `b` (string, optional) — All work and no play makes Jack a dull boy. - `c` (string, optional) — All work and no play makes Jack a dull boy. - `d` (string, optional) — All work and no play makes Jack a dull boy. - `f` (string, optional) — All work and no play makes Jack a dull boy. - `g` (string, optional) — All work and no play makes Jack a dull boy. - `h` (string, optional) — All work and no play makes Jack a dull boy. - `j` (string, optional) — All work and no play makes Jack a dull boy. - `k` (string, optional) — All work and no play makes Jack a dull boy. - `l` (string, optional) — All work and no play makes Jack a dull boy. - `m` (string, optional) — All work and no play makes Jack a dull boy. - `n` (string, optional) — All work and no play makes Jack a dull boy. - `p` (string, optional) — All work and no play makes Jack a dull boy. - `q` (string, optional) — All work and no play makes Jack a dull boy. - `r` (string, optional) — All work and no play makes Jack a dull boy. - `s` (string, optional) — All work and no play makes Jack a dull boy. - `t` (string, optional) — All work and no play makes Jack a dull boy. - `v` (string, optional) — All work and no play makes Jack a dull boy. - `w` (string, optional) — All work and no play makes Jack a dull boy. - `x` (string, optional) — All work and no play makes Jack a dull boy. - `y` (string, optional) — All work and no play makes Jack a dull boy. - `z` (string, optional) — All work and no play makes Jack a dull boy. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjMin Object specifies `minProperties`. - `chico` (boolean, optional) — Chico description. - `groucho` (boolean, optional) — Groucho description. - `harpo` (boolean, optional) — Harpo description. - `zeppo` (boolean, optional) — Zeppo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjOrphan TBD object specs single member. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjReqMissing Object schema lacks a `required` array. - `chico` (string, optional) — Chico description. - `groucho` (string, optional) — Groucho description. - `harpo` (string, optional) — Harpo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjUndefined Object's `properties` are undefined. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjUndefinedReq This object requires a `zeppo` member that's not defined as a property. - `chico` (boolean, required) — Chico description. - `groucho` (boolean, required) — Groucho description. - `harpo` (boolean, required) — Harpo description. ### DataObjPutRequestBodyContentApplicationJsonSchemaObjUndefinedAdditionalFalse Complain that this schema has `additionalProperties` set to `false` with no defined `properties`. ### DataObjPutRequestBodyContentApplicationJsonSchemaSvcTallyObjKeys Complain that this set of keys is defined in more than one schema file. - `chico` (string, optional) — Chico description. - `groucho` (string, optional) — Groucho description. - `harpo` (string, optional) — Harpo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjAdditionalMissing Schema lacks `additionalProperties:false`. - `chico` (string, required) — Chico description. - `groucho` (string, required) — Groucho description. - `harpo` (string, required) — Harpo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjAdditionalTrue Schema specifies `additionalProperties:true`. - `chico` (string, required) — Chico description. - `groucho` (string, required) — Groucho description. - `harpo` (string, required) — Harpo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjBool Object members are all boolean, suggesting that an enum array might be better design. - `chico` (boolean, required) — Chico description. - `groucho` (boolean, required) — Groucho description. - `harpo` (boolean, required) — Harpo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjMax Object specifies `maxProperties`. - `chico` (boolean, optional) — Chico description. - `groucho` (boolean, optional) — Groucho description. - `harpo` (boolean, optional) — Harpo description. - `zeppo` (boolean, optional) — Zeppo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjMaxThreshold Object specifies many, many members. - `a` (string, required) — All work and no play makes Jack a dull boy. - `e` (string, required) — All work and no play makes Jack a dull boy. - `i` (string, required) — All work and no play makes Jack a dull boy. - `o` (string, required) — All work and no play makes Jack a dull boy. - `u` (string, required) — All work and no play makes Jack a dull boy. - `b` (string, optional) — All work and no play makes Jack a dull boy. - `c` (string, optional) — All work and no play makes Jack a dull boy. - `d` (string, optional) — All work and no play makes Jack a dull boy. - `f` (string, optional) — All work and no play makes Jack a dull boy. - `g` (string, optional) — All work and no play makes Jack a dull boy. - `h` (string, optional) — All work and no play makes Jack a dull boy. - `j` (string, optional) — All work and no play makes Jack a dull boy. - `k` (string, optional) — All work and no play makes Jack a dull boy. - `l` (string, optional) — All work and no play makes Jack a dull boy. - `m` (string, optional) — All work and no play makes Jack a dull boy. - `n` (string, optional) — All work and no play makes Jack a dull boy. - `p` (string, optional) — All work and no play makes Jack a dull boy. - `q` (string, optional) — All work and no play makes Jack a dull boy. - `r` (string, optional) — All work and no play makes Jack a dull boy. - `s` (string, optional) — All work and no play makes Jack a dull boy. - `t` (string, optional) — All work and no play makes Jack a dull boy. - `v` (string, optional) — All work and no play makes Jack a dull boy. - `w` (string, optional) — All work and no play makes Jack a dull boy. - `x` (string, optional) — All work and no play makes Jack a dull boy. - `y` (string, optional) — All work and no play makes Jack a dull boy. - `z` (string, optional) — All work and no play makes Jack a dull boy. ### DataObjPutResponsesContentApplicationJsonSchemaObjMin Object specifies `minProperties`. - `chico` (boolean, optional) — Chico description. - `groucho` (boolean, optional) — Groucho description. - `harpo` (boolean, optional) — Harpo description. - `zeppo` (boolean, optional) — Zeppo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjOrphan TBD object specs single member. ### DataObjPutResponsesContentApplicationJsonSchemaObjReqMissing Object schema lacks a `required` array. - `chico` (string, optional) — Chico description. - `groucho` (string, optional) — Groucho description. - `harpo` (string, optional) — Harpo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjUndefined Object's `properties` are undefined. ### DataObjPutResponsesContentApplicationJsonSchemaObjUndefinedReq This object requires a `zeppo` member that's not defined as a property. - `chico` (boolean, required) — Chico description. - `groucho` (boolean, required) — Groucho description. - `harpo` (boolean, required) — Harpo description. ### DataObjPutResponsesContentApplicationJsonSchemaObjUndefinedAdditionalFalse Complain that this schema has `additionalProperties` set to `false` with no defined `properties`. ### DataObjPutResponsesContentApplicationJsonSchemaSvcTallyObjKeys Complain that this set of keys is defined in more than one schema file. - `chico` (string, optional) — Chico description. - `groucho` (string, optional) — Groucho description. - `harpo` (string, optional) — Harpo description. ## Examples **Request** ```json { "obj-additional-missing": { "chico": "Alpha", "groucho": "Bravo", "harpo": "Charlie" }, "obj-additional-true": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-bool": { "chico": false, "groucho": true, "harpo": true }, "obj-max": { "chico": true, "groucho": false, "harpo": true }, "obj-max-threshold": { "a": "All work and no play", "e": "makes Jack a dull boy", "i": "All work and no play", "o": "makes Jack a dull boy", "u": "All work and no play" }, "obj-min": { "chico": true, "groucho": false, "harpo": true, "zeppo": false }, "obj-orphan": { "singleMember": "value" }, "obj-req-missing": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-undefined": { "allBetsAreOff": true }, "obj-undefined-req": { "chico": false, "groucho": true, "harpo": true, "zeppo": false }, "schema-required-with-default": true } ``` **Response** ```json { "obj-additional-missing": { "chico": "Alpha", "groucho": "Bravo", "harpo": "Charlie" }, "obj-additional-true": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-bool": { "chico": false, "groucho": true, "harpo": true }, "obj-max": { "chico": true, "groucho": false, "harpo": true }, "obj-max-threshold": { "a": "All work and no play", "e": "makes Jack a dull boy", "i": "All work and no play", "o": "makes Jack a dull boy", "u": "All work and no play" }, "obj-min": { "chico": true, "groucho": false, "harpo": true, "zeppo": false }, "obj-orphan": { "singleMember": "value" }, "obj-req-missing": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-undefined": { "allBetsAreOff": true }, "obj-undefined-req": { "chico": false, "groucho": true, "harpo": true, "zeppo": false }, "schema-required-read-only": true, "schema-required-with-default": true } ``` **SDK Code** ```python import requests url = "http://{hostname}/test-suite/v2/data/obj" payload = { "obj-additional-missing": { "chico": "Alpha", "groucho": "Bravo", "harpo": "Charlie" }, "obj-additional-true": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-bool": { "chico": False, "groucho": True, "harpo": True }, "obj-max": { "chico": True, "groucho": False, "harpo": True }, "obj-max-threshold": { "a": "All work and no play", "e": "makes Jack a dull boy", "i": "All work and no play", "o": "makes Jack a dull boy", "u": "All work and no play" }, "obj-min": { "chico": True, "groucho": False, "harpo": True, "zeppo": False }, "obj-orphan": { "singleMember": "value" }, "obj-req-missing": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-undefined": { "allBetsAreOff": True }, "obj-undefined-req": { "chico": False, "groucho": True, "harpo": True, "zeppo": False }, "schema-required-with-default": True } headers = {"Content-Type": "application/json"} response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'http://{hostname}/test-suite/v2/data/obj'; const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"obj-additional-missing":{"chico":"Alpha","groucho":"Bravo","harpo":"Charlie"},"obj-additional-true":{"chico":"Delta","groucho":"Echo","harpo":"Foxtrot"},"obj-bool":{"chico":false,"groucho":true,"harpo":true},"obj-max":{"chico":true,"groucho":false,"harpo":true},"obj-max-threshold":{"a":"All work and no play","e":"makes Jack a dull boy","i":"All work and no play","o":"makes Jack a dull boy","u":"All work and no play"},"obj-min":{"chico":true,"groucho":false,"harpo":true,"zeppo":false},"obj-orphan":{"singleMember":"value"},"obj-req-missing":{"chico":"Delta","groucho":"Echo","harpo":"Foxtrot"},"obj-undefined":{"allBetsAreOff":true},"obj-undefined-req":{"chico":false,"groucho":true,"harpo":true,"zeppo":false},"schema-required-with-default":true}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "http://{hostname}/test-suite/v2/data/obj" payload := strings.NewReader("{\n \"obj-additional-missing\": {\n \"chico\": \"Alpha\",\n \"groucho\": \"Bravo\",\n \"harpo\": \"Charlie\"\n },\n \"obj-additional-true\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-bool\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true\n },\n \"obj-max\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true\n },\n \"obj-max-threshold\": {\n \"a\": \"All work and no play\",\n \"e\": \"makes Jack a dull boy\",\n \"i\": \"All work and no play\",\n \"o\": \"makes Jack a dull boy\",\n \"u\": \"All work and no play\"\n },\n \"obj-min\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"obj-orphan\": {\n \"singleMember\": \"value\"\n },\n \"obj-req-missing\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-undefined\": {\n \"allBetsAreOff\": true\n },\n \"obj-undefined-req\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"schema-required-with-default\": true\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("http://{hostname}/test-suite/v2/data/obj") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Put.new(url) request["Content-Type"] = 'application/json' request.body = "{\n \"obj-additional-missing\": {\n \"chico\": \"Alpha\",\n \"groucho\": \"Bravo\",\n \"harpo\": \"Charlie\"\n },\n \"obj-additional-true\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-bool\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true\n },\n \"obj-max\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true\n },\n \"obj-max-threshold\": {\n \"a\": \"All work and no play\",\n \"e\": \"makes Jack a dull boy\",\n \"i\": \"All work and no play\",\n \"o\": \"makes Jack a dull boy\",\n \"u\": \"All work and no play\"\n },\n \"obj-min\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"obj-orphan\": {\n \"singleMember\": \"value\"\n },\n \"obj-req-missing\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-undefined\": {\n \"allBetsAreOff\": true\n },\n \"obj-undefined-req\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"schema-required-with-default\": true\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("http://{hostname}/test-suite/v2/data/obj") .header("Content-Type", "application/json") .body("{\n \"obj-additional-missing\": {\n \"chico\": \"Alpha\",\n \"groucho\": \"Bravo\",\n \"harpo\": \"Charlie\"\n },\n \"obj-additional-true\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-bool\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true\n },\n \"obj-max\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true\n },\n \"obj-max-threshold\": {\n \"a\": \"All work and no play\",\n \"e\": \"makes Jack a dull boy\",\n \"i\": \"All work and no play\",\n \"o\": \"makes Jack a dull boy\",\n \"u\": \"All work and no play\"\n },\n \"obj-min\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"obj-orphan\": {\n \"singleMember\": \"value\"\n },\n \"obj-req-missing\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-undefined\": {\n \"allBetsAreOff\": true\n },\n \"obj-undefined-req\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"schema-required-with-default\": true\n}") .asString(); ``` ```php request('PUT', 'http://{hostname}/test-suite/v2/data/obj', [ 'body' => '{ "obj-additional-missing": { "chico": "Alpha", "groucho": "Bravo", "harpo": "Charlie" }, "obj-additional-true": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-bool": { "chico": false, "groucho": true, "harpo": true }, "obj-max": { "chico": true, "groucho": false, "harpo": true }, "obj-max-threshold": { "a": "All work and no play", "e": "makes Jack a dull boy", "i": "All work and no play", "o": "makes Jack a dull boy", "u": "All work and no play" }, "obj-min": { "chico": true, "groucho": false, "harpo": true, "zeppo": false }, "obj-orphan": { "singleMember": "value" }, "obj-req-missing": { "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" }, "obj-undefined": { "allBetsAreOff": true }, "obj-undefined-req": { "chico": false, "groucho": true, "harpo": true, "zeppo": false }, "schema-required-with-default": true }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("http://{hostname}/test-suite/v2/data/obj"); var request = new RestRequest(Method.PUT); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"obj-additional-missing\": {\n \"chico\": \"Alpha\",\n \"groucho\": \"Bravo\",\n \"harpo\": \"Charlie\"\n },\n \"obj-additional-true\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-bool\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true\n },\n \"obj-max\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true\n },\n \"obj-max-threshold\": {\n \"a\": \"All work and no play\",\n \"e\": \"makes Jack a dull boy\",\n \"i\": \"All work and no play\",\n \"o\": \"makes Jack a dull boy\",\n \"u\": \"All work and no play\"\n },\n \"obj-min\": {\n \"chico\": true,\n \"groucho\": false,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"obj-orphan\": {\n \"singleMember\": \"value\"\n },\n \"obj-req-missing\": {\n \"chico\": \"Delta\",\n \"groucho\": \"Echo\",\n \"harpo\": \"Foxtrot\"\n },\n \"obj-undefined\": {\n \"allBetsAreOff\": true\n },\n \"obj-undefined-req\": {\n \"chico\": false,\n \"groucho\": true,\n \"harpo\": true,\n \"zeppo\": false\n },\n \"schema-required-with-default\": true\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "obj-additional-missing": [ "chico": "Alpha", "groucho": "Bravo", "harpo": "Charlie" ], "obj-additional-true": [ "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" ], "obj-bool": [ "chico": false, "groucho": true, "harpo": true ], "obj-max": [ "chico": true, "groucho": false, "harpo": true ], "obj-max-threshold": [ "a": "All work and no play", "e": "makes Jack a dull boy", "i": "All work and no play", "o": "makes Jack a dull boy", "u": "All work and no play" ], "obj-min": [ "chico": true, "groucho": false, "harpo": true, "zeppo": false ], "obj-orphan": ["singleMember": "value"], "obj-req-missing": [ "chico": "Delta", "groucho": "Echo", "harpo": "Foxtrot" ], "obj-undefined": ["allBetsAreOff": true], "obj-undefined-req": [ "chico": false, "groucho": true, "harpo": true, "zeppo": false ], "schema-required-with-default": true ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "http://{hostname}/test-suite/v2/data/obj")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```