38
Work in Progress 1 Document Number: DSP-IS0202 2 Date: 2010-09-30 3 Version: 1.0.0a 4 CIM-RS Binding to JSON 5 Document Type: Informational Specification 6 Document Status: Work in Progress 7 Document Language: en-US 8 9 Information for Work-in-Progress version: This document is subject to change at any time without further notice. It expires on: 2011-03-31 Provide any comments through the DMTF Feedback Portal: http://www.dmtf.org/standards/feedback

Document Number: DSP-IS0202 Version: 1.0 - DMTF

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Document Number: DSP-IS0202 Version: 1.0 - DMTF

Work in Progress

1

Document Number: DSP-IS0202 2

Date: 2010-09-30 3

Version: 1.0.0a 4

CIM-RS Binding to JSON 5

Document Type: Informational Specification 6

Document Status: Work in Progress 7

Document Language: en-US 8

9

Information for Work-in-Progress version:

This document is subject to change at any time without further notice.

It expires on: 2011-03-31

Provide any comments through the DMTF Feedback Portal: http://www.dmtf.org/standards/feedback

Page 2: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

2 Work in Progress Version 1.0.0a

Copyright Notice 10

Copyright © 2010 Distributed Management Task Force, Inc. (DMTF). All rights reserved. 11

DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and systems 12 management and interoperability. Members and non-members may reproduce DMTF specifications and 13 documents, provided that correct attribution is given. As DMTF specifications may be revised from time to 14 time, the particular version and release date should always be noted. 15

Implementation of certain elements of this standard or proposed standard may be subject to third party 16 patent rights, including provisional patent rights (herein "patent rights"). DMTF makes no representations 17 to users of the standard as to the existence of such rights, and is not responsible to recognize, disclose, 18 or identify any or all such third party patent right, owners or claimants, nor for any incomplete or 19 inaccurate identification or disclosure of such rights, owners or claimants. DMTF shall have no liability to 20 any party, in any manner or circumstance, under any legal theory whatsoever, for failure to recognize, 21 disclose, or identify any such third party patent rights, or for such party’s reliance on the standard or 22 incorporation thereof in its product, protocols or testing procedures. DMTF shall have no liability to any 23 party implementing such standard, whether such implementation is foreseeable or not, nor to any patent 24 owner or claimant, and shall have no liability or responsibility for costs or losses incurred if a standard is 25 withdrawn or modified after publication, and shall be indemnified and held harmless by any party 26 implementing the standard from any and all claims of infringement by a patent owner for such 27 implementations. 28

For information about patents held by third-parties which have notified the DMTF that, in their opinion, 29 such patent may relate to or impact implementations of DMTF standards, visit 30 http://www.dmtf.org/about/policies/disclosures.php. 31

Page 3: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 3

CONTENTS 32

Foreword ....................................................................................................................................................... 4 33 Introduction ................................................................................................................................................... 5 34

Document conventions.......................................................................................................................... 5 35 Typographical conventions ......................................................................................................... 5 36 ABNF usage conventions ........................................................................................................... 5 37

1 Scope .................................................................................................................................................... 6 38 2 Normative references ............................................................................................................................ 6 39 3 Terms and definitions ............................................................................................................................ 7 40 4 Symbols and abbreviated terms............................................................................................................ 9 41 5 Concepts ............................................................................................................................................. 10 42 6 Conformance....................................................................................................................................... 10 43 7 CIM-RS binding to JSON .................................................................................................................... 10 44

7.1 General ..................................................................................................................................... 10 45 7.2 Character repertoire, representation, and escaping ................................................................. 11 46 7.3 MIME media type ...................................................................................................................... 11 47 7.4 Representation of links ............................................................................................................. 12 48 7.5 Representation of protocol payload elements .......................................................................... 13 49

7.5.1 NamespaceCollection payload element ...................................................................... 13 50 7.5.2 Namespace payload element ...................................................................................... 14 51 7.5.3 ClassCollection payload element................................................................................. 15 52 7.5.4 Class payload element ................................................................................................ 17 53 7.5.5 InstanceCollection payload element............................................................................ 20 54 7.5.6 Instance payload element............................................................................................ 21 55 7.5.7 QualifierTypeCollection payload element .................................................................... 23 56 7.5.8 QualifierType payload element .................................................................................... 24 57 7.5.9 MethodInvocationRequest payload element ............................................................... 26 58 7.5.10 MethodInvocationResponse payload element............................................................. 26 59 7.5.11 InstanceModificationRequest payload element ........................................................... 27 60 7.5.12 InstanceQueryRequest payload element .................................................................... 28 61 7.5.13 ErrorResponse payload element ................................................................................. 28 62

7.6 Representation of values used within payload elements.......................................................... 29 63 7.6.1 Method declaration ...................................................................................................... 29 64 7.6.2 Return value declaration.............................................................................................. 30 65 7.6.3 Parameter declaration ................................................................................................. 31 66 7.6.4 Property declaration..................................................................................................... 32 67 7.6.5 CIM value..................................................................................................................... 33 68 7.6.6 Embedded instances ................................................................................................... 34 69 7.6.7 Embedded objects ....................................................................................................... 35 70

ANNEX A (informative) Change log .......................................................................................................... 37 71 Bibliography ................................................................................................................................................ 38 72 73

Tables 74

Table 1 – Representation of CIM values by data type................................................................................ 33 75 Table 2 – Links of embedded instance ....................................................................................................... 34 76 77

Page 4: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

4 Work in Progress Version 1.0.0a

Foreword 78

The CIM-RS Binding to JSON (DSP-IS0202) informational specification was prepared by the DMTF CIM-79 RS Incubator. 80

DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and systems 81 management and interoperability. For information about the DMTF, see http://www.dmtf.org. 82

Acknowledgments 83

The DMTF acknowledges the following individuals for their contributions to this document: 84

• Andreas Maier, IBM (editor) 85

• Cornelia Davis, EMC 86

• George Ericson, EMC 87

• Johannes Holzer, IBM 88

• Robert Kieninger, IBM 89

• Larry Lamers, VMware 90

Page 5: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 5

Introduction 91

The information in this document should be sufficient to unambiguously identify the representation of 92 payload elements of the CIM-RS protocol defined in DSP-IS0201, in JavaScript Object Notation (JSON). 93

The target audience for this specification is typically implementers who are writing WBEM servers, WBEM 94 clients, or WBEM listeners supporting the CIM-RS protocol with a payload representation in JSON. 95

Document conventions 96

Typographical conventions 97

The following typographical conventions are used in this document: 98

• Document titles are marked in italics. 99

• Important terms that are used for the first time are marked in italics. 100

• Terms include a link to the term definition in the "Terms and definitions" clause, enabling easy 101 navigation to the term definition. 102

• ABNF rules are in monospaced font. 103

ABNF usage conventions 104

Format definitions in this document are specified using ABNF (see RFC5234), with the following 105 deviations: 106

• Literal strings are to be interpreted as case-sensitive Unicode characters, as opposed to the 107 definition in RFC5234 that interprets literal strings as case-insensitive US-ASCII characters. 108

109

Page 6: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

6 Work in Progress Version 1.0.0a

CIM-RS Binding to JSON 110

1 Scope 111

This informational specification describes the representation of payload elements of the CIM-RS protocol 112 defined in DSP-IS0201 in JavaScript Object Notation (JSON). 113

2 Normative references 114

The following referenced documents are indispensable for the application of this document. For dated or 115 versioned references, only the edition cited (including any corrigenda or DMTF update versions) applies. 116 For references without a date or version, the latest published edition of the referenced document 117 (including any corrigenda or DMTF update versions) applies. 118 119

DMTF DSP0004, CIM Infrastructure Specification 2.6, 120 http://www.dmtf.org/standards/published_documents/DSP0004_2.6.pdf 121

DMTF DSP0223, Generic Operations 1.0, 122 http://www.dmtf.org/standards/published_documents/DSP0223_1.0.pdf 123

DMTF DSP-IS0201, CIM Operations Over RESTful Services 1.0.0a (Work in Progress), 124 http://www.dmtf.org/standards/published_documents/DSP-IS0201_1.0.0a.pdf 125

ECMA-262, ECMAScript Language Specification, 5th Edition, December 2009, 126 http://www.ecma-international.org/publications/standards/Ecma-262.htm 127 For its errata dated 2010-06-24 or later, see 128 http://wiki.ecmascript.org/doku.php?id=es3.1:es3.1_proposal_working_draft 129

IETF RFC4627 (Informational), The application/json Media Type for JavaScript Object Notation (JSON), 130 http://tools.ietf.org/html/rfc4627 131

IETF RFC5234, Augmented BNF for Syntax Specifications: ABNF, 132 http://tools.ietf.org/html/rfc5234 133

IETF RFC-json-schema (Internet-Draft), A JSON Media Type for Describing the Structure and Meaning of 134 JSON Documents, March 2010, 135 http://tools.ietf.org/html/draft-zyp-json-schema-02 136 This version of this document uses a draft of the upcoming draft version 03, available at 137 http://groups.google.com/group/json-schema/browse_thread/thread/5dc7d56a18abd81b 138

ISO/IEC 10646:2003, Information technology -- Universal Multiple-Octet Coded Character Set (UCS), 139 http://standards.iso.org/ittf/PubliclyAvailableStandards/c039921_ISO_IEC_10646_2003(E).zip 140

ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards (2004, 5th 141 edition), 142 http://isotc.iso.org/livelink/livelink.exe?func=ll&objId=4230456&objAction=browse 143

Page 7: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 7

The Unicode Consortium, The Unicode Standard, Version 5.2.0, Annex #15: Unicode Normalization 144 Forms, 145 http://www.unicode.org/reports/tr15/ 146

3 Terms and definitions 147

In this document, some terms have a specific meaning beyond the normal English meaning. Those terms 148 are defined in this clause. 149

The terms "shall" ("required"), "shall not," "should" ("recommended"), "should not" ("not recommended"), 150 "may," "need not" ("not required"), "can" and "cannot" in this document are to be interpreted as described 151 in ISO/IEC Directives, Part 2, Annex H. The terms in parenthesis are alternatives for the preceding term, 152 for use in exceptional cases when the preceding term cannot be used for linguistic reasons. Note that 153 ISO/IEC Directives, Part 2, Annex H specifies additional alternatives. Occurrences of such additional 154 alternatives shall be interpreted in their normal English meaning. 155

The terms "clause," "subclause," "paragraph," and "annex" in this document are to be interpreted as 156 described in ISO/IEC Directives, Part 2, Clause 5. 157

The terms "normative" and "informative" in this document are to be interpreted as described in ISO/IEC 158 Directives, Part 2, Clause 3. In this document, clauses, subclauses, or annexes labeled "(informative)" do 159 not contain normative content. Notes and examples are always informative elements. 160

The terms defined in DSP0004 and DSP0223 apply to this document. The following additional terms are 161 used in this document. 162

3.1 163 JSON schema 164 a description of the structure and meaning of a JSON object, using the syntax defined in RFC-json-165 schema 166

3.2 167 link 168 a named relation targeting a resource or a resource collection. For details, see 7.4 169

3.3 170 MIME media type 171 a string identification for media types in Internet protocols, as defined in RFC2045 and RFC2046 172

3.4 173 Normalization Form C 174 a normalization form for UCS characters that avoids the use of combining marks where possible and that 175 allows comparing UCS character strings on a per-code-point basis. It is defined in The Unicode Standard, 176 Annex #15. 177

3.5 178 REST resource 179 any entity that is accessed through and targeted by a RESTful service 180

3.6 181 RESTful service 182 a service accessible using REST concepts 183

Page 8: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

8 Work in Progress Version 1.0.0a

3.7 184 UCS character 185 a character from the Universal Character Set defined in ISO/IEC 10646:2003. See also DSP0004 for an 186 overview. 187

3.8 188 UCS code position 189 a numeric identification for a UCS character in the range of 0x0 to 0x10FFFF, as defined in ISO/IEC 190 10646:2003. See also DSP0004 for an overview. 191

3.9 192 Unicode character 193 an alternate term for UCS character 194

3.10 195 WBEM client 196 a CIM client (see DSP0004) that supports a WBEM protocol. A WBEM client originates WBEM operations 197 for processing by a WBEM server. For details, see DSP0223. 198

3.11 199 WBEM indication 200 an interaction within a WBEM protocol that is originated on a WBEM server and processed by a WBEM 201 listener. For details, see DSP0223. This release of this document does not cover WBEM indications. 202

3.12 203 WBEM listener 204 a CIM listener (see DSP0004) that supports a WBEM protocol. A WBEM listener processes WBEM 205 indications originated by a WBEM server. For details, see DSP0223. 206

3.13 207 WBEM operation 208 an interaction within a WBEM protocol that is originated by a WBEM client and processed by a WBEM 209 server. For details, see DSP0223. 210

3.14 211 WBEM protocol 212 a communications protocol between WBEM client, WBEM server and WBEM listener. A WBEM protocol 213 defines how the WBEM operations and WBEM indications work, on top of an underlying protocol layer 214 (for example, HTTP, SOAP, or TCP). For details, see DSP0223. 215

3.15 216 WBEM resource identifier 217 a URI that addresses a REST resource in a WBEM server. Some but not all of those REST resources 218 correspond to CIM objects in a WBEM server. Also called "resource identifier" in this document. 219

3.16 220 WBEM server 221 a CIM server (see DSP0004) that supports a WBEM protocol. A WBEM server processes WBEM 222 operations originated by a WBEM client, and originates WBEM indications for processing by a WBEM 223 listener. For details, see DSP0223. 224

Page 9: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 9

4 Symbols and abbreviated terms 225

The abbreviations defined in DSP0004 and DSP0223 apply to this document. The following additional 226 abbreviations are used in this document. 227

4.1 228 ABNF 229 Augmented Backus-Naur Form, as defined in RFC5234 230

4.2 231 CIM 232 Common Information Model, as defined by DMTF 233

4.3 234 CIM-RS 235 CIM Operations Over RESTful Services, as defined in DSP-IS0201 236

4.4 237 CQL 238 CIM Query Language, as defined in DSP0202 239

4.5 240 ECMAScript 241 a scripting language that is the standard version of what was called JavaScript. It is defined in ECMA-242 262. 243

4.6 244 HTTP 245 Hyper Text Transfer Protocol. HTTP version 1.1 is defined in RFC2616. 246

4.7 247 IANA 248 Internet Assigned Numbers Authority; see http://www.iana.org 249

4.8 250 JSON 251 JavaScript Object Notation, as defined in ECMA-262 252

4.9 253 MIME 254 Multipurpose Internet Mail Extensions, as defined in IANA MIME Media Types 255

4.10 256 REST 257 Representational State Transfer, as originally and informally described in Architectural Styles and the 258 Design of Network-based Software Architectures 259

4.11 260 UCS 261 Universal Character Set, as defined in ISO/IEC 10646:2003 262

4.12 263 URI 264 Uniform Resource Identifier, as defined in RFC3986 265

Page 10: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

10 Work in Progress Version 1.0.0a

4.13 266 UTF-8 267 UCS Transformation Format 8, as defined in ISO/IEC 10646:2003 268

4.14 269 WBEM 270 Web Based Enterprise Management, as defined by DMTF 271

4.15 272 XML 273 eXtensible Markup Language, as defined by W3C 274

5 Concepts 275

This clause defines concepts that are the basis for the definition of the representation of CIM-RS payload 276 elements in JSON. 277

In most cases, the CIM-RS payload elements are represented as JSON objects with attributes that match 278 the generic properties of the payload element as defined in DSP-IS0201. 279

In most cases of using JSON arrays, the array members are named JSON objects based on the value of 280 a generic property defining the name, in order to provide a name-based direct access to the array 281 member. 282

Embedded CIM instances are represented as nested JSON objects. 283

6 Conformance 284

A representation of CIM-RS payload elements in JSON conforms to this document only if it conforms to 285 all normative rules stated in this document. 286

The term "CIM-RS representation in JSON" shall be used only for representations of CIM-RS payload 287 elements in JSON that conform to this document. 288

7 CIM-RS binding to JSON 289

This clause defines the binding of CIM-RS to JSON. 290

7.1 General 291

A CIM-RS payload element represented in JSON shall conform to the grammar defined by the symbol 292 JSONText defined in clause 15.12.1 ("The JSON Grammar") of ECMA-262. 293

Care should be taken to distinguish text in ECMA-262 that applies to the JSON language from text that 294 applies to the ECMAScript language. Because the use of JSON for the representation of CIM represents 295 a different usage context than the use of JSON within ECMAScript, rules defined outside of but 296 referenced from within clause 15.12.1 of ECMA-262 shall apply to this document unless otherwise noted. 297 NOTE: Although RFC4627 defines the grammar of the JSON language consistently with clause 15.12.1 of ECMA-298 262, RFC4627 is an informational RFC whose purpose is to describe the MIME media type for JSON but not to be 299 the normative definition of the JSON grammar. For this reason, this document references ECMA-262 as the 300 normative definition of the JSON grammar. 301

Page 11: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 11

7.2 Character repertoire, representation, and escaping 302

The JSON grammar defined in clause 15.12.1 of ECMA-262 references the SourceCharacter symbol 303 defined in its clause 6 as the basis for its characters. The definition of the SourceCharacter symbol 304 applies to the ECMAScript use of JSON and uses the character repertoire of Unicode V3, requires a 305 representation of UCS characters in Normalization Form C, and effectively implies a requirement for an 306 encoding in UTF-16 (or one of its little endian and big endian derivatives). 307

The following rules apply to a use of the SourceCharacter symbol for the representation of CIM-RS 308 payload elements in JSON: 309

1) The character repertoire of SourceCharacter shall be that defined for values of the CIM string 310 type (defined in DSP0004). 311

NOTE: That character repertoire is larger than that defined by ECMA-262. 312

2) SourceCharacter shall be represented in Normalization Form C. 313

3) SourceCharacter shall be encoded in UTF-8. 314

ECMA-262 defines backslash-based escaping for certain characters including the representation of UCS 315 characters using their UCS code positions. However, in the definition of the UnicodeEscapeSequence 316 symbol in its clause 7.8.4 ("String Literals"), ECMA-262 limits the representation of UCS code positions to 317 a value range of four hex digits. This is not sufficient for representing the character repertoire defined for 318 values of the CIM string type (and also not for representing the character repertoire used by ECMA-262 319 itself). 320

Therefore, the representation of CIM-RS payload elements in JSON shall support the following extended 321 definition of the UnicodeEscapeSequence symbol: 322

UnicodeEscapeSequence :: 323 u HexDigit HexDigit HexDigit HexDigit 324 u HexDigit HexDigit HexDigit HexDigit HexDigit 325 u HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit 326

NOTE: This extended definition is consistent with the four-to-six-digit form of the short identifier for UCS characters 327 defined in clause 6.5 of ISO/IEC 10646:2003 (for example, U+000A, U+12345, and U+10FFFF). 328

7.3 MIME media type 329

DSP-IS0201 requires that CIM-RS payload representation descriptions define a unique MIME media type 330 that identifies the representation. 331

RFC4627 defines "application/json" as the MIME media type for JSON. This media type is registered with 332 IANA (see IANA MIME Media Types). That media type does not allow distinguishing between different 333 uses of JSON. Because JSON does not have a strong notion of a schema for defining a particular use of 334 JSON, this document defines a MIME media type that expresses the particular use of JSON for 335 representing payload elements of the CIM-RS protocol. 336

The MIME media type identifying the representation of CIM-RS payload elements in JSON shall be: 337

application/vnd.dmtf.cimrs+json 338

The version of this document shall be used to identify the version of the JSON representation. That 339 version shall be included in the MIME media type as a media type parameter named "version". 340

For example, the current version of the JSON representation results in the following MIME media type: 341

application/vnd.dmtf.cimrs+json;version=1.0.0 342

343

Page 12: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

12 Work in Progress Version 1.0.0a

Work-in-Progress note:

As currently described, the media type only identifies the payload representation (for example, CIM-RS JSON or CIM-RS XML) and its version.

Beyond that, the media type could be used to identify the type of payload element with an additional media type parameter named "pletype", as used in the following examples:

application/vnd.dmtf.cimrs+json;version=1.0.0;pletype=class application/vnd.dmtf.cimrs+json;version=1.0.0;pletype=instancecollection application/vnd.dmtf.cimrs+json;version=1.0.0;pletype=instancequeryrequest

This information could be used by CIM-RS consumers to detect the payload element type without having to parse the payload. It could also be used for additional validation of the payload element type, relative to what is expected for the particular CIM-RS operation.

Since it is well-defined which payload element type each CIM-RS message contains, this additional information would not be used for content negotiation about the payload element type; content negotiation would only be used for the type of payload representation.

Feedback about the idea to expand the media type to also include the payload element type is welcome.

344

7.4 Representation of links 345

DSP-IS0201 requires that CIM-RS payload representation descriptions define how links are represented. 346

A set of links shall be represented in JSON as a JSON property named "links" whose value is a JSON 347 object that conforms to the following JSON schema: 348

{ 349 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/links", 350 "description": "Object type of 'links' property.", 351 "type": "object", 352 "properties": { 353 "links": { 354 "description": "A set of links.", 355 "type": "object", 356 "additionalProperties": { 357 "description": "Each additional JSON property shall represent a link. The 358 JSON property name shall be the link name.", 359 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link" 360 } 361 } 362 } 363 } 364

A single link shall be represented in JSON as a JSON property that is named with the link name and 365 whose value is a JSON object that conforms to the following JSON schema: 366

{ 367 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 368 "description": "Object type of a link property.", 369 "type": "object", 370

Page 13: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 13

"properties": { 371 "href": { 372 "description": "The target of the link.", 373 "type": "string", 374 "format": "uri", 375 "required": true 376 } 377 } 378 } 379

NOTE: This definition for a set of links is similar to that of the link description object defined in RFC-json-structure. 380 The difference is the usage of associative arrays in this definition whereby the link set is represented as a JSON 381 object with properties named with the link names, while in RFC-json-structure the link set is represented as a JSON 382 array with items that are JSON objects whose "rel" property has a value that is the link name. Using the associative 383 array approach has the advantage of providing direct access to a link by link name. 384 EXAMPLE: 385

"links": { 386 "self": { 387 "href": "http://my.server/my/path" 388 }, 389 "parent": { 390 "href": "http://my.server/my" 391 } 392 } 393

This example defines a JSON property representing a set of links consisting of two links: A link named 394 "self" targeting "http://my.server/my/path" and a link named "parent" targeting "http://my.server/my". 395

7.5 Representation of protocol payload elements 396

DSP-IS0201 requires that CIM-RS payload representation descriptions define how the payload elements 397 defined in DSP-IS0201 are represented. This is defined in the subclauses of this clause. 398

7.5.1 NamespaceCollection payload element 399

A NamespaceCollection payload element shall be represented as a JSON object that conforms to the 400 following JSON schema: 401

{ 402 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/namespacecollection", 403 "description": "A NamespaceCollection payload element.", 404 "type": "object", 405 "properties": { 406 "links": { 407 "description": "The set of links of this payload element. For the meaning of 408 each link and for the requirement to specify this property and each link, see the 409 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 410 "type": "object", 411 "properties": { 412 "self": { 413 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 414 "required": true 415 } 416

Page 14: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

14 Work in Progress Version 1.0.0a

} 417 }, 418 "namespaces": { 419 "description": "The set of namespaces in the collection. When no child 420 properties are specified, this property may be specified or omitted.", 421 "type": "object", 422 "additionalProperties": { 423 "description": "Each additional JSON property shall represent a namespace. 424 The JSON property name shall be the namespace name.", 425 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/namespace" 426 } 427 } 428 } 429 } 430

EXAMPLE: 431

{ 432 "links": { 433 "self": { 434 "href": "http://acme.com:5988/cimrs/namespaces"} 435 }, 436 "namespaces": { 437 "root/cimv2": { # A namespace, as defined in 7.5.2. 438 "links": { 439 "self": { 440 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2"}, 441 "classes": { 442 "href": "classes"}, 443 "qualifiers": { 444 "href": "qualifiers"}, 445 "instancequery": { 446 "href": "instancequery"} 447 } 448 }, 449 . . . # more namespaces 450 } 451 } 452

7.5.2 Namespace payload element 453

A Namespace payload element shall be represented as a JSON property that is named with the 454 namespace name and whose value is a JSON object that conforms to the following JSON schema: 455

{ 456 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/namespace", 457 "description": "Object type for the namespace property of a Namespace payload 458 element.", 459 "type": "object", 460 "properties": { 461 "links": { 462 "description": "The set of links of this payload element. For the meaning of 463

Page 15: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 15

each link and for the requirement to specify this property and each link, see the 464 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 465 "type": "object", 466 "properties": { 467 "self": { 468 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 469 "required": true 470 }, 471 "classes": { 472 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 473 "required": true 474 }, 475 "qualifiers": { 476 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 477 "required": true 478 }, 479 "instancequery": { 480 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 481 "required": true 482 } 483 } 484 } 485 } 486 } 487

EXAMPLE: 488

"root/cimv2": { 489 "links": { 490 "self": { 491 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2"}, 492 "classes": { 493 "href": "classes"}, 494 "qualifiers": { 495 "href": "qualifiers"}, 496 "instancequery": { 497 "href": "instancequery"} 498 } 499 } 500

7.5.3 ClassCollection payload element 501

A ClassCollection payload element shall be represented as a JSON object that conforms to the following 502 JSON schema: 503

{ 504 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/classcollection", 505 "description": "A ClassCollection payload element.", 506 "type": "object", 507 "properties": { 508 "links": { 509 "description": "The set of links of this payload element. For the meaning of 510

Page 16: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

16 Work in Progress Version 1.0.0a

each link and for the requirement to specify this property and each link, see the 511 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 512 "type": "object", 513 "properties": { 514 "self": { 515 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 516 "required": true 517 }, 518 "namespace": { 519 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 520 "required": true 521 } 522 } 523 }, 524 "classes": { 525 "description": "The set of classes in the collection. When no child 526 properties are specified, this property may be specified or omitted.", 527 "type": "object", 528 "additionalProperties": { 529 "description": "Each additional JSON property shall represent a class. The 530 JSON property name shall be the class name.", 531 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/class" 532 } 533 } 534 } 535 } 536

EXAMPLE: 537

{ 538 "links": { 539 "self": { 540 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes"}, 541 "namespace": { 542 "href": ".."} 543 }, 544 "classes": { 545 "CIM_SubClass1OfExample": { # A class, as defined in 7.5.4. 546 "links": { 547 "self": { 548 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_S549 ubClass1OfExample"}, 550 "namespace": { 551 "href": "../.."}, 552 "instances": { 553 "href": "instances"}, 554 "methodinvocation": { 555 "href": "methodinvocation"}, 556 "associators": { 557 "href": "associators"}, 558 "references": { 559

Page 17: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 17

"href": "references"} 560 }, 561 "superclass": "CIM_Example", 562 "qualifiers": { . . . }, # for details, see 7.5.4. 563 "methods": { . . . }, # for details, see 7.5.4. 564 "properties": { . . . } # for details, see 7.5.4. 565 }, 566 . . . # more classes 567 } 568 } 569

7.5.4 Class payload element 570

A Class payload element shall be represented as a JSON property that is named with the class name and 571 whose value is a JSON object that conforms to the following JSON schema: 572

{ 573 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/class", 574 "description": "Object type for the class property of a Class payload element.", 575 "type": "object", 576 "properties": { 577 "links": { 578 "description": "The set of links of this payload element. For the meaning of 579 each link and for the requirement to specify this property and each link, see the 580 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 581 "type": "object", 582 "properties": { 583 "self": { 584 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 585 "required": true 586 }, 587 "namespace": { 588 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 589 "required": true 590 }, 591 "instances": { 592 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 593 "required": true 594 }, 595 "methodinvocation": { 596 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 597 "required": true 598 }, 599 "associators": { 600 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 601 "required": true 602 }, 603 "references": { 604 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 605 "required": true 606 } 607

Page 18: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

18 Work in Progress Version 1.0.0a

} 608 }, 609 "superclass": { 610 "description": "The name of the superclass of this class, if any.", 611 "type": "string", 612 "format": "cim-classname" 613 }, 614 "qualifiers": { 615 "description": "The set of qualifier values of this class. When no child 616 properties are specified, this property may be specified or omitted.", 617 "type": "object", 618 "additionalProperties": { 619 "description": "Each additional JSON property shall represent a qualifier 620 value. The JSON property name shall be the qualifier name. For details on the JSON 621 type used to represent the value, see 7.6.5.", 622 "type": "any" 623 } 624 }, 625 "methods": { 626 "description": "The set of method declarations of this class. When no child 627 properties are specified, this property may be specified or omitted.", 628 "type": "object", 629 "additionalProperties": { 630 "description": "Each additional JSON property shall represent a method 631 declaration. The JSON property name shall be the method name.", 632 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/methoddeclaration" 633 } 634 }, 635 "properties": { 636 "description": "The set of property declarations of this class. When no child 637 properties are specified, this property may be specified or omitted.", 638 "type": "object", 639 "additionalProperties": { 640 "description": "Each additional JSON property shall represent a CIM 641 property declaration. The JSON property name shall be the CIM property name.", 642 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/propertydeclaration" 643 } 644 } 645 } 646 } 647

EXAMPLE: 648

"CIM_RegisteredProfile": { 649 "links": { 650 "self": { 651 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_Regis652 teredProfile"}, 653 "namespace": { 654 "href": "../.."}, 655 "instances": { 656 "href": "instances"}, 657

Page 19: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 19

"methodinvocation": { 658 "href": "methodinvocation"}, 659 "associators": { 660 "href": "associators"}, 661 "references": { 662 "href": "references"} 663 }, 664 "superclass": "CIM_RegisteredSpecification", 665 "qualifiers": { 666 "Version": "2.26.0", 667 . . . # more qualifier value specifications on the class 668 }, 669 "methods": { 670 "CloseConformantInstances": { 671 "qualifiers": { 672 "Experimental": true, 673 . . . # more qualifier value specifications on the method 674 }, 675 "returnvalue": { 676 "type": "uint32" 677 }, 678 "parameters": { 679 "EnumerationContext": { 680 "qualifiers": { 681 "In": true, 682 . . . # more qualifier value specifications on the parameter 683 }, 684 "type": "string" 685 }, 686 . . . # more parameter declarations 687 } 688 }, 689 . . . # more method declarations 690 }, 691 "properties": { 692 "SpecificationType": { 693 "qualifiers": { 694 "Override": "SpecificationType", 695 "ValueMap": ["2"], 696 "Values": ["Profile"], 697 . . . # more qualifier value specifications on the property 698 }, 699 "type": "uint16" 700 }, 701 . . . # more property declarations 702 } 703 } 704

Page 20: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

20 Work in Progress Version 1.0.0a

7.5.5 InstanceCollection payload element 705

An InstanceCollection payload element shall be represented as a JSON object that conforms to the 706 following JSON schema: 707

{ 708 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/instancecollection", 709 "description": "An InstanceCollection payload element.", 710 "type": "object", 711 "properties": { 712 "links": { 713 "description": "The set of links of this payload element. For the meaning of 714 each link and for the requirement to specify this property and each link, see the 715 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 716 "type": "object", 717 "properties": { 718 "self": { 719 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 720 "required": true 721 }, 722 "class": { 723 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 724 "required": true 725 } 726 } 727 }, 728 "instances": { 729 "description": "The set of instances in the collection. When no child 730 properties are specified, this property may be specified or omitted.", 731 "type": "array", 732 "items": "http://schemas.dmtf.org/cimrs/is1/json/is1/instance" 733 } 734 } 735 } 736

EXAMPLE: 737

{ 738 "links": { 739 "self": { 740 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_Sourc741 eExample/instances"}, 742 "class": { 743 "href": ".."} 744 }, 745 "instances": [ 746 { # An instance, as defined in 7.5.6. 747 "links": { 748 "self": { 749 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_R750 egisteredProfile/instances/DMTF%3AFan%3A1.1.0"}, 751 "class": { 752

Page 21: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 21

"href": "../.."}, 753 "methodinvocation": { 754 "href": "methodinvocation"}, 755 "associators": { 756 "href": "associators"}, 757 "references": { 758 "href": "references"} 759 }, 760 "class": "CIM_RegisteredProfile", 761 "properties": { 762 "InstanceID": "DMTF:Fan:1.1.0", 763 "RegisteredName": "Fan", 764 "RegisteredOrganization": 2, 765 "RegisteredVersion": "1.1.0", 766 . . . # more properties 767 } 768 }, 769 . . . # more instances 770 ] 771 } 772

7.5.6 Instance payload element 773

An Instance payload element shall be represented as a JSON object that conforms to the following JSON 774 schema: 775

{ 776 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/instance", 777 "description": "An Instance payload element.", 778 "type": "object", 779 "properties": { 780 "links": { 781 "description": "The set of links of this payload element. For the meaning of 782 each link and for the requirement to specify this property and each link, see the 783 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 784 "type": "object", 785 "properties": { 786 "self": { 787 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link" 788 }, 789 "class": { 790 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link" 791 }, 792 "methodinvocation": { 793 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link" 794 }, 795 "associators": { 796 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link" 797 }, 798 "references": { 799 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link" 800

Page 22: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

22 Work in Progress Version 1.0.0a

} 801 } 802 }, 803 "class": { 804 "description": "The name of the creation class of this instance.", 805 "type": "string", 806 "format": "cim-classname", 807 "required": true 808 }, 809 "properties": { 810 "description": "The set of property values of this instance. When no child 811 properties are specified, this property may be specified or omitted.", 812 "type": "object", 813 "additionalProperties": { 814 "description": "Each additional JSON property shall represent a property 815 value. The JSON property name shall be the CIM property name. For details on the 816 JSON type used to represent the value, see 7.6.5.", 817 "type": "any" 818 } 819 } 820 } 821 } 822

EXAMPLE: 823

{ 824 "links": { 825 "self": { 826 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_Regis827 teredProfile/instances/DMTF%3AFan%3A1.1.0"}, 828 "class": { 829 "href": "../.."}, 830 "methodinvocation": { 831 "href": "methodinvocation"}, 832 "associators": { 833 "href": "associators"}, 834 "references": { 835 "href": "references"} 836 }, 837 "class": "CIM_RegisteredProfile", 838 "properties": { 839 "InstanceID": "DMTF:Fan:1.1.0", 840 "RegisteredName": "Fan", 841 "RegisteredOrganization": 2, 842 "RegisteredVersion": "1.1.0", 843 . . . # more properties 844 } 845 } 846

Page 23: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 23

7.5.7 QualifierTypeCollection payload element 847

A QualifierTypeCollection payload element shall be represented as a JSON object that conforms to the 848 following JSON schema: 849

{ 850 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/qualifiertypecollection", 851 "description": "A QualifierTypeCollection payload element.", 852 "type": "object", 853 "properties": { 854 "links": { 855 "description": "The set of links of this payload element. For the meaning of 856 each link and for the requirement to specify this property and each link, see the 857 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 858 "type": "object", 859 "properties": { 860 "self": { 861 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 862 "required": true 863 }, 864 "namespace": { 865 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 866 "required": true 867 } 868 } 869 }, 870 "qualifiertypes": { 871 "description": "The set of qualifier types in the collection. When no child 872 properties are specified, this property may be specified or omitted.", 873 "type": "object", 874 "additionalProperties": { 875 "description": "Each additional JSON property shall represent a qualifier 876 type. The JSON property name shall be the qualifier name.", 877 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/qualifiertype" 878 } 879 } 880 } 881 } 882

EXAMPLE: 883

{ 884 "links": { 885 "self": { 886 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/qualifiertypes"}, 887 "namespace": { 888 "href": ".."} 889 }, 890 "qualifiertypes": { 891 "Abstract": { # A qualifier type, as defined in 7.5.8. 892 "links": { 893 "self": { 894

Page 24: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

24 Work in Progress Version 1.0.0a

"href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/qualifiers/Ab895 stract"}, 896 "namespace": { 897 "href": "../.."} 898 }, 899 "type": "boolean", 900 "default": false, 901 "scope": [ "class", "association", "indication" ], 902 "flavor": [ "Restricted" ] 903 }, 904 . . . # more qualifier types 905 } 906 } 907

7.5.8 QualifierType payload element 908

A QualifierType payload element shall be represented as a JSON property that is named with the qualifier 909 name and whose value is a JSON object that conforms to the following JSON schema: 910

{ 911 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/qualifiertype", 912 "description": "Object type for the qualifier property of a QualifierType payload 913 element.", 914 "type": "object", 915 "properties": { 916 "links": { 917 "description": "The set of links of this payload element. For the meaning of 918 each link and for the requirement to specify this property and each link, see the 919 CIM-RS operations defined in DSP-IS0201 that use this payload element.", 920 "type": "object", 921 "properties": { 922 "self": { 923 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 924 "required": true 925 }, 926 "namespace": { 927 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/link", 928 "required": true 929 } 930 } 931 }, 932 "type": { 933 "description": "The CIM datatype of this qualifier type. For details, see 934 7.6.5.", 935 "type": "string", 936 "enum": [ "boolean", "string", "char16", "uint8", "sint8", "uint16", 937 "sint16", "uint32", "sint32", "uint64", "sint64", "datetime", 938 "real32", "real64" ], 939 "required": true 940 }, 941 "isarray": { 942

Page 25: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 25

"description": "Indicates whether the CIM datatype of this qualifier type is 943 an array. For details, see 7.6.5.", 944 "type": "boolean", 945 "default": false 946 }, 947 "default": { 948 "description": "The default value of this qualifier type, if any. For details 949 on the JSON type used to represent the value, see 7.6.5.", 950 "type": "any" 951 }, 952 "scope": { 953 "description": "The scope of this qualifier type.", 954 "type": "array", 955 "required": true, 956 "minItems": 1, 957 "items": { 958 "description": "A CIM element type contributing to the scope of this 959 qualifier type.", 960 "type": "string", 961 "enum": [ "class", "association", "indication", "property", "reference", 962 "method", "parameter", "any" ] 963 } 964 }, 965 "flavor": { 966 "description": "The flavor of this qualifier type. When no array items are 967 specified, this property may be specified or omitted.", 968 "type": "array", 969 "default": [ "tosubclass", "enableoverride" ], 970 "items": { 971 "description": "A single flavor contributing to the overall flavor of this 972 qualifier type. See DSP0004 for valid combinations.", 973 "type": "string", 974 "enum": [ "restricted", "tosubclass", "enableoverride", "disableoverride", 975 "translatable" ] 976 } 977 } 978 } 979 } 980

EXAMPLE: 981 "Abstract": { 982 "links": { 983 "self": { 984 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/qualifiers/Abstra985 ct"}, 986 "namespace": { 987 "href": "../.."} 988 }, 989 "type": "boolean", 990 "default": false, 991 "scope": [ "class", "association", "indication" ], 992

Page 26: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

26 Work in Progress Version 1.0.0a

"flavor": [ "Restricted" ] 993 } 994

7.5.9 MethodInvocationRequest payload element 995

A MethodInvocationRequest payload element shall be represented as a JSON property that is named 996 with the method name and whose value is a JSON object that conforms to the following JSON schema: 997

{ 998 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/methodinvocationrequest", 999 "description": "Object type for the method property of a MethodInvocationRequest 1000 payload element.", 1001 "type": "object", 1002 "properties": { 1003 "parameters": { 1004 "description": "The set of input parameter values for the method to be 1005 invoked. When no child properties are specified, this property may be specified or 1006 omitted.", 1007 "type": "object", 1008 "additionalProperties": { 1009 "description": "Each additional JSON property shall represent a parameter 1010 value. The JSON property name shall be the parameter name. For details on the JSON 1011 type used to represent the value, see 7.6.5.", 1012 "type": "any" 1013 } 1014 } 1015 } 1016 } 1017

EXAMPLE: 1018 "SomeMethod": { 1019 "parameters": { 1020 "Parm1": "Some input data", 1021 . . . # more parameters 1022 } 1023 } 1024

7.5.10 MethodInvocationResponse payload element 1025

A MethodInvocationResponse payload element shall be represented as a JSON property that is named 1026 with the method name and whose value is a JSON object that conforms to the following JSON schema: 1027

{ 1028 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/methodinvocationresponse", 1029 "description": "Object type for the method property of a MethodInvocationResponse 1030 payload element.", 1031 "type": "object", 1032 "properties": { 1033 "returnvalue": { 1034 "description": "The return value of the method that was invoked. For details 1035 on the JSON type used to represent the value, see 7.6.5.", 1036 "type": "any", 1037 "required": true 1038

Page 27: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 27

}, 1039 "parameters": { 1040 "description": "The set of output parameter values for the method that was 1041 invoked. When no child properties are specified, this property may be specified or 1042 omitted.", 1043 "type": "object", 1044 "additionalProperties": { 1045 "description": "Each additional JSON property shall represent a parameter 1046 value. The JSON property name shall be the parameter name. For details on the JSON 1047 type used to represent the value, see 7.6.5.", 1048 "type": "any" 1049 } 1050 } 1051 } 1052 } 1053

EXAMPLE: 1054 "SomeMethod": { 1055 "returnvalue": 42, 1056 "parameters": { 1057 "Parm2": "Some output data", 1058 . . . # more parameters 1059 } 1060 } 1061

7.5.11 InstanceModificationRequest payload element 1062

An InstanceModificationRequest payload element shall be represented as a JSON object that conforms 1063 to the following JSON schema: 1064

{ 1065 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/instancemodificationrequest", 1066 "description": "An InstanceModificationRequest payload element.", 1067 "type": "object", 1068 "properties": { 1069 "replace": { 1070 "description": "The set of properties whose values are to be replaced. When 1071 no child properties are specified, this property may be specified or omitted.", 1072 "type": "object", 1073 "additionalProperties": { 1074 "description": "Each additional JSON property shall represent a CIM 1075 property value. The JSON property name shall be the CIM property name. For details 1076 on the JSON type used to represent the value, see 7.6.5.", 1077 "type": "any" 1078 } 1079 } 1080 } 1081 } 1082

This version of this document defines value replacement as the only type of property value modification. 1083 Future support for other types of property value modifications can be provided by adding sibling (JSON) 1084 properties to the "replace" property. 1085 EXAMPLE: 1086

Page 28: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

28 Work in Progress Version 1.0.0a

{ 1087 "replace": { 1088 "Caption": "A changed caption", 1089 . . . # more properties to be replaced 1090 } 1091 } 1092

7.5.12 InstanceQueryRequest payload element 1093

An InstanceQueryRequest payload element shall be represented as a JSON object that conforms to the 1094 following JSON schema: 1095

{ 1096 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/instancequeryrequest", 1097 "description": "An InstanceQueryRequest payload element.", 1098 "type": "object", 1099 "properties": { 1100 "querystring": { 1101 "description": "The instance query to be executed.", 1102 "type": "string", 1103 "required": true 1104 } 1105 "querylanguage": { 1106 "description": "The query language used to express the instance query.", 1107 "type": "string", 1108 "required": true 1109 } 1110 } 1111 } 1112

EXAMPLE: 1113 { 1114 "querystring": "SELECT OBJECTPATH(CIM_StorageExtent) AS Path, ElementName 1115 FROM CIM_StorageExtent", 1116 "querylanguage": "DMTF:CQL" 1117 } 1118

7.5.13 ErrorResponse payload element 1119

An ErrorResponse payload element shall be represented as a JSON object that conforms to the following 1120 JSON schema: 1121

{ 1122 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/errorresponse", 1123 "description": "An ErrorResponse payload element.", 1124 "type": "object", 1125 "properties": { 1126 "statusCode": { 1127 "description": "The CIM status code of the error response.", 1128 "type": "integer" 1129 }, 1130 "statusDescription": { 1131

Page 29: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 29

"description": "The CIM status description of the error response.", 1132 "type": "string" 1133 }, 1134 "errors": { 1135 "description": "The set of CIM_Error instances describing the errors. When no 1136 child properties are specified, this property may be specified or omitted.", 1137 "type": "array", 1138 "items": "http://schemas.dmtf.org/cimrs/is1/json/is1/instance" 1139 } 1140 } 1141 } 1142

EXAMPLE: 1143

{ 1144 "statusCode": 2, 1145 "statusDescription": "The CIM instance does not exist." 1146

} 1147

7.6 Representation of values used within payload elements 1148

This clause describes the JSON representation of values used within the payload elements defined in 1149 7.5, that are not defined in 7.5. The representation of these values is described by means of JSON object 1150 types that are identified by their "id" property. 1151

7.6.1 Method declaration 1152

A method declaration shall be represented as a JSON property that is named with the method name and 1153 whose value is a JSON object that conforms to the following JSON schema: 1154

{ 1155 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/methoddeclaration", 1156 "description": "A method declaration.", 1157 "type": "object", 1158 "properties": { 1159 "qualifiers": { 1160 "description": "The set of qualifier values of this method. When no child 1161 properties are specified, this property may be specified or omitted.", 1162 "type": "object", 1163 "additionalProperties": { 1164 "description": "Each additional JSON property shall represent a qualifier 1165 value. The JSON property name shall be the qualifier name. For details on the JSON 1166 type used to represent the value, see 7.6.5.", 1167 "type": "any" 1168 } 1169 }, 1170 "returnvalue": { 1171 "description": "The declaration of the return value.", 1172 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/returnvaluedeclaration", 1173 "required": true 1174 }, 1175 "parameters": { 1176 "description": "The set of parameters of this method declaration. When no 1177

Page 30: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

30 Work in Progress Version 1.0.0a

child properties are specified, this property may be specified or omitted.", 1178 "type": "object", 1179 "additionalProperties": { 1180 "description": "Each additional JSON property shall represent a parameter 1181 declaration. The JSON property name shall be the parameter name.", 1182 "type": "http://schemas.dmtf.org/cimrs/is1/json/is1/parameterdeclaration" 1183 } 1184 } 1185 } 1186 } 1187

EXAMPLE: 1188

"SomeMethod": { 1189 "qualifiers": { 1190 "Static": true, 1191 . . . # more qualifier value specifications on the method 1192 }, 1193 "returnvalue": { 1194 "type": "uint32" 1195 }, 1196 "parameters": { 1197 "Parm1": { 1198 "qualifiers": { 1199 "In": true, 1200 . . . # more qualifier value specifications on the parameter 1201 }, 1202 "type": "uint32" 1203 }, 1204 . . . # more parameter declarations 1205 } 1206 } 1207

7.6.2 Return value declaration 1208

A return value declaration shall be represented as a JSON property named "returnvalue", whose value is 1209 a JSON object that conforms to the following JSON schema: 1210

{ 1211 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/returnvaluedeclaration", 1212 "description": "A method return value declaration.", 1213 "type": "object", 1214 "properties": { 1215 "type": { 1216 "description": "The CIM datatype of the return value. For details, see 1217 7.6.5.", 1218 "type": "string", 1219 "enum": [ "boolean", "string", "char16", "uint8", "sint8", "uint16", 1220 "sint16", "uint32", "sint32", "uint64", "sint64", "datetime", 1221 "real32", "real64", "reference", "object", "instance" ], 1222 "required": true 1223

Page 31: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 31

}, 1224 "referenceClass": { 1225 "description": "The name of the CIM class of any referenced instances. This 1226 property is required if the 'type' property has a value of 'reference' and is not 1227 allowed otherwise. For details, see 7.6.5.", 1228 "type": "string", 1229 "format": "cim-classname" 1230 } 1231 } 1232 } 1233

EXAMPLE: See 7.6.1. 1234

7.6.3 Parameter declaration 1235

A parameter declaration shall be represented as a JSON property that is named with the parameter name 1236 and whose value is a JSON object that conforms to the following JSON schema: 1237

{ 1238 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/parameterdeclaration", 1239 "description": "A method parameter declaration.", 1240 "type": "object", 1241 "properties": { 1242 "qualifiers": { 1243 "description": "The set of qualifier values of this parameter. When no child 1244 properties are specified, this property may be specified or omitted.", 1245 "type": "object", 1246 "additionalProperties": { 1247 "description": "Each additional JSON property shall represent a qualifier 1248 value. The JSON property name shall be the qualifier name. For details on the JSON 1249 type used to represent the value, see 7.6.5.", 1250 "type": "any" 1251 } 1252 }, 1253 "type": { 1254 "description": "The CIM datatype of the parameter. For details, see 7.6.5.", 1255 "type": "string", 1256 "enum": [ "boolean", "string", "char16", "uint8", "sint8", "uint16", 1257 "sint16", "uint32", "sint32", "uint64", "sint64", "datetime", 1258 "real32", "real64", "reference", "object", "instance" ], 1259 "required": true 1260 }, 1261 "isarray": { 1262 "description": "Indicates whether the CIM datatype of the parameter is an 1263 array. For details, see 7.6.5.", 1264 "type": "boolean", 1265 "default": false 1266 }, 1267 "referenceClass": { 1268 "description": "The name of the CIM class of any referenced instances. This 1269 property is required if the 'type' property has a value of 'reference' and is not 1270 allowed otherwise. For details, see 7.6.5.", 1271 "type": "string", 1272

Page 32: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

32 Work in Progress Version 1.0.0a

"format": "cim-classname" 1273 } 1274 } 1275 } 1276

EXAMPLE: See 7.6.1. 1277

7.6.4 Property declaration 1278

A property declaration shall be represented as a JSON property that is named with the property name 1279 and whose value is a JSON object that conforms to the following JSON schema: 1280

{ 1281 "id": "http://schemas.dmtf.org/cimrs/is1/json/is1/propertydeclaration", 1282 "description": "A property declaration.", 1283 "type": "object", 1284 "properties": { 1285 "qualifiers": { 1286 "description": "The set of qualifier values of this property. When no child 1287 properties are specified, this property may be specified or omitted.", 1288 "type": "object", 1289 "additionalProperties": { 1290 "description": "Each additional JSON property shall represent a qualifier 1291 value. The JSON property name shall be the qualifier name. For details on the JSON 1292 type used to represent the value, see 7.6.5.", 1293 "type": "any" 1294 } 1295 }, 1296 "type": { 1297 "description": "The CIM datatype of the property. For details, see 7.6.5.", 1298 "type": "string", 1299 "enum": [ "boolean", "string", "char16", "uint8", "sint8", "uint16", 1300 "sint16", "uint32", "sint32", "uint64", "sint64", "datetime", 1301 "real32", "real64", "reference", "object", "instance" ], 1302 "required": true 1303 }, 1304 "isarray": { 1305 "description": "Indicates whether the CIM datatype of the property is an 1306 array. For details, see 7.6.5.", 1307 "type": "boolean", 1308 "default": false 1309 }, 1310 "referenceClass": { 1311 "description": "The name of the CIM class of any referenced instances. This 1312 property is required if the 'type' property has a value of 'reference' and is not 1313 allowed otherwise. For details, see 7.6.5.", 1314 "type": "string", 1315 "format": "cim-classname" 1316 }, 1317 "default": { 1318 "description": "The default value of this property, if any. For details on 1319 the JSON type used to represent the value, see 7.6.5.", 1320

Page 33: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 33

"type": "any" 1321 } 1322 } 1323 } 1324

EXAMPLE: 1325

"SomeProperty": { 1326 "qualifiers": { 1327 "ValueMap": ["0", "1", "5", ".."], 1328 "Values": ["Unknown", "Other", "Enabled", "DMTF Reserved"], 1329 . . . # more qualifier value specifications on the property 1330 }, 1331 "type": "uint32", 1332 "default": 5 1333 } 1334

7.6.5 CIM value 1335

A CIM value shall be represented as a JSON value (that is, a JSONValue entity as defined in ECMA-262) 1336 that conforms to the JSON data type corresponding to the CIM data type of the CIM value, as defined in 1337 Table 1. 1338

Table 1 also defines the values of the JSON properties "type", "isarray" and "referenceClass" for each 1339 CIM data type. These JSON properties are used to specify the data type of a CIM value, as defined in 7.5 1340 and 0. 1341

Table 1 – Representation of CIM values by data type 1342

CIM data type JSON data type "type" property "isarray" property "referenceClass" property

boolean boolean "boolean" false (default) not specified

string string "string" false (default) not specified

char16 string "char16" false (default) not specified

uint8 integer "uint8" false (default) not specified

sint8 integer "sint8" false (default) not specified

uint16 integer "uint16" false (default) not specified

sint16 integer "sint16" false (default) not specified

uint32 integer "uint32" false (default) not specified

sint32 integer "sint32" false (default) not specified

uint64 integer "uint64" false (default) not specified

sint64 integer "sint64" false (default) not specified

datetime string "datetime" false (default) not specified

real32 number "real32" false (default) not specified

real64 number "real64" false (default) not specified

<classname> ref string "reference" false (default) name of class of referenced instances

Page 34: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

34 Work in Progress Version 1.0.0a

CIM data type JSON data type "type" property "isarray" property "referenceClass" property

string, with EmbeddedInstance qualifier

object, see 0 "instance" false (default) not specified

string, with EmbeddedObject qualifier

object, see 0 "object" false (default) not specified

boolean [ ] boolean "boolean" true not specified

string [ ] string "string" true not specified

char16 [ ] string "char16" true not specified

uint8 [ ] integer "uint8" true not specified

sint8 [ ] integer "sint8" true not specified

uint16 [ ] integer "uint16" true not specified

sint16 [ ] integer "sint16" true not specified

uint32 [ ] integer "uint32" true not specified

sint32 [ ] integer "sint32" true not specified

uint64 [ ] integer "uint64" true not specified

sint64 [ ] integer "sint64" true not specified

datetime [ ] string "datetime" true not specified

real32 [ ] number "real32" true not specified

real64 [ ] number "real64" true not specified

<classname> ref [ ] string "reference" true name of class of referenced instances

string [ ], with EmbeddedInstance qualifier

object, see 0 "instance" true not specified

string [ ], with EmbeddedObject qualifier

object, see 0 "object" true not specified

1343

7.6.6 Embedded instances 1344

CIM values that are embedded instances declared with the EmbeddedInstance qualifier shall be 1345 represented as a JSON object that conforms to the JSON schema for Instance payload (see 7.5.6), and 1346 that contains the links as defined in Table 2: 1347

Table 2 – Links of embedded instance 1348

Link name Absolute / Relative Requirement Targeted resource

self N/A Prohibited N/A

class Absolute or relative to self link of outermost embedding instance

Mandatory creation class of the represented embedded instance

Page 35: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 35

Link name Absolute / Relative Requirement Targeted resource

method-invocation

N/A Prohibited N/A

associators N/A Prohibited N/A

references N/A Prohibited N/A

1349 EXAMPLE: 1350 This example shows an instance of class CIM_Outer that contains a property Emb1 representing an embedded 1351 instance of class CIM_Embedded that contains a property Prop1. 1352

{ 1353 "links": { 1354 "self": { 1355 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_Outer1356 /instances/acme1"}, 1357 "class": { 1358 "href": "../.."}, 1359 "methodinvocation": { 1360 "href": "methodinvocation"}, 1361 "associators": { 1362 "href": "associators"}, 1363 "references": { 1364 "href": "references"} 1365 }, 1366 "class": "CIM_Outer", 1367 "properties": { 1368 "InstanceID": "acme1", 1369 "Emb1: { # The property value is an embedded instance 1370 "links": { 1371 "class": { 1372 "href": "../../../CIM_Outer"}, 1373 }, 1374 "class": "CIM_Embedded", 1375 "properties": { 1376 "Prop1": "value1" 1377 } 1378 } 1379 } 1380 } 1381

7.6.7 Embedded objects 1382

CIM values that are embedded objects declared with the EmbeddedObject qualifier shall be represented 1383 dependent on whether they represent instances or classes, as follows: 1384

• If the CIM value represents an instance, it shall be represented as a JSON object that conforms 1385 to the JSON schema for an Instance payload element (see 7.5.6) that does not contain the 1386 properties "links" or "class". 1387

Page 36: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

36 Work in Progress Version 1.0.0a

• If the CIM value represents a class, it shall be represented as a JSON object that conforms to 1388 the JSON schema for a Class payload element (see 7.5.4) that does not contain the property 1389 "links". 1390

EXAMPLE: 1391 This example shows an instance of class CIM_Outer that contains a property Emb1 representing an embedded 1392 object that is an instance of class CIM_Embedded that contains a property Prop1. 1393

{ 1394 "links": { 1395 "self": { 1396 "href": "http://acme.com:5988/cimrs/namespaces/root%2Fcimv2/classes/CIM_Outer1397 /instances/acme1"}, 1398 "class": { 1399 "href": "../.."}, 1400 "methodinvocation": { 1401 "href": "methodinvocation"}, 1402 "associators": { 1403 "href": "associators"}, 1404 "references": { 1405 "href": "references"} 1406 }, 1407 "class": "CIM_Outer", 1408 "properties": { 1409 "InstanceID": "acme1", 1410 "Emb1: { # The property value is an embedded object that is an instance 1411 "properties": { 1412 "Prop1": "value1" 1413 } 1414 } 1415 } 1416 } 1417

Page 37: Document Number: DSP-IS0202 Version: 1.0 - DMTF

DSP-IS0202 CIM-RS Binding to JSON

Version 1.0.0a Work in Progress 37

ANNEX A 1418 (informative) 1419

1420 1421

Change log 1422

Version Date Description

1.0.0a 2010-09-30 Released as Work in Progress

Page 38: Document Number: DSP-IS0202 Version: 1.0 - DMTF

CIM-RS Binding to JSON DSP-IS0202

38 Work in Progress Version 1.0.0a

Bibliography 1423

This bibliography contains a list of non-normative references for this document. 1424

DMTF DSP0202, CIM Query Language Specification 1.0, 1425 http://www.dmtf.org/standards/published_documents/DSP0202_1.0.pdf 1426

IANA MIME Media Types, 1427 http://www.iana.org/assignments/media-types/ 1428

IETF RFC2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message 1429 Bodies, 1430 http://tools.ietf.org/html/rfc2045 1431

IETF RFC2046, Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types, 1432 http://tools.ietf.org/html/rfc2046 1433

JSON Schema Proposal (a predecessor of RFC-json-structure), 1434 http://json-schema.org/ 1435

J. Holzer, RESTful Web Services and JSON for WBEM Operations, Master thesis, University of Applied 1436 Sciences, Konstanz, Germany, June 2009, 1437 http://mond.htwg-konstanz.de/Abschlussarbeiten/Details.aspx?id=1120 1438