Create typeTwoResource relationship
POST/resources/typeTwoResources/:id/relationships/:related_field/
Create a typeOneResource associated with the typeTwoResource.
Authorization Action:
resource:typeOneResources:create
Request
Path Parameters
Globally unique ids (UUID4)
- application/vnd.api+json
Responses
- 201
- 202
- 204
- 401
- 403
- 404
- 409
Created. Assigned id
and/or any other changes are in this response.
- application/vnd.api+json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- MOD1
- string uri-reference
- MOD1
- string uri-reference
- MOD1
- string uri-reference
- MOD1
- string uri-reference
included object[]
The type member is used to describe resource objects that share common attributes and relationships.
Each resource object’s type and id pair MUST identify a single, unique resource.
links object
meta object
links object
first object
last object
prev object
next object
jsonapi object
The server's implementation
meta object
{
"data": {},
"included": [
{
"type": "string",
"id": "string",
"attributes": {},
"relationships": {},
"links": {},
"meta": {}
}
],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"jsonapi": {
"version": "string",
"meta": {}
}
}
Accepted for asynchronous processing
- application/vnd.api+json
- Schema
- Example (from schema)
Schema
data object
The type member is used to describe resource objects that share common attributes and relationships.
Each resource object’s type and id pair MUST identify a single, unique resource.
links object
meta object
{
"data": {
"type": "string",
"id": "string",
"attributes": {},
"relationships": {},
"links": {},
"meta": {}
}
}
Created with the supplied id
. No other changes from what was POSTed.
not authorized
- application/vnd.api+json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]required
links object
source object
A JSON Pointer to the associated entity in the request document [e.g. /data
for a primary data object, or /data/attributes/title
for a specific attribute.
A string indicating which query parameter caused the error.
meta object
meta object
jsonapi object
The server's implementation
meta object
links object
{
"errors": [
{
"id": "string",
"status": "string",
"links": {},
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string",
"meta": {}
}
}
],
"meta": {},
"jsonapi": {
"version": "string",
"meta": {}
},
"links": {}
}
- application/vnd.api+json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]required
links object
source object
A JSON Pointer to the associated entity in the request document [e.g. /data
for a primary data object, or /data/attributes/title
for a specific attribute.
A string indicating which query parameter caused the error.
meta object
meta object
jsonapi object
The server's implementation
meta object
links object
{
"errors": [
{
"id": "string",
"status": "string",
"links": {},
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string",
"meta": {}
}
}
],
"meta": {},
"jsonapi": {
"version": "string",
"meta": {}
},
"links": {}
}
- application/vnd.api+json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]required
links object
source object
A JSON Pointer to the associated entity in the request document [e.g. /data
for a primary data object, or /data/attributes/title
for a specific attribute.
A string indicating which query parameter caused the error.
meta object
meta object
jsonapi object
The server's implementation
meta object
links object
{
"errors": [
{
"id": "string",
"status": "string",
"links": {},
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string",
"meta": {}
}
}
],
"meta": {},
"jsonapi": {
"version": "string",
"meta": {}
},
"links": {}
}
- application/vnd.api+json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]required
links object
source object
A JSON Pointer to the associated entity in the request document [e.g. /data
for a primary data object, or /data/attributes/title
for a specific attribute.
A string indicating which query parameter caused the error.
meta object
meta object
jsonapi object
The server's implementation
meta object
links object
{
"errors": [
{
"id": "string",
"status": "string",
"links": {},
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string",
"meta": {}
}
}
],
"meta": {},
"jsonapi": {
"version": "string",
"meta": {}
},
"links": {}
}