POST api/scores

Adds a score to the database.

Request Information

URI Parameters

None.

Body Parameters

ScoreDetails
NameDescriptionTypeAdditional information
date_shot

date

None.

location

string

None.

score

integer

None.

hits

integer

None.

golds

integer

None.

tens

integer

None.

record_status

boolean

None.

qualifying

boolean

None.

class_id

globally unique identifier

None.

category_id

globally unique identifier

None.

round_id

globally unique identifier

None.

user_1

string

None.

user_2

string

None.

status

string

None.

notes

string

None.

Request Formats

application/json, text/json

Sample:
{
  "date_shot": "2024-10-21T08:58:57.7400866+01:00",
  "location": "sample string 2",
  "score": 3,
  "hits": 4,
  "golds": 5,
  "tens": 6,
  "record_status": true,
  "qualifying": true,
  "class_id": "220b9b21-95f5-4d0f-ac42-8015bd6db882",
  "category_id": "7d1007da-3a52-40e8-8f84-6238fabce09f",
  "round_id": "076cec9d-6b48-4e0a-89e7-a5aa0e9f720b",
  "user_1": "sample string 12",
  "user_2": "sample string 13",
  "status": "sample string 14",
  "notes": "sample string 15"
}

application/xml, text/xml

Sample:
<ScoreDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Golden_Records_App.Models">
  <category_id>7d1007da-3a52-40e8-8f84-6238fabce09f</category_id>
  <class_id>220b9b21-95f5-4d0f-ac42-8015bd6db882</class_id>
  <date_shot>2024-10-21T08:58:57.7400866+01:00</date_shot>
  <golds>5</golds>
  <hits>4</hits>
  <location>sample string 2</location>
  <notes>sample string 15</notes>
  <qualifying>true</qualifying>
  <record_status>true</record_status>
  <round_id>076cec9d-6b48-4e0a-89e7-a5aa0e9f720b</round_id>
  <score>3</score>
  <status>sample string 14</status>
  <tens>6</tens>
  <user_1>sample string 12</user_1>
  <user_2>sample string 13</user_2>
</ScoreDetails>

multipart/form-data

Sample:
<ScoreDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Golden_Records_App.Models"><category_id>7d1007da-3a52-40e8-8f84-6238fabce09f</category_id><class_id>220b9b21-95f5-4d0f-ac42-8015bd6db882</class_id><date_shot>2024-10-21T08:58:57.7400866+01:00</date_shot><golds>5</golds><hits>4</hits><location>sample string 2</location><notes>sample string 15</notes><qualifying>true</qualifying><record_status>true</record_status><round_id>076cec9d-6b48-4e0a-89e7-a5aa0e9f720b</round_id><score>3</score><status>sample string 14</status><tens>6</tens><user_1>sample string 12</user_1><user_2>sample string 13</user_2></ScoreDetails>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ScoreDetails'.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.