Skip to content

Instantly share code, notes, and snippets.

@briemarie
Created March 23, 2017 07:06
Show Gist options
  • Select an option

  • Save briemarie/9544c03b1e3d82aefb6547209999a6e5 to your computer and use it in GitHub Desktop.

Select an option

Save briemarie/9544c03b1e3d82aefb6547209999a6e5 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"version": "0.0.1",
"title": "Merged swaggers",
"description": "All happy services merged together\n"
},
"host": "test.com",
"basePath": "/api",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [],
"definitions": {
"CreateAccountsRequestAccountWithAdmin": {
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/v1Account"
},
"admin": {
"$ref": "#/definitions/v1User"
}
}
},
"CreateAccountsResponseAccountIDWithAdminID": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"admin_id": {
"$ref": "#/definitions/v1IntegrationID"
}
}
},
"v1Account": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID"
},
"inactive": {
"type": "boolean",
"format": "boolean"
},
"name": {
"type": "string"
},
"phone": {
"type": "string"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
}
}
},
"v1CreateAccountsRequest": {
"type": "object",
"properties": {
"account_with_admins": {
"type": "array",
"items": {
"$ref": "#/definitions/CreateAccountsRequestAccountWithAdmin"
}
}
}
},
"v1CreateAccountsResponse": {
"type": "object",
"properties": {
"account_id_with_admin_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/CreateAccountsResponseAccountIDWithAdminID"
}
}
}
},
"v1IntegrationID": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"external_id": {
"type": "string"
},
"sync_token": {
"type": "integer",
"format": "int32"
}
},
"description": "* IntegrationID represents an object on HappyCo's platform. Use of the\nexternal_id is encouraged as no guarantees are made about id over the life\nof the platform."
},
"v1UpdateAccountStatusesRequest": {
"type": "object",
"properties": {
"account_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"active": {
"type": "boolean",
"format": "boolean"
}
}
},
"v1UpdateAccountStatusesResponse": {
"type": "object"
},
"v1User": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID"
},
"inactive": {
"type": "boolean",
"format": "boolean"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"UpdateAccountsRequestAccountWithAdminId": {
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/v1Account"
},
"admin_user_id": {
"$ref": "#/definitions/v1IntegrationID"
}
}
},
"v1AddUsersRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/v1User"
}
}
}
},
"v1AddUsersResponse": {
"type": "object",
"properties": {
"user_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1ListAccountsRequest": {
"type": "object",
"properties": {
"account_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"include_inactive": {
"type": "boolean",
"format": "boolean"
},
"paging": {
"$ref": "#/definitions/v1Paging"
}
}
},
"v1ListAccountsResponse": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Account"
}
},
"paging": {
"$ref": "#/definitions/v1PagingResponse"
}
}
},
"v1ListUsersRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"user_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"include_inactive": {
"type": "boolean",
"format": "boolean"
},
"paging": {
"$ref": "#/definitions/v1Paging"
}
}
},
"v1ListUsersResponse": {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/v1User"
}
},
"paging": {
"$ref": "#/definitions/v1PagingResponse"
}
}
},
"v1Paging": {
"type": "object"
},
"v1PagingResponse": {
"type": "object"
},
"v1UpdateAccountsRequest": {
"type": "object",
"properties": {
"account_with_admin_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/UpdateAccountsRequestAccountWithAdminId"
}
}
}
},
"v1UpdateAccountsResponse": {
"type": "object"
},
"v1UpdateUserStatusesRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"user_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"active": {
"type": "boolean",
"format": "boolean"
}
}
},
"v1UpdateUserStatusesResponse": {
"type": "object"
},
"v1UpdateUsersRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/v1User"
}
}
}
},
"v1UpdateUsersResponse": {
"type": "object",
"properties": {
"user_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1CreateFoldersRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folders": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Folder"
}
}
}
},
"v1CreateFoldersResponse": {
"type": "object",
"properties": {
"folder_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1Folder": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID"
},
"inactive": {
"type": "boolean",
"format": "boolean"
},
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/v1FolderType"
}
}
},
"v1FolderType": {
"type": "string",
"enum": [
"MULTI_FAMILY",
"PROPERTY_MANAGEMENT"
],
"default": "MULTI_FAMILY"
},
"v1ListFoldersRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"include_inactive": {
"type": "boolean",
"format": "boolean"
},
"paging": {
"$ref": "#/definitions/v1Paging"
}
}
},
"v1ListFoldersResponse": {
"type": "object",
"properties": {
"folders": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Folder"
}
},
"paging": {
"$ref": "#/definitions/v1PagingResponse"
}
}
},
"v1UpdateFolderStatusesRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"inactive": {
"type": "boolean",
"format": "boolean"
}
}
},
"v1UpdateFolderStatusesResponse": {
"type": "object"
},
"v1UpdateFoldersRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folders": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Folder"
}
}
}
},
"v1UpdateFoldersResponse": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1Asset": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID"
},
"archived": {
"type": "boolean",
"format": "boolean"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
},
"unit": {
"$ref": "#/definitions/v1Unit"
},
"property": {
"$ref": "#/definitions/v1Property"
}
}
},
"v1CreateAssetsRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Asset"
}
}
}
},
"v1CreateAssetsResponse": {
"type": "object",
"properties": {
"asset_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1ListAssetsRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"asset_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"include_archived": {
"type": "boolean",
"format": "boolean"
},
"paging": {
"$ref": "#/definitions/v1Paging"
}
}
},
"v1ListAssetsResponse": {
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Asset"
}
},
"paging": {
"$ref": "#/definitions/v1PagingResponse"
}
}
},
"v1Property": {
"type": "object",
"properties": {
"key_number": {
"type": "string"
}
}
},
"v1SetAssetsArchivedRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"asset_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1SetAssetsArchivedResponse": {
"type": "object"
},
"v1Unit": {
"type": "object",
"properties": {
"building": {
"type": "string"
},
"floor_plan": {
"type": "string"
}
}
},
"v1UpdateAssetsRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Asset"
}
}
}
},
"v1UpdateAssetsResponse": {
"type": "object"
},
"v1CreateTemplatesRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"templates": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Template"
}
}
}
},
"v1CreateTemplatesResponse": {
"type": "object",
"properties": {
"template_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1FloatArray": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "number",
"format": "float"
}
}
}
},
"v1FooterField": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is required and is shown on both the inspection and reports.\nExample values include: File #, Key Number, etc."
},
"type": {
"type": "string",
"description": "* Type is required an must be set to 'text'."
},
"value": {
"type": "string",
"description": "* Value is optional and is shown on both the inspection and reports.\nIt can be changed during the inspection."
}
},
"description": "* Header fields exist at the end of inspections and reports generated from\nthem. They can be preset in scheduled inspections."
},
"v1HeaderField": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is required and is shown on both the inspection and reports.\nExample values include: File #, Key Number, etc."
},
"type": {
"type": "string",
"description": "* Type is required an must be set to 'text'."
},
"value": {
"type": "string",
"description": "Value is optional and is shown on both the inspection and reports.\nIt can be changed during the inspection."
}
},
"description": "* Header fields exist at the top of inspections and reports generated from\nthem. They can be preset in scheduled inspections."
},
"v1Item": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "* Name is an optional field but should be set to something that makes\nsense in context of the parent section. For example; 'Kitchen':\n'Sink', 'Floor 1': 'Water Heater'."
},
"notes": {
"type": "string",
"description": "* Notes is an optional field where inspectors can type custom notes\n(optionally using SnapText) that pertain to this item."
},
"info": {
"type": "string",
"description": "* Info is an optional field that can be used to provide helpful\ninformation to the inspector. It is not shown on the report and is\nprimarily used to help training."
},
"photos": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Photo"
},
"description": "* Photos data can be added with the AddInspectionPhotos api."
},
"rating_group_key": {
"type": "string",
"description": "* Rating group key is a string that can be used to access a rating\ngroup from the parent inspection. A rating group must exist for this\nkey within the inspection for the value to be valid."
},
"values": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1RatingValues"
},
"description": "* Values are a map of rating keys and the selected value(s). That can\nbe referenced using the item's associated rating group."
},
"scores": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1FloatArray"
},
"description": "* Scores are a map of rating keys and the selected score(s). That can\nbe referenced using the item's associated rating group."
}
},
"description": "* Item contains most of the inspection information such as; selected rating\nvalues, notes and photos. The name of an item should make sense in context\nof the section which they are a child of. An item corresponds to an\nindividual inspection row within the inspection."
},
"v1ListTemplatesRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"template_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
},
"archived": {
"type": "boolean",
"format": "boolean"
},
"paging": {
"$ref": "#/definitions/v1Paging"
}
}
},
"v1ListTemplatesResponse": {
"type": "object",
"properties": {
"templates": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Template"
}
},
"previous_page": {
"$ref": "#/definitions/v1Paging"
},
"next_page": {
"$ref": "#/definitions/v1Paging"
}
}
},
"v1Photo": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID"
},
"url": {
"type": "string"
}
}
},
"v1RatingCheckbox": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is an optional field that will override key as the user to be\ndisplayed. This is useful for localization of inspections."
},
"value": {
"type": "string",
"description": "* Value is a required field that will be inserted into the item and\nshown on reports if the checkbox is toggled on."
},
"score": {
"type": "number",
"format": "float",
"description": "* Score is an optional field that will be inserted into the item and\ncan be shown on reports if the checkbox is toggled on."
},
"color": {
"$ref": "#/definitions/v1RatingColor"
},
"image": {
"$ref": "#/definitions/v1RatingImage"
}
},
"description": "* Rating checkbox is the simplest control and can simply be toggled. When\ntoggled on the value and score will be set on the item with the rating\ncontrols key; when off no entries will be added to the item."
},
"v1RatingColor": {
"type": "string",
"enum": [
"UNKNOWN",
"RED",
"ORANGE",
"YELLOW",
"GREEN",
"LIGHT_BLUE",
"DARK_BLUE",
"PURPLE",
"PINK"
],
"default": "UNKNOWN"
},
"v1RatingControl": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "* Key is a required field. It is used when a control has a selected\nvalue. The key and its selected value(s) will be inserted into an\nitem's values map field and the key and the selected score(s) will\nbe inserted into the item's scores map field. It is also the default\nstring displayed to the user unless custom label(s) are set (see each control type)."
},
"checkbox": {
"$ref": "#/definitions/v1RatingCheckbox"
},
"radio_group": {
"$ref": "#/definitions/v1RatingRadioGroup"
},
"drop_down": {
"$ref": "#/definitions/v1RatingDropDown"
}
},
"title": "Rating control describe a single control that a user can use to rate an item. There\nare currently 3 controls; a checkbox, radio group, and drop down. The"
},
"v1RatingDropDown": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is an optional field that will override key as the user to be\ndisplayed. This is useful for localization of inspections."
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/v1RatingDropDownOption"
},
"title": "Options is a required field that muast have 2-16 elements that\nrepresent the possible mutually exclusive selections"
}
},
"description": "* Rating drop downs are currently mutually exclusive controls. They can have\nnone or one option selected. They differ from radio controls in that each\noption can have its own label."
},
"v1RatingDropDownOption": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is an optional field that will override the value as the\ndefaul option to be displayed to the user for this option. This is\nuseful for localization of inspections."
},
"value": {
"type": "string",
"description": "* Value is a required field that will be inserted into the item and\nshown on reports if this radio option is selected. No two options in\nthe same drop down can have the same value."
},
"score": {
"type": "number",
"format": "float",
"description": "* Score is an optional field that will be inserted into the item and\ncan be shown on reports if this drop down option is selected."
},
"color": {
"$ref": "#/definitions/v1RatingColor"
},
"image": {
"$ref": "#/definitions/v1RatingImage"
}
},
"description": "* Rating drop down options represent one of the selectable options in a drop\ndown."
},
"v1RatingGroups": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is an optional field that can help users that need to update\ninspections on the fly."
},
"ratings": {
"type": "array",
"items": {
"$ref": "#/definitions/v1RatingControl"
},
"description": "* Ratings are the ordered set of rating controls an inspector sees\nfor an item that references this rating group."
}
},
"description": "* Rating groups have an optional label that can be useful for selecting a\nrating group during the item insert or update process. A rating group is\nwhat makes up the form controls for each item row in an inspection."
},
"v1RatingImage": {
"type": "string",
"enum": [
"UNDEFINED",
"STAR_FULL",
"STAR_HALF",
"STAR_EMPTY",
"TICK_ROUND",
"CLEAN",
"SCRATCHES",
"SPLAT",
"BROKEN",
"TICK",
"CROSS",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"DIGIT_0",
"DIGIT_1",
"DIGIT_2",
"DIGIT_3",
"DIGIT_4",
"DIGIT_5",
"DIGIT_6",
"DIGIT_7",
"DIGIT_8",
"DIGIT_9",
"EXCLAMATION",
"QUESTION",
"EXCLAMATION_QUESTION",
"DOUBLE_EXCLAMATION",
"DOLLAR",
"POUND",
"CENTS",
"THUMBS_UP",
"THUMBS_DOWN",
"AWARD",
"FEMALE",
"MALE",
"CALENDAR",
"BUILDINGS",
"BUILDING",
"HOUSE",
"NO_ENTRY",
"DOG",
"CAT",
"RAT",
"CIGARETTE",
"NO_SMOKING",
"POOP",
"WEED",
"GUN",
"BROKEN_GLASS",
"CRACKED",
"DEAD_FACE",
"HANDICAP",
"BROKEN_HEART",
"HEART",
"SYRINGE",
"CLOCK",
"MUSIC_NOTE",
"PLANT",
"NOSE",
"DROPLET",
"ELECTRIC",
"BUG",
"ARROW_RIGHT",
"ARROW_LEFT",
"ARROW_UP",
"ARROW_DOWN",
"RECYCLE",
"TRASH",
"KEY",
"LOCK",
"UNLOCK",
"CLOUD",
"SUNSHINE",
"PLUS",
"MINUS",
"TEXTFIELD",
"METER",
"CAR",
"CHART",
"WRENCH",
"CALCULATOR",
"CREDIT_CARD",
"PAINTBRUSH",
"ROLLER",
"MOBILE",
"FLAG",
"DOOR_OPEN",
"DOOR_SHUT",
"BED",
"SHOWER",
"SMOKE_ALARM",
"LIGHT_BULB",
"SMILEY_HAPPY",
"SMILEY_SAD"
],
"default": "UNDEFINED"
},
"v1RatingRadioGroup": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "* Label is an optional field that will override key as the user to be\ndisplayed. This is useful for localization of inspections."
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/v1RatingRadioGroupOption"
},
"title": "Options is a required field that muast have 2-6 elements that\nrepresent the possible mutually exclusive selections"
}
},
"description": "* Rating radio group are mutually exclusive controls. They can have none or\none option selected."
},
"v1RatingRadioGroupOption": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "* Value is a required field that will be inserted into the item and\nshown on reports if this radio option is selected. No two options in\nthe same radio group can have the same value."
},
"score": {
"type": "number",
"format": "float",
"description": "* Score is an optional field that will be inserted into the item and\ncan be shown on reports if this radio option is selected."
},
"color": {
"$ref": "#/definitions/v1RatingColor"
},
"image": {
"$ref": "#/definitions/v1RatingImage"
}
},
"description": "* Rating radio group option represent one of the toggles in a radio group."
},
"v1RatingValues": {
"type": "object",
"properties": {
"scalar": {
"type": "string"
},
"array": {
"$ref": "#/definitions/v1StringArray"
}
}
},
"v1Section": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "* Section name is an optional field but should be set to something\nthat gives context to its items. The section name will be shown as a\nheader to the item names in inspections and reports."
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Item"
},
"description": "* Items contain most of the inspection information such as; selected\nrating values, notes and photos."
}
},
"description": "* Sections provide structure to the inspection. Typically they'll have names\nlike 'Kitchen', 'Floor 1', etc."
},
"v1SetTemplatesArchivedRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"template_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
}
},
"v1SetTemplatesArchivedResponse": {
"type": "object"
},
"v1StringArray": {
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"v1Template": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID"
},
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"name": {
"type": "string"
},
"edition": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string"
},
"sections": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1Section"
}
},
"outlines": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1StringArray"
}
},
"rating_groups": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1RatingGroups"
}
},
"header_fields": {
"type": "array",
"items": {
"$ref": "#/definitions/v1HeaderField"
}
},
"footer_fields": {
"type": "array",
"items": {
"$ref": "#/definitions/v1FooterField"
}
}
}
},
"v1UpdateTemplatesRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"templates": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Template"
}
}
}
},
"v1UpdateTemplatesResponse": {
"type": "object"
},
"InspectionStatusChangeStatus": {
"type": "string",
"enum": [
"SCHEDULED",
"IN_PROGRESS",
"COMPLETED"
],
"default": "SCHEDULED"
},
"InspectionStatusChangesEventInspectionStatusChange": {
"type": "object",
"properties": {
"inspection_id": {
"$ref": "#/definitions/v1IntegrationID",
"title": "* Inspection ID can be used to fetch the inspection with a\nfiltered list inspections request"
},
"from_status": {
"$ref": "#/definitions/InspectionStatusChangeStatus",
"description": "* From status is the status prior to the change event."
},
"to_status": {
"$ref": "#/definitions/InspectionStatusChangeStatus",
"description": "* To status is the status post the change event."
}
}
},
"v1AddInspectionPhotoRequest": {
"type": "object",
"properties": {
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"inspection_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"file_name": {
"type": "string",
"description": "* File name must include a valid image extension."
},
"data": {
"type": "string",
"format": "byte",
"description": "* Data should contain the image data."
}
}
},
"v1AddInspectionPhotoResponse": {
"type": "object",
"properties": {
"photo_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"error": {
"type": "string",
"description": "* Error contains an error response for a request or an empty string."
}
}
},
"v1AddInspectionPhotosRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the request applies to."
},
"requests": {
"type": "array",
"items": {
"$ref": "#/definitions/v1AddInspectionPhotoRequest"
},
"description": "* Requests to be performed. The responses will be an array of the\nsame length and order."
}
}
},
"v1AddInspectionPhotosResponse": {
"type": "object",
"properties": {
"responses": {
"type": "array",
"items": {
"$ref": "#/definitions/v1AddInspectionPhotoResponse"
},
"description": "* Responses is an array of the same length and order as the requests."
}
}
},
"v1CreateInspectionsRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the request applies to. For custom integrations\n(i.e. not integration partners) it can be omitted."
},
"inspections": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Inspection"
},
"description": "* Inspections to be created."
}
},
"description": "* Create Inspection request can be used to create new valid scheduled, in\nprogress or completed inspections. Two inspections cannot have the same\nexternal ID and all must be valid for the request to complete. This includes\narchived inspection IDs."
},
"v1CreateInspectionsResponse": {
"type": "object",
"properties": {
"inspection_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
}
}
},
"description": "* Create Inspection reposne contains a list of inspection ids (including\nhappyco internal ids) for inspections created with a create inspection\nrequest."
},
"v1Date": {
"type": "object",
"properties": {
"year": {
"type": "integer",
"format": "int32"
},
"month": {
"type": "integer",
"format": "int32"
},
"day": {
"type": "integer",
"format": "int32"
}
}
},
"v1Event": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
}
}
},
"v1EventAck": {
"type": "object",
"properties": {
"event_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
},
"ack": {
"type": "boolean",
"format": "boolean"
},
"extend_timeout_seconds": {
"type": "integer",
"format": "int32"
}
}
},
"v1EventHandlerOptions": {
"type": "object",
"properties": {
"ack_timeout_seconds": {
"type": "integer",
"format": "int32"
}
}
},
"v1Inspection": {
"type": "object",
"properties": {
"id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* ID of inspection."
},
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the inspection belongs to."
},
"folder_id": {
"$ref": "#/definitions/v1IntegrationID"
},
"asset_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Asset is the parent that inspection is attached to. This field must\nreference a non archived asset in the same folder as the template\nreferenced below."
},
"template_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Template is the prototype of an inspection thats allow it to be\nconfigured on the fly. This field must reference a non archived\ntemplate in the same folder as the parent asset referenced above."
},
"template_outline": {
"type": "string",
"description": "* Template outline when set on a scheduled inspection forces a\ndifferent outline prototype to be used when the inspection moves\nfrom scheduled to in_progress."
},
"scheduled": {
"$ref": "#/definitions/v1ScheduledInspection"
},
"in_progress": {
"$ref": "#/definitions/v1InspectionData"
},
"completed": {
"$ref": "#/definitions/v1InspectionData"
}
},
"description": "* Inspection represents an inspection in its 3 states: scheduled, in_progress\nand completed."
},
"v1InspectionData": {
"type": "object",
"properties": {
"started_at": {
"$ref": "#/definitions/v1Date",
"description": "* Started at is a non optional field that is set to the actual time\nthat an inspection transitions from scheduled to in_progress. This\ntime comes from the device where the transition occurs on as the\nuser may be offline."
},
"ended_at": {
"$ref": "#/definitions/v1Date",
"description": "* Ended at is an optional field for in_progress inspections but\nrequired for completed inspections. It is set to the actual time\nthat an inspection transtions from in_progress to complete. This\ntime comes from the device where the transition occurs as the suer\nmay be offline."
},
"user_started_at": {
"$ref": "#/definitions/v1Date",
"description": "* User started at is an optional field that can appear on reports.\nThis can be updated by the user to a specific time. When an\ninspection transitions from scheduled to in_progress the\nschedule_date becomes this field."
},
"user_ended_at": {
"$ref": "#/definitions/v1Date",
"description": "* User ended at is an optional field that can appear on reports.\nThis can be updated by the user to a specific time."
},
"header_fields": {
"type": "array",
"items": {
"$ref": "#/definitions/v1HeaderField"
},
"description": "* HeaderFields are shown on the top of an inspection and reports\ngenerated from it."
},
"sections": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Section"
},
"description": "* Sections and their items hold most of the inspection data; selected\nratings, notes, and photos."
},
"footer_fields": {
"type": "array",
"items": {
"$ref": "#/definitions/v1FooterField"
},
"description": "* FooterFields are shown at the end of an inspection and reports\ngenerated from it."
},
"rating_groups": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1RatingGroups"
},
"description": "* Rating groups is a map of unique keys within an inspection to\nrating groups. Each item within this inspection must reference a\nrating group with a key in this map."
}
},
"description": "* Inspection data has fields containing all of the inspection data for an\ninspection with a status of in_progress or completed."
},
"v1InspectionStatusChangesEvent": {
"type": "object",
"properties": {
"event": {
"$ref": "#/definitions/v1Event"
},
"changes": {
"type": "array",
"items": {
"$ref": "#/definitions/InspectionStatusChangesEventInspectionStatusChange"
}
}
},
"description": "* Inspection status change events are emitted from streams requested with\nOnInspectionStatusChanges."
},
"v1InspectionStatusChangesEventAck": {
"type": "object",
"properties": {
"ack": {
"$ref": "#/definitions/v1EventAck",
"description": "* See EventAck for more details."
}
},
"description": "* Inspection status changes event ack is used to acknowledge or request time\nextensions for one or more events."
},
"v1InspectionStatusChangesEventAckResponse": {
"type": "object",
"description": "* InspectionStatusChangeEventAckResponse contains no data but indicates\nsuccessful acknowledgement."
},
"v1InspectionStatusChangesEventRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the request applies to. For custom integrations\n(i.e. not integration partners) it can be omitted."
},
"options": {
"$ref": "#/definitions/v1EventHandlerOptions",
"description": "* Options the client can set to configure the returned event stream.\nSee EventHandlerOptions for more details."
}
}
},
"v1ListInspectionsRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the request applies to. For custom integrations\n(i.e. not integration partners) it can be omitted."
},
"folder_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
},
"description": "* Folder IDs is an optional filter that lists inspections only for\nspecific folders."
},
"asset_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
},
"description": "* Asset IDs is an optional filter that lists inspections only for\nspecific assets."
},
"inspection_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
},
"description": "* Inspection IDs is an optional filter that lists only specific\ninspections. This is commonly used to get a single inspection."
},
"archived": {
"type": "boolean",
"format": "boolean",
"description": "* Archived when set to true returns archived inspections only."
},
"paging": {
"$ref": "#/definitions/v1Paging",
"description": "* Paging message that contains information about the page being\nrequested. This message is usually copied from a previous list\nrequest's response."
}
},
"description": "* List inspection request is used for fetching inspections. It can be\nfiltered to specific inspections, assets or folders. If the intent is to be\nnotified when an inspection undergoes a status transition please use the\nInspectionEventService."
},
"v1ListInspectionsResponse": {
"type": "object",
"properties": {
"inspections": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Inspection"
},
"description": "* Inspections contains the results for this page."
},
"previous_page": {
"$ref": "#/definitions/v1Paging",
"description": "* Previous page is an token that will be present for all pages after\nthe first."
},
"next_page": {
"$ref": "#/definitions/v1Paging",
"description": "* Next page is an token that will be present for all pages except the\nlast."
}
},
"description": "* List inspection response is a page of fetched inspection results. It\nincludes a previous and next page token that can be passed into subsequent\nlist inspection requests."
},
"v1ScheduledInspection": {
"type": "object",
"properties": {
"schedule_date": {
"$ref": "#/definitions/v1Date",
"description": "* Schedule date is an optional field that contians the expected start\ntime or due date of the inspection."
},
"header_fields": {
"type": "array",
"items": {
"$ref": "#/definitions/v1HeaderField"
},
"description": "* Header notes is an optional override that will be used instead of\nthe header fields defined by the template."
},
"footer_fields": {
"type": "array",
"items": {
"$ref": "#/definitions/v1FooterField"
},
"description": "* Footer notes is an optional override that will be used instead of\nthe footer fields defined by the template."
},
"sections": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Section"
}
}
},
"description": "* Scheduled inspection is the message type for inspection status scheduled. It\ncan include a specific scheduled date for the inspection and overrides for\nheader and footer fields when the inspection status transitions to\nin_progress."
},
"v1SetInspectionsArchivedRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the request applies to. For custom integrations\n(i.e. not integration partners) it can be omitted."
},
"inspection_ids": {
"type": "array",
"items": {
"$ref": "#/definitions/v1IntegrationID"
},
"description": "* Inspection IDs that should be updated."
}
},
"description": "* SetInspectionsArchivedRequest is used to archive and unarchive multiple inspections."
},
"v1SetInspectionsArchivedResponse": {
"type": "object",
"description": "* SetInspectionsArchivedResponse contains no data and indicates success of\nthe operation."
},
"v1UpdateInspectionsRequest": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/definitions/v1IntegrationID",
"description": "* Account ID that the request applies to. For custom integrations\n(i.e. not integration partners) it can be omitted."
},
"inspections": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Inspection"
},
"description": "* Inspection to be updated."
}
},
"description": "* Create Inspection request can be used to update existing valid scheduled,\nin progress completed, and archived inspections. Two inspections cannot have\nthe same external ID and all must be valid for the request to complete. This\nincludes archived inspection IDs. An update cannot cause an inspection to\ntransition from in_progress to scheduled."
},
"v1UpdateInspectionsResponse": {
"type": "object",
"description": "* Update inspection response contains no data and indicates success of all\nupdates."
}
},
"paths": {
"/api/v1/manage/account/statuses/update": {
"put": {
"operationId": "UpdateAccountStatuses",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateAccountStatusesResponse"
}
}
},
"tags": [
"AccountProvisioningService"
]
}
},
"/api/v1/manage/accounts/create": {
"post": {
"operationId": "CreateAccounts",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1CreateAccountsResponse"
}
}
},
"tags": [
"AccountProvisioningService"
]
}
},
"/api/v1/manage/account/user/statuses/update": {
"put": {
"operationId": "UpdateUserStatuses",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateUserStatusesResponse"
}
}
},
"tags": [
"AccountUsersService"
]
}
},
"/api/v1/manage/account/users": {
"get": {
"operationId": "ListUsers",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1ListUsersResponse"
}
}
},
"parameters": [
{
"name": "account_id.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.external_id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.sync_token",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "include_inactive",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"AccountUsersService"
]
}
},
"/api/v1/manage/account/users/add": {
"post": {
"operationId": "AddUsers",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1AddUsersResponse"
}
}
},
"tags": [
"AccountUsersService"
]
}
},
"/api/v1/manage/account/users/update": {
"put": {
"operationId": "UpdateUsers",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateUsersResponse"
}
}
},
"tags": [
"AccountUsersService"
]
}
},
"/api/v1/manage/accounts": {
"get": {
"operationId": "ListAccounts",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1ListAccountsResponse"
}
}
},
"parameters": [
{
"name": "include_inactive",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"AccountService"
]
}
},
"/api/v1/manage/accounts/update": {
"post": {
"operationId": "UpdateAccounts",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateAccountsResponse"
}
}
},
"tags": [
"AccountService"
]
}
},
"/api/v1/manage/folder/statuses/update": {
"put": {
"operationId": "UpdateFolderStatuses",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateFolderStatusesResponse"
}
}
},
"tags": [
"FolderService"
]
}
},
"/api/v1/manage/folders": {
"get": {
"operationId": "ListFolders",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1ListFoldersResponse"
}
}
},
"parameters": [
{
"name": "account_id.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.external_id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.sync_token",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "include_inactive",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"FolderService"
]
}
},
"/api/v1/manage/folders/create": {
"post": {
"operationId": "CreateFolders",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1CreateFoldersResponse"
}
}
},
"tags": [
"FolderService"
]
}
},
"/api/v1/manage/folders/update": {
"put": {
"operationId": "UpdateFolders",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateFoldersResponse"
}
}
},
"tags": [
"FolderService"
]
}
},
"/api/v1/manage/assets": {
"get": {
"operationId": "ListAssets",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1ListAssetsResponse"
}
}
},
"parameters": [
{
"name": "account_id.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.external_id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.sync_token",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "folder_id.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "folder_id.external_id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "folder_id.sync_token",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "include_archived",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"AssetService"
]
}
},
"/api/v1/manage/assets/archive": {
"put": {
"operationId": "ArchiveAssets",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1SetAssetsArchivedResponse"
}
}
},
"tags": [
"AssetService"
]
}
},
"/api/v1/manage/assets/create": {
"post": {
"operationId": "CreateAssets",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1CreateAssetsResponse"
}
}
},
"tags": [
"AssetService"
]
}
},
"/api/v1/manage/assets/unarchive": {
"put": {
"operationId": "UnarchiveAssets",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1SetAssetsArchivedResponse"
}
}
},
"tags": [
"AssetService"
]
}
},
"/api/v1/manage/assets/update": {
"put": {
"operationId": "UpdateAssets",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateAssetsResponse"
}
}
},
"tags": [
"AssetService"
]
}
},
"/api/v1/inspect/templates": {
"get": {
"operationId": "ListTemplates",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1ListTemplatesResponse"
}
}
},
"parameters": [
{
"name": "account_id.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.external_id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.sync_token",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "archived",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"TemplateService"
]
}
},
"/api/v1/inspect/templates/archive": {
"put": {
"operationId": "ArchiveTemplates",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1SetTemplatesArchivedResponse"
}
}
},
"tags": [
"TemplateService"
]
}
},
"/api/v1/inspect/templates/create": {
"post": {
"operationId": "CreateTemplates",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1CreateTemplatesResponse"
}
}
},
"tags": [
"TemplateService"
]
}
},
"/api/v1/inspect/templates/unarchive": {
"put": {
"operationId": "UnarchiveTemplates",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1SetTemplatesArchivedResponse"
}
}
},
"tags": [
"TemplateService"
]
}
},
"/api/v1/inspect/templates/update": {
"put": {
"operationId": "UpdateTemplates",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateTemplatesResponse"
}
}
},
"tags": [
"TemplateService"
]
}
},
"/api/v1/inspect/inspections": {
"get": {
"summary": "* List inspections gets a paginated and optionally filtered list of\ninspections from one or more folders.",
"operationId": "ListInspections",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1ListInspectionsResponse"
}
}
},
"parameters": [
{
"name": "account_id.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.external_id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "account_id.sync_token",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "archived",
"description": "* Archived when set to true returns archived inspections only.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"InspectionService"
]
}
},
"/api/v1/inspect/inspections/archive": {
"put": {
"summary": "* Archive inspections should be used to delete inspections that are no\nlonger wanted. No method for purging archived inspections is\navailable via the API.",
"operationId": "ArchiveInspections",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1SetInspectionsArchivedResponse"
}
}
},
"tags": [
"InspectionService"
]
}
},
"/api/v1/inspect/inspections/create": {
"post": {
"summary": "* Create inspections can create inspections with any status (normally\nscheduled).",
"operationId": "CreateInspections",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1CreateInspectionsResponse"
}
}
},
"tags": [
"InspectionService"
]
}
},
"/api/v1/inspect/inspections/unarchive": {
"put": {
"summary": "* Unarchive inspections should be used if previously archived\ninspections need to be restored.",
"operationId": "UnarchiveInspections",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1SetInspectionsArchivedResponse"
}
}
},
"tags": [
"InspectionService"
]
}
},
"/api/v1/inspect/inspections/update": {
"put": {
"summary": "* Update inspections can change the contents of inspections.\nCurrently an inspection cannot have its asset_id or template_id\nupdated.",
"operationId": "UpdateInspections",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/v1UpdateInspectionsResponse"
}
}
},
"tags": [
"InspectionService"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment