Skip to content

Commit

Permalink
Merge pull request #304 from mbta/cm/active-message-api-doc
Browse files Browse the repository at this point in the history
doc: Active Message API doc
  • Loading branch information
cmaddox5 authored Apr 25, 2024
2 parents 963610c + ba3290b commit 3b8ea39
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions docs/tech_specs/pa_message_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# List Active Messages

Lists all PA messages that are currently eligible to play.

**URL** : `/api/active_pa_messages`

**Method** : `GET`

**Parameters**: None

**API key required** : YES

## Success Responses

**Code** : `200 OK`

**Response**:

```json
[
{
"id": 1,
"sign_ids": ["sign_1", "sign2"],
"priority": 0,
"interval_in_minutes": 4,
"visual_text": "This message will be played.",
"audio_text": "This message will be played."
},
{
"id": 2,
"sign_ids": ["sign_3", "sign4"],
"priority": 0,
"interval_in_minutes": 3,
"visual_text": "This message will be played.",
"audio_text": "This message will be played."
},
{
"id": 3,
"sign_ids": ["sign_1"],
"priority": 0,
"interval_in_minutes": 2,
"visual_text": "This message will be played.",
"audio_text": "This message will be played."
}
]
```

## Failure Responses

**Code** : `403 Forbidden`

**Response**:

`Invalid API key`

0 comments on commit 3b8ea39

Please sign in to comment.