Table of Contents

Enum JsonApiEndpoints

Namespace
JsonApiDotNetCore.Controllers
Assembly
JsonApiDotNetCore.Annotations.dll

Lists the built-in JSON:API endpoints, described at https://jsonapi.org/format.

[PublicAPI]
[Flags]
public enum JsonApiEndpoints

Fields

All = Query | Command

Represents all JSON:API endpoints.

Command = Post | PostRelationship | Patch | PatchRelationship | Delete | DeleteRelationship

Represents the set of JSON:API endpoints to change resources and relationships.

Delete = 256

Represents the endpoint to delete an existing resource.

Example endpoint:

DELETE /articles/1 HTTP/1.1
DeleteRelationship = 512

Represents the endpoint to remove resources from a to-many relationship.

Example endpoint:

DELETE /articles/1/relationships/revisions HTTP/1.1
GetCollection = 1

Represents the endpoint to get a collection of primary resources.

Example endpoint:

GET /articles HTTP/1.1
GetRelationship = 8

Represents the endpoint to get a relationship value.

Example endpoints:

GET /articles/1/relationships/author HTTP/1.1
GET /articles/1/relationships/revisions HTTP/1.1
GetSecondary = 4

Represents the endpoint to get a secondary resource or collection of secondary resources.

Example endpoints:

GET /articles/1/author HTTP/1.1
GET /articles/1/revisions HTTP/1.1
GetSingle = 2

Represents the endpoint to get a single primary resource by ID.

Example endpoint:

GET /articles/1 HTTP/1.1
None = 0

Represents none of the JSON:API endpoints.

Patch = 64

Represents the endpoint to update the attributes and/or relationships of an existing resource.

Example endpoint:

PATCH /articles/1 HTTP/1.1
PatchRelationship = 128

Represents the endpoint to perform a complete replacement of a relationship on an existing resource.

Example endpoints:

PATCH /articles/1/relationships/author HTTP/1.1
PATCH /articles/1/relationships/revisions HTTP/1.1
Post = 16

Represents the endpoint to create a new resource with attributes, relationships, or both.

Example endpoint:

POST /articles HTTP/1.1
PostRelationship = 32

Represents the endpoint to add resources to a to-many relationship.

Example endpoint:

POST /articles/1/revisions HTTP/1.1
Query = GetCollection | GetSingle | GetSecondary | GetRelationship

Represents the set of JSON:API endpoints to query resources and relationships.