{"_id":"56a96d492bb3910d000ee931","parentDoc":null,"__v":14,"category":{"_id":"56a96d338791090d00113bab","__v":13,"pages":["56a96d492bb3910d000ee931","56c3cec2106c12170020db96","56c51da4ba4a540d0091b9b7","56c51dc3ba4a540d0091b9b9","56c51eb916c7190d00ff7b19","56c51ec2d7b9ed19008d1752","56c51eec668eb01900719bcd","56c51effba4a540d0091b9bb","56c51f1cf7c4da0d00614b02","56c51f2a8dc1c51900abc142","56c51f367de3580d00bdaf2a","56c67b6270e7660d004a8985","56c67b7cfd00bb0d0016daad"],"project":"564e5930c3553e0d003e53d0","version":"564e5a9b1560880d008d30dc","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-28T01:21:55.716Z","from_sync":false,"order":1,"slug":"patterns","title":"REST API"},"user":"564e5788230d7c1700c9073e","version":{"_id":"564e5a9b1560880d008d30dc","project":"564e5930c3553e0d003e53d0","__v":21,"createdAt":"2015-11-19T23:26:19.166Z","releaseDate":"2015-11-19T23:26:19.166Z","categories":["564e5a9b1560880d008d30dd","566318e1f5ca460d00f41896","56631d08cd54d50d005015fa","56631d2a81ad7417006a202c","5668ba19fbd7680d009375f4","5668cb8b10bda80d00797ed9","5668cb9d10bda80d00797eda","56830d8a3f94e00d004e2a7a","56830d9072bb720d0091f594","56830d94cb4d190d0027698e","56830dc44aecbd0d00a464c5","569e90f3c9b43e0d00c4bab1","56a96d338791090d00113bab","56b12d8336d2580d00247877","56c36bf0a869d017002ea55b","56c36bf93d30210d00ea84bb","56c77749b935671700ff0304","56c7ab9e5652c217008e091a","56cb8bdad5c6241d00ef5e61","58aefce02470660f00b54539","58aefd0bebd7370f0078b954"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"Foundation","version_clean":"2.0.0","version":"2"},"project":"564e5930c3553e0d003e53d0","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-28T01:22:17.153Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"The null value\",\n  \"body\": \"Unless otherwise noted, any field in the PagerDuty API can contain the value `null`. This represents the absence of a value for that field. For example, if a resource does not have a `description`, it may return `\\\"description\\\": null`.\\n\\nFields that are `required` will never be `null`.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"ID\"\n}\n[/block]\nIDs are represented in the PagerDuty API as strings.\n\nAll ids will be contained within an `id` key.\n\nThese IDs are not globally unique, but will be unique across a given endpoint. For example, a schedule and a service may both have the id `PSWK4Q7`, but no two schedules will have the same id.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"An `id` field is never `null`.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"UUID\"\n}\n[/block]\nUUID fields are designated with the presence of `uuid` in their key name, and contain string ID values.\n\nUUIDs can be considered unique across PagerDuty. That is, no two resources of any type will share the same UUID.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"A `uuid` field is never `null`.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"String\"\n}\n[/block]\nA standard JSON string. Strings in the PagerDuty API use the UTF-8 character set.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Integer\"\n}\n[/block]\nInteger types are a number without a fractional or decimal component.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Boolean\"\n}\n[/block]\nA boolean has only two possible states: true and false.\n\nIn responses, booleans are always represented by native JSON booleans — `true` or `false` without quotes.\n\nIn query strings, booleans can also be represented by string values. `\"1\"` and `\"true\"` are acceptable to represent a truthy value, and `\"0\"` and `\"false\"` are acceptable to represent a falsy value.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"A boolean field is never `null`.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Array\"\n}\n[/block]\nA standard JSON array. Arrays may contain any number of values, from 0 to n, unless otherwise specified.\n\nThe primitive data type of the values within an array will always be consistent. That is, while a single array may contain objects representing both `User`s and `Schedule`s, it will never contain both [objects](#object) and [integers](#integer).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"An array field is never `null`.\\nIf there are no values for the associated field, the value will be an empty array (`[]`).\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Object\"\n}\n[/block]\nA standard JSON object. Objects consist of string keys paired with values that may be of any type.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"DateTime\"\n}\n[/block]\nAll dates and times must be represented in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date/time format. The time element is optional.\n\nExample dates in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"*Date and Time*\",\n    \"0-1\": \"*ISO 8601 Representation*\",\n    \"1-0\": \"May 6th, 2011 at 5pm UTC\",\n    \"1-1\": \"2011-05-06T17:00Z\",\n    \"2-0\": \"May 6th, 2011 at 3:30am PDT\",\n    \"2-1\": \"2011-05-06T03:30-07\",\n    \"3-0\": \"May 6th, 2011 at midnight (time is optional)\",\n    \"3-1\": \"2011-05-06\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Time Zone\"\n}\n[/block]\nA string representing a recognized time zone. Time zones are specified in the format of the [IANA time zone database](http://www.iana.org/time-zones). [See Wikipedia for a list of common time zone identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"URL\"\n}\n[/block]\nA URL is string that conforms to the [RFC 3986 syntax](https://tools.ietf.org/html/rfc3986). URLs are fully-qualified URIs that [provide a means of locating the resource](https://tools.ietf.org/html/rfc3986#section-1.1.3), and will never have only a subset of the URL, such as just a hostname or path.\n\nA number of URL validation libraries are available; any that conform to the spec should be able to correctly validate a URL field.","excerpt":"Data types seen throughout the PagerDuty API","slug":"types","type":"basic","title":"Types"}

Types

Data types seen throughout the PagerDuty API

[block:callout] { "type": "warning", "title": "The null value", "body": "Unless otherwise noted, any field in the PagerDuty API can contain the value `null`. This represents the absence of a value for that field. For example, if a resource does not have a `description`, it may return `\"description\": null`.\n\nFields that are `required` will never be `null`." } [/block] [block:api-header] { "type": "basic", "title": "ID" } [/block] IDs are represented in the PagerDuty API as strings. All ids will be contained within an `id` key. These IDs are not globally unique, but will be unique across a given endpoint. For example, a schedule and a service may both have the id `PSWK4Q7`, but no two schedules will have the same id. [block:callout] { "type": "info", "title": "", "body": "An `id` field is never `null`." } [/block] [block:api-header] { "type": "basic", "title": "UUID" } [/block] UUID fields are designated with the presence of `uuid` in their key name, and contain string ID values. UUIDs can be considered unique across PagerDuty. That is, no two resources of any type will share the same UUID. [block:callout] { "type": "info", "body": "A `uuid` field is never `null`." } [/block] [block:api-header] { "type": "basic", "title": "String" } [/block] A standard JSON string. Strings in the PagerDuty API use the UTF-8 character set. [block:api-header] { "type": "basic", "title": "Integer" } [/block] Integer types are a number without a fractional or decimal component. [block:api-header] { "type": "basic", "title": "Boolean" } [/block] A boolean has only two possible states: true and false. In responses, booleans are always represented by native JSON booleans — `true` or `false` without quotes. In query strings, booleans can also be represented by string values. `"1"` and `"true"` are acceptable to represent a truthy value, and `"0"` and `"false"` are acceptable to represent a falsy value. [block:callout] { "type": "info", "body": "A boolean field is never `null`." } [/block] [block:api-header] { "type": "basic", "title": "Array" } [/block] A standard JSON array. Arrays may contain any number of values, from 0 to n, unless otherwise specified. The primitive data type of the values within an array will always be consistent. That is, while a single array may contain objects representing both `User`s and `Schedule`s, it will never contain both [objects](#object) and [integers](#integer). [block:callout] { "type": "info", "body": "An array field is never `null`.\nIf there are no values for the associated field, the value will be an empty array (`[]`)." } [/block] [block:api-header] { "type": "basic", "title": "Object" } [/block] A standard JSON object. Objects consist of string keys paired with values that may be of any type. [block:api-header] { "type": "basic", "title": "DateTime" } [/block] All dates and times must be represented in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date/time format. The time element is optional. Example dates in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: [block:parameters] { "data": { "0-0": "*Date and Time*", "0-1": "*ISO 8601 Representation*", "1-0": "May 6th, 2011 at 5pm UTC", "1-1": "2011-05-06T17:00Z", "2-0": "May 6th, 2011 at 3:30am PDT", "2-1": "2011-05-06T03:30-07", "3-0": "May 6th, 2011 at midnight (time is optional)", "3-1": "2011-05-06" }, "cols": 2, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Time Zone" } [/block] A string representing a recognized time zone. Time zones are specified in the format of the [IANA time zone database](http://www.iana.org/time-zones). [See Wikipedia for a list of common time zone identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). [block:api-header] { "type": "basic", "title": "URL" } [/block] A URL is string that conforms to the [RFC 3986 syntax](https://tools.ietf.org/html/rfc3986). URLs are fully-qualified URIs that [provide a means of locating the resource](https://tools.ietf.org/html/rfc3986#section-1.1.3), and will never have only a subset of the URL, such as just a hostname or path. A number of URL validation libraries are available; any that conform to the spec should be able to correctly validate a URL field.