Created
March 17, 2020 20:41
-
-
Save kinlane/a5a01830a96fe29948cdecbc62732349 to your computer and use it in GitHub Desktop.
Open311
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Open311 | |
version: v2 | |
servers: | |
- url: 'http://{{base_url}}' | |
paths: | |
'/requests.{response_format}': | |
get: | |
summary: Get All Requests | |
description: Query the current status of multiple requests. | |
operationId: QueryTheCurrentStatusOfMultipleRequests | |
deprecated: false | |
tags: | |
- Requests | |
parameters: | |
- name: service_request_id | |
in: query | |
description: 'To call multiple Service Requests at once, multiple service_request_id can be declared; comma delimited.This overrides all other arguments.' | |
schema: | |
type: string | |
- name: service_code | |
in: query | |
description: Specify the service type by calling the unique ID of the service_code. | |
schema: | |
type: string | |
- name: start_date | |
in: query | |
description: 'Earliest datetime to include in search. When provided with end_date, allows one to search for requests which have a requested_datetime that matches a given range, but may not span more than 90 days.' | |
schema: | |
type: string | |
- name: end_date | |
in: query | |
description: 'Latest datetime to include in search. When provided with start_date, allows one to search for requests which have a requested_datetime that matches a given range, but may not span more than 90 days.' | |
schema: | |
type: string | |
- name: status | |
in: query | |
description: 'Allows one to search for requests which have a specific status. This defaults to all statuses; can be declared multiple times, comma delimited.' | |
schema: | |
type: string | |
- name: response_format | |
in: path | |
required: true | |
description: Response in XML or JSON format. | |
schema: | |
type: string | |
responses: | |
'200': | |
description: A list of requests. | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Request" | |
post: | |
summary: Create Service Request | |
description: Submit a new request for with specific details of a single service. Must provide a location via lat/long or address_string or address_id | |
operationId: SubmitANewRequestForWithSpecificDetailsOfASingleServiceMustProvideALocationViaLatlo | |
deprecated: false | |
parameters: | |
- name: service_code | |
in: query | |
description: Specify the service type by calling the unique ID of the service_code. | |
schema: | |
type: string | |
- name: lat | |
in: query | |
description: WGS-84 latitude | |
schema: | |
type: string | |
- name: long | |
in: query | |
description: WGS-84 longitude | |
schema: | |
type: string | |
- name: address_string | |
in: query | |
description: '' | |
schema: | |
type: string | |
- name: address_id | |
in: query | |
description: '' | |
schema: | |
type: string | |
- name: attribute | |
in: query | |
description: array of key/value responses based on Service Definitions. | |
schema: | |
type: string | |
- name: response_format | |
in: path | |
required: true | |
description: Response in XML or JSON format. | |
schema: | |
type: string | |
tags: | |
- Requests | |
responses: | |
'201': | |
description: Servie request created. | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Request" | |
'/request/{service_request_id}.{response_format}': | |
get: | |
summary: Get Request Status | |
description: Query the current status of an individual request | |
operationId: QueryTheCurrentStatusOfAnIndividualRequest | |
deprecated: false | |
parameters: | |
- name: service_request_id | |
in: path | |
required: true | |
description: Is specified in the main URL path rather than an added query string parameter. | |
schema: | |
type: string | |
- name: response_format | |
in: path | |
required: true | |
description: The format of the response. | |
schema: | |
type: string | |
tags: | |
- Requests | |
responses: | |
'200': | |
description: A list of requests. | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Request" | |
'/services.{response_format}': | |
get: | |
summary: Service Types | |
description: List acceptable service request types and their associated service codes. These request types can be unique to the city/jurisdiction. | |
operationId: ListAcceptableServiceRequestTypesAndTheirAssociatedServiceCodesTheseRequestTypesCanBe | |
deprecated: false | |
tags: | |
- Services | |
parameters: | |
- name: response_format | |
in: path | |
description: Response in XML or JSON format. | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: A list of requests. | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Service" | |
'/services/{service_code}.{response_format}': | |
get: | |
summary: Get Individual Service Type | |
description: Define attributes associated with a service code. These attributes can be unique to the city/jurisdiction. | |
operationId: getService | |
deprecated: false | |
parameters: | |
- name: service_code | |
in: path | |
description: '' | |
required: true | |
schema: | |
type: string | |
- name: response_format | |
in: path | |
description: Response in XML or JSON format. | |
required: true | |
schema: | |
type: string | |
tags: | |
- Services | |
responses: | |
'200': | |
description: A list of requests. | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Service" | |
'/tokens/{token_id}.{response_format}': | |
get: | |
summary: Id Of Service_request Via Token | |
description: Get the service_request_id from a temporary token. This is unnecessary if the response from creating a service request does not contain a token. | |
operationId: GetTheServiceRequestIdFromATemporaryTokenThisIsUnnecessaryIfTheResponseFromCreating | |
deprecated: false | |
tags: | |
- Tokens | |
parameters: | |
- name: token_id | |
in: path | |
description: '' | |
required: true | |
schema: | |
type: string | |
- name: response_format | |
in: path | |
description: Response in XML or JSON format. | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: A list of requests. | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/TokenResponse" | |
components: | |
schemas: | |
Service: | |
type: object | |
properties: | |
service_code: | |
description: '' | |
type: string | |
service_name: | |
description: '' | |
type: string | |
description: | |
description: '' | |
type: string | |
metadata: | |
description: '' | |
type: string | |
type: | |
description: '' | |
type: string | |
keywords: | |
description: '' | |
type: string | |
group: | |
description: '' | |
type: string | |
ServiceDefinition: | |
type: object | |
properties: | |
service_code: | |
description: '' | |
type: string | |
attributes: | |
description: '' | |
type: string | |
ServiceAttribute: | |
type: object | |
properties: | |
variable: | |
description: '' | |
type: string | |
code: | |
description: '' | |
type: string | |
datatype: | |
description: '' | |
type: string | |
required: | |
description: '' | |
type: string | |
datatype_description: | |
description: '' | |
type: string | |
order: | |
description: '' | |
type: string | |
description: | |
description: '' | |
type: string | |
values: | |
description: '' | |
type: string | |
AttributeValue: | |
type: object | |
properties: | |
key: | |
description: '' | |
type: string | |
name: | |
description: '' | |
type: string | |
Request: | |
type: object | |
properties: | |
service_request_id: | |
description: '' | |
type: string | |
status: | |
description: '' | |
type: string | |
status_notes: | |
description: '' | |
type: string | |
service_name: | |
description: '' | |
type: string | |
service_code: | |
description: '' | |
type: string | |
description: | |
description: '' | |
type: string | |
agency_responsible: | |
description: '' | |
type: string | |
service_notice: | |
description: '' | |
type: string | |
requested_datetime: | |
description: '' | |
type: string | |
updated_datetime: | |
description: '' | |
type: string | |
expected_datetime: | |
description: '' | |
type: string | |
address: | |
description: '' | |
type: string | |
address_id: | |
description: '' | |
type: string | |
zipcode: | |
description: '' | |
type: string | |
lat: | |
description: '' | |
type: string | |
long: | |
description: '' | |
type: string | |
media_url: | |
description: '' | |
type: string | |
RequestResponse: | |
type: object | |
properties: | |
service_request_id: | |
description: '' | |
type: string | |
token: | |
description: '' | |
type: string | |
service_notice: | |
description: '' | |
type: string | |
account_id: | |
description: '' | |
type: string | |
TokenResponse: | |
type: object | |
properties: | |
service_request_id: | |
description: '' | |
type: string | |
token: | |
description: '' | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment