Commit 903ec4be authored by Chelsea Gille's avatar Chelsea Gille
Browse files

Update Support.md formatting

parent 23ff0439
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -6,16 +6,16 @@ The STAR API has a `messages` endpoint that can be used to create, update, and d

A message has the following properties:

`displayStart`: epoch timestamp in milliseconds for the local time that the banner should start being displayed. (You can use a tool like [this](https://www.epochconverter.com/) to generate the correct timestamp.)
`displayEnd`: epoch timestamp in milliseconds for the local time that the banner should stop being displayed. (You can use a tool like [this](https://www.epochconverter.com/) to generate the correct timestamp.)
`text`: string for the message that can include html elements. e.g. `<a>` tags and formatting tags like `<strong>`. Make sure quotes are escaped appropriately within the text.
`displayStart`: epoch timestamp in **milliseconds** for the local time that the banner should start being displayed. (You can use a tool like [this](https://www.epochconverter.com/) to generate the correct timestamp.)
`displayEnd`: epoch timestamp in **milliseconds** for the local time that the banner should stop being displayed. (You can use a tool like [this](https://www.epochconverter.com/) to generate the correct timestamp.)
`text`: string for the message that can include html elements. e.g. `<a>` tags and formatting tags like `<strong>`. *Make sure quotes are escaped appropriately within the text.*
`level`: corresponds to the color of the banner. Possible values: `info` = light blue, `warn` = yellow, `error` = red
`id`: the autogenerated id for the message

*Note:* Requests must be sent using basic authentication for the api user and the `On-Behalf-Of` header set to the NetID of the admin user sending the request. 
**Note:** Requests must be sent using basic authentication for the api user and the `On-Behalf-Of` header set to the NetID of the admin user sending the request.

### Example Requests using TEST URL & curl
GET (use this to get the ID of messages you want to update/delete)
**GET** (use this to get the ID of messages you want to update/delete)
```
curl -u apiusername -v \
--header "Content-Type: application/json" \
@@ -23,7 +23,7 @@ curl -u apiusername -v \
-XGET “http://service:service@localhost:8080/api/v2/messages/id”
```

CREATE
**CREATE**
```
curl -u apiusername -v \
--header "Content-Type: application/json" \
@@ -37,7 +37,7 @@ curl -u apiusername -v \
}' 
```  

UPDATE (PUT will replace the entire message object, PATCH will update a subset of the message object)
**UPDATE** (*PUT will replace the entire message object, PATCH will update a subset of the message object*)
```
curl -u apiusername -v \
--header "Content-Type: application/json" \
@@ -46,7 +46,7 @@ curl -u apiusername -v \
—data '{"text": "Welcome!!!", "level": "error" }'  \
```  

DELETE
**DELETE**
``` 
curl -u apiusername -v \
--header "Content-Type: application/json" \
@@ -55,4 +55,4 @@ curl -u apiusername -v \
```  

### Troubleshooting
- You can make sure the the messages are being recieved by the front end by navigating to [my.wisc.edu/star](https://my.wisc.edu/star) (or whichever environment you are testing) and inspecting the network traffic for `messages.json`.
 No newline at end of file
- You can make sure the the messages are being receivdfed by the front end by navigating to [my.wisc.edu/star](https://my.wisc.edu/star) (or whichever environment you are testing) and inspecting the network traffic for `messages.json`.
 No newline at end of file