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-11-28T08:26:38.1280228+00:00",
  "location": "sample string 2",
  "score": 3,
  "hits": 4,
  "golds": 5,
  "tens": 6,
  "record_status": true,
  "qualifying": true,
  "class_id": "132e9b2c-de06-40bf-ba57-2c2a9098c105",
  "category_id": "5167450a-4cef-43ad-a9cd-026be1f3d689",
  "round_id": "9226443c-04be-42b0-b2c2-dc83d8757343",
  "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>5167450a-4cef-43ad-a9cd-026be1f3d689</category_id>
  <class_id>132e9b2c-de06-40bf-ba57-2c2a9098c105</class_id>
  <date_shot>2024-11-28T08:26:38.1280228+00: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>9226443c-04be-42b0-b2c2-dc83d8757343</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>5167450a-4cef-43ad-a9cd-026be1f3d689</category_id><class_id>132e9b2c-de06-40bf-ba57-2c2a9098c105</class_id><date_shot>2024-11-28T08:26:38.1280228+00: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>9226443c-04be-42b0-b2c2-dc83d8757343</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.