Skip to main content

Create typeOneResources

POST 

https://apis.<domain>/resources/resources/typeOneResources/

Create typeOneResources.

Authorization Action:

resource:typeOneResources:create

Request

Body

    data objectrequired
    typetype (string)required

    The type member is used to describe resource objects that share common attributes and relationships.

    idid (string)

    Each resource object’s type and id pair MUST identify a single, unique resource.

    links object
    self object
    oneOf
    string

    a string containing the link's URL

    attributes object
    createdAtstring<date>
    serialstringrequired
    relationships object
    typeTwoResources object

    a multiple 'to-many' relationship

    links object

    optional references to other resource objects

    self object
    oneOf
    string

    a string containing the link's URL

    related object
    oneOf
    string

    a string containing the link's URL

    property name*any

    optional references to other resource objects

    data object[]

    An array of objects each containing the 'type' and 'id' for to-many relationships

  • Array [
  • typetype (string)required

    The type member is used to describe resource objects that share common attributes and relationships.

    idid (string)required

    Each resource object’s type and id pair MUST identify a single, unique resource.

    meta object
    property name*any
  • ]
  • meta object
    property name*any

Responses

Created. Assigned id and/or any other changes are in this response.

Schema
    data objectrequired
    typetype (string)required

    The type member is used to describe resource objects that share common attributes and relationships.

    idid (string)required

    Each resource object’s type and id pair MUST identify a single, unique resource.

    links object
    self object
    oneOf
    string

    a string containing the link's URL

    attributes object
    createdAtstring<date>
    serialstringrequired
    relationships object
    typeTwoResources object

    a multiple 'to-many' relationship

    links object

    optional references to other resource objects

    self object
    oneOf
    string

    a string containing the link's URL

    related object
    oneOf
    string

    a string containing the link's URL

    property name*any

    optional references to other resource objects

    data object[]

    An array of objects each containing the 'type' and 'id' for to-many relationships

  • Array [
  • typetype (string)required

    The type member is used to describe resource objects that share common attributes and relationships.

    idid (string)required

    Each resource object’s type and id pair MUST identify a single, unique resource.

    meta object
    property name*any
  • ]
  • meta object
    property name*any
    included object[]
  • Array [
  • typetype (string)required

    The type member is used to describe resource objects that share common attributes and relationships.

    idid (string)required

    Each resource object’s type and id pair MUST identify a single, unique resource.

    attributesobject
    relationshipsobject
    links object
    property name* link
    oneOf
    string

    a string containing the link's URL

    meta object
    property name*any
  • ]
  • links object

    Link members related to primary data

    first object
    oneOf
    string

    a string containing the link's URL

    last object
    oneOf
    string

    a string containing the link's URL

    prev object
    oneOf
    string

    a string containing the link's URL

    next object
    oneOf
    string

    a string containing the link's URL

    property name* link
    oneOf
    string

    a string containing the link's URL

    jsonapi object

    The server's implementation

    versionstring
    meta object
    property name*any

Authorization: http

name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://apis.<domain>/resources/resources/typeOneResources/");
request.Headers.Add("Accept", "application/vnd.api+json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"string\",\n \"id\": \"string\",\n \"links\": {\n \"self\": \"string\"\n },\n \"attributes\": {\n \"createdAt\": \"2024-07-29\",\n \"serial\": \"string\"\n },\n \"relationships\": {\n \"typeTwoResources\": {\n \"links\": {\n \"self\": \"string\",\n \"related\": \"string\"\n },\n \"data\": [\n {\n \"type\": \"string\",\n \"id\": \"string\",\n \"meta\": {}\n }\n ],\n \"meta\": {}\n }\n }\n }\n}", null, "application/vnd.api+json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://apis.<domain>/resources
Auth
Body
{
  "data": {
    "type": "string",
    "id": "string",
    "links": {
      "self": "string"
    },
    "attributes": {
      "createdAt": "2024-07-29",
      "serial": "string"
    },
    "relationships": {
      "typeTwoResources": {
        "links": {
          "self": "string",
          "related": "string"
        },
        "data": [
          {
            "type": "string",
            "id": "string",
            "meta": {}
          }
        ],
        "meta": {}
      }
    }
  }
}