# Willow Public API

Version: v3

## Servers

```
https://{instance}.app.willowinc.com/api/v3
```

Variables:
- `instance`: Your Willow instance name.

## Security

### oauth2

Type: oauth2
Token URL: /v3/oauth2/token
Scopes:

## Download OpenAPI description

 - [Willow Public API](https://developers.willowinc.com/_bundle/openapi/@v3/willow-api.yaml)

## OAuth2

 - [POST /oauth2/token](https://developers.willowinc.com/openapi/willow-api/oauth2/getoauth2token.md): Generates an OAuth2 token.
## Models

 - [GET /models](https://developers.willowinc.com/openapi/willow-api/models/modelsv2_getmodels.md)
 - [GET /models/{id}](https://developers.willowinc.com/openapi/willow-api/models/modelsv2_getmodel.md)
## Twins

 - [POST /twins](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_gettwinsasync.md)
 - [PUT /twins](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_createorreplacetwinasync.md)
 - [GET /twins/{id}](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_gettwinbyidasync.md)
 - [PATCH /twins/{id}](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_patchtwin.md)
 - [POST /twins/ids](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_gettwinsbyidsasync.md): Retrieve twin details for the list of twin Ids included in the request body. Any ids that do not reference valid twins will silently be omitted from the response -- no 404/NotFound will be generated.
 - [POST /twins/graph](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_gettwingraph.md): Retrieves a twin by its ID along with its associated twins as defined in the request. The `relationships` field in the request is optional. Twins will be returned in the response even if the nested re
 - [POST /twins/count](https://developers.willowinc.com/openapi/willow-api/twins/twinsv2_gettwinscount.md)
## Relationships

 - [PUT /twins/relationships](https://developers.willowinc.com/openapi/willow-api/relationships/relationshipsv2_upsertrelationship.md): Only one relationship between twin T1 and twin T2 with the same name and properties can be present -- if the given relationship already exists, the operation is idempotent. Id of the relationship will
 - [GET /twins/{twinId}/relationships/{relationshipId}](https://developers.willowinc.com/openapi/willow-api/relationships/relationshipsv2_getrelationship.md)
 - [GET /twins/{twinId}/relationships/outgoing](https://developers.willowinc.com/openapi/willow-api/relationships/relationshipsv2_getrelationships.md)
 - [GET /twins/{twinId}/relationships/incoming](https://developers.willowinc.com/openapi/willow-api/relationships/relationshipsv2_getincomingrelationships.md)
## Time Series

 - [POST /time-series](https://developers.willowinc.com/openapi/willow-api/time-series/posttelemetry.md)
 - [GET /time-series/{twinId}](https://developers.willowinc.com/openapi/willow-api/time-series/gettimeseriesbyid.md)
 - [GET /time-series/{twinId}/latest](https://developers.willowinc.com/openapi/willow-api/time-series/gettimeseriesbyidlatest.md)
 - [POST /time-series/ids](https://developers.willowinc.com/openapi/willow-api/time-series/gettimeseriesids.md)
 - [POST /time-series/ids/latest](https://developers.willowinc.com/openapi/willow-api/time-series/gettimeseriesidslatest.md)
## Insights

 - [POST /insights](https://developers.willowinc.com/openapi/willow-api/insights/postinsightsinsights.md): Page size defaults to 10 when not supplied, and is capped at 1000. It bounds root insights only; children of those roots are also returned.
 - [GET /insights/{insightId}](https://developers.willowinc.com/openapi/willow-api/insights/getinsightsinsightsinsightid.md)
## Events

 - [POST /events](https://developers.willowinc.com/openapi/willow-api/events/posteventsevents.md): Returns a paginated list of events. Besides the event's own fields, a filter can name `LocationId` (operator `equals`, or `in` with an array): the events at a location. An event is at a location when
 - [PUT /events](https://developers.willowinc.com/openapi/willow-api/events/puteventsevents.md)
 - [DELETE /events](https://developers.willowinc.com/openapi/willow-api/events/deleteeventsevents.md)
 - [GET /events/{eventId}](https://developers.willowinc.com/openapi/willow-api/events/geteventseventseventid.md)
 - [GET /events/types](https://developers.willowinc.com/openapi/willow-api/events/geteventseventstypes.md): Returns the possible types that an event can have. Pass `includeSubTypes=true` to also get the sub types valid for each type in the same response (an empty list for a type with none), instead of calli
 - [POST /events/files](https://developers.willowinc.com/openapi/willow-api/events/posteventseventsfiles.md)
## Tickets

 - [POST /tickets](https://developers.willowinc.com/openapi/willow-api/tickets/postticketstickets.md): Returns a paginated list of tickets. Default page size is 100, maximum is 1000. The `include*` query flags let a caller whose identity is not recognised opt into data that is otherwise only returned t
 - [GET /tickets/{ticketId}](https://developers.willowinc.com/openapi/willow-api/tickets/getticketsticketsticketid.md): The `include*` query flags let a caller whose identity is not recognised opt into data that is otherwise only returned to Willow platform callers. Platform callers always receive that data, and Mapped
 - [GET /tickets/{ticketId}/attachments/{attachmentId}](https://developers.willowinc.com/openapi/willow-api/tickets/getticketsticketsticketidattachmentsattachmentid.md)
## Ticket Metadata

 - [POST /tickets/categories](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/postticketmetadataticketscategories.md): Returns a paginated list of the possible categories that a ticket can have.
 - [PUT /tickets/categories](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/putticketmetadataticketscategories.md)
 - [PATCH /tickets/categories/{categoryId}](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/patchticketmetadataticketscategoriescategoryid.md)
 - [POST /tickets/job-types](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/postticketmetadataticketsjobtypes.md): Returns a paginated list of the possible job types that a ticket can have.
 - [PUT /tickets/job-types](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/putticketmetadataticketsjobtypes.md)
 - [PATCH /tickets/job-types/{jobTypeId}](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/patchticketmetadataticketsjobtypesjobtypeid.md)
 - [POST /tickets/service-needed](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/postticketmetadataticketsserviceneeded.md): Returns a paginated list of the possible services needed that a ticket can have.
 - [PUT /tickets/service-needed](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/putticketmetadataticketsserviceneeded.md)
 - [PATCH /tickets/service-needed/{serviceNeededId}](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/patchticketmetadataticketsserviceneededserviceneededid.md): Send the whole service needed. The `name` and `isActive` are required. The category and the locations are stored exactly as sent: a `categoryId` that is left out or null removes the category, and a `l
 - [POST /tickets/sub-status](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/postticketmetadataticketssubstatus.md)
 - [PUT /tickets/sub-status](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/putticketmetadataticketssubstatus.md)
 - [PATCH /tickets/sub-status/{subStatusId}](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/patchticketmetadataticketssubstatussubstatusid.md)
 - [GET /tickets/status](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/getticketmetadataticketsstatus.md)
 - [GET /tickets/priorities](https://developers.willowinc.com/openapi/willow-api/ticket-metadata/getticketmetadataticketspriorities.md)
