Generell information

Detta API baseras på standarden JSON API.

Endast läsoperationer är publikt tillgängliga. Ingen auktorisation krävs för att uföra nedanstående läsoperationer.

1. URL

cURL-exempel i denna dokumentation utgår av tekniska skäl från "http://localhost:4080".

Driftsatt API ligger bakom brandvägg skall nås enligt nedan;

Miljö URL UI Bas-URL API Exempel: lista alla kodsystem

SDK Produktionsmiljö

https://sdk.inera.se/codesystem

https://sdk.inera.se/codesystem/api

https://sdk.inera.se/codesystem/api/codesystems

SDK Testbädd

https://at-sdk.inera.se/codesystem

https://at-sdk.inera.se/codesystem/api

https://at-sdk.inera.se/codesystem/api/codesystems

Resurser

Dokumentationen nedan genereras direkt från källkod (på engelska).

2. CodeSystems

2.1. Get All

GET /api/codesystems

Lists Code Systems. Responses are paged.

2.1.1. Path parameters

No parameters.

2.1.2. Query parameters

Parameter Type Optional Description

filter[name]

String

true

Filters Code Systems by name.

filter[id]

String

true

Filters Code Systems by Code System identifier - i.e OID "Object Identifier".

filter[systemType]

String

true

Filters Code Systems by Code System identifier - i.e OID "Object Identifier".

page[number]

Integer

true

Controls what subset (a.k.a "page") of the whole available set/collection should be returned.

page[size]

Integer

true

Limits the number of resources returned in the response. The server will default to 25 for this value if omitted. A client can get fewer results by setting a smaller value. If set to larger than 25, the server will ignore this parameter and use the default (25).

2.1.3. Request fields

No request body.

2.1.4. Response fields

Path Type Optional Description

meta

Object

true

Optional Metadata of this API. See JSON API Top Level Object.

meta.version

String

true

The version of this Software Artifact, adhering to the Semantic Versioning concept.

meta.buildTimestamp

String

true

Software build timestamp.

links

Map

true

A list of links represented in accordance to JSON API.

data

Array[Object]

true

Business data. See JSON API Top Level Object.

data[].type

String

true

Resource type. See JSON API Resource Object.

data[].id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

data[].attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

data[].attributes.system

String

true

A unique identifier for the code system (business identifier) usually an OID.

data[].attributes.name

String

true

Name for this code system.

data[].attributes.version

String

true

The version for this code system.

data[].attributes.alternateName

String

true

An alternate name for this code system.

data[].attributes.description

String

true

A clear text description of the code system.

data[].attributes.systemType

String

true

Defines the purpose of the code system.

Must be one of [SEARCH, STRUCTURE, GEO, SYSTEM, OTHER].

data[].attributes.createdAt

String

true

The date and time when this code system was added to the system.

data[].attributes.updatedAt

String

true

The date and time when this code system was updated (e.g. a change of metadata).

data[].attributes.email

String

true

The email address to the organization maintaining this code system.

data[].attributes.url

String

true

The homepage of this code system.

data[].attributes.codes

Array[Object]

true

The codes of this code system.

data[].attributes.codes[].code

String

true

Symbol in syntax defined by the system.

data[].attributes.codes[].displayName

String

true

Representation defined by the system. If missing {@link #originalText} should be used.

data[].attributes.codes[].originalText

String

true

A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

data[].attributes.codes[].additionalInfo

String

true

Additional information, a human-friendly description to determine the applicability of the code.

data[].relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

data[].links

Map

true

A list of links represented in accordance to JSON API.

included

Array[Object]

true

Included Resources forming a JSON API Compound Document.

included[].type

String

true

Resource type. See JSON API Resource Object.

included[].id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

included[].attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

included[].relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

included[].links

Map

true

A list of links represented in accordance to JSON API.

2.1.5. Example request

$ curl 'http://localhost:4080/api/codesystems' -i -X GET

2.1.6. Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1429
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 0
Content-Security-Policy: object-src 'none'; default-src 'unsafe-inline' http://localhost:4080 http://localhost:9081; style-src 'unsafe-inline' http://localhost:4080; frame-src http://localhost:9081
Referrer-Policy: no-referrer

{
  "meta" : {
    "version" : "AB-3.4.3 (build 1a60c5d6)",
    "buildTimestamp" : "2023-10-25T10:21:47+0200"
  },
  "links" : {
    "self" : "http://localhost:4080/api/codesystems"
  },
  "data" : [ {
    "type" : "codesystems",
    "id" : "1",
    "attributes" : {
      "system" : "1",
      "name" : "one",
      "version" : "1",
      "alternateName" : "alternate one",
      "description" : "description one",
      "systemType" : "OTHER",
      "createdAt" : "2023-10-25T10:23:24+0200",
      "updatedAt" : "2023-10-25T10:23:24+0200",
      "email" : "email one",
      "url" : "url one"
    }
  }, {
    "type" : "codesystems",
    "id" : "2",
    "attributes" : {
      "system" : "2",
      "name" : "two",
      "version" : "1",
      "alternateName" : "alternate two",
      "description" : "description two",
      "systemType" : "SEARCH",
      "createdAt" : "2023-10-25T10:23:24+0200",
      "updatedAt" : "2023-10-25T10:23:24+0200",
      "email" : "email two",
      "url" : "url two"
    }
  }, {
    "type" : "codesystems",
    "id" : "3",
    "attributes" : {
      "system" : "3",
      "name" : "three",
      "version" : "1",
      "alternateName" : "alternate three",
      "description" : "description three",
      "systemType" : "GEO",
      "createdAt" : "2023-10-25T10:23:24+0200",
      "updatedAt" : "2023-10-25T10:23:24+0200",
      "email" : "email three",
      "url" : "url three"
    }
  } ]
}

2.2. Get One

GET /api/codesystems/1

Retrieves one Code System by Resource Identifier.

2.2.1. Path parameters

Parameter Type Optional Description

identifier

String

false

A unique and persistent Code System identifier in the form of an ,,Object Identifier (OID),,.

2.2.2. Query parameters

No parameters.

2.2.3. Request fields

No request body.

2.2.4. Response fields

Path Type Optional Description

meta

Object

true

Optional Metadata of this API. See JSON API Top Level Object.

meta.version

String

true

The version of this Software Artifact, adhering to the Semantic Versioning concept.

meta.buildTimestamp

String

true

Software build timestamp.

links

Map

true

A list of links represented in accordance to JSON API.

data

Object

true

Business data. See JSON API Top Level Object.

data.type

String

true

Resource type. See JSON API Resource Object.

data.id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

data.attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

data.attributes.system

String

true

A unique identifier for the code system (business identifier) usually an OID.

data.attributes.name

String

true

Name for this code system.

data.attributes.version

String

true

The version for this code system.

data.attributes.alternateName

String

true

An alternate name for this code system.

data.attributes.description

String

true

A clear text description of the code system.

data.attributes.systemType

String

true

Defines the purpose of the code system.

Must be one of [SEARCH, STRUCTURE, GEO, SYSTEM, OTHER].

data.attributes.createdAt

String

true

The date and time when this code system was added to the system.

data.attributes.updatedAt

String

true

The date and time when this code system was updated (e.g. a change of metadata).

data.attributes.email

String

true

The email address to the organization maintaining this code system.

data.attributes.url

String

true

The homepage of this code system.

data.attributes.codes

Array[Object]

true

The codes of this code system.

data.attributes.codes[].code

String

true

Symbol in syntax defined by the system.

data.attributes.codes[].displayName

String

true

Representation defined by the system. If missing {@link #originalText} should be used.

data.attributes.codes[].originalText

String

true

A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

data.attributes.codes[].additionalInfo

String

true

Additional information, a human-friendly description to determine the applicability of the code.

data.relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

data.links

Map

true

A list of links represented in accordance to JSON API.

included

Array[Object]

true

Included Resources forming a JSON API Compound Document.

included[].type

String

true

Resource type. See JSON API Resource Object.

included[].id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

included[].attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

included[].relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

included[].links

Map

true

A list of links represented in accordance to JSON API.

2.2.5. Example request

$ curl 'http://localhost:4080/api/codesystems/1' -i -X GET

2.2.6. Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 532
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 0
Content-Security-Policy: object-src 'none'; default-src 'unsafe-inline' http://localhost:4080 http://localhost:9081; style-src 'unsafe-inline' http://localhost:4080; frame-src http://localhost:9081
Referrer-Policy: no-referrer

{
  "meta" : {
    "version" : "AB-3.4.3 (build 1a60c5d6)",
    "buildTimestamp" : "2023-10-25T10:21:47+0200"
  },
  "data" : {
    "type" : "codesystems",
    "id" : "1",
    "attributes" : {
      "system" : "1",
      "name" : "one",
      "version" : "1",
      "alternateName" : "alternate one",
      "description" : "description one",
      "systemType" : "OTHER",
      "createdAt" : "2023-10-25T10:23:25+0200",
      "updatedAt" : "2023-10-25T10:23:25+0200",
      "email" : "email one",
      "url" : "url one"
    }
  }
}

3. Codes

Note! Codes are not paged.

3.1. Get All Codes For Code System

GET /api/codesystems/1/codes

Retrieves all codes of a specific Code System.

3.1.1. Path parameters

Parameter Type Optional Description

identifier

String

false

A unique and persistent Code System identifier in the form of an ,,Object Identifier (OID),,.

3.1.2. Query parameters

No parameters.

3.1.3. Request fields

No request body.

3.1.4. Response fields

Path Type Optional Description

meta

Object

true

Optional Metadata of this API. See JSON API Top Level Object.

meta.version

String

true

The version of this Software Artifact, adhering to the Semantic Versioning concept.

meta.buildTimestamp

String

true

Software build timestamp.

links

Map

true

A list of links represented in accordance to JSON API.

data

Array[Object]

true

Business data. See JSON API Top Level Object.

data[].type

String

true

Resource type. See JSON API Resource Object.

data[].id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

data[].attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

data[].attributes.code

String

true

Symbol in syntax defined by the system.

data[].attributes.displayName

String

true

Representation defined by the system. If missing {@link #originalText} should be used.

data[].attributes.originalText

String

true

A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

data[].attributes.additionalInfo

String

true

Additional information, a human-friendly description to determine the applicability of the code.

data[].relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

data[].links

Map

true

A list of links represented in accordance to JSON API.

included

Array[Object]

true

Included Resources forming a JSON API Compound Document.

included[].type

String

true

Resource type. See JSON API Resource Object.

included[].id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

included[].attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

included[].relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

included[].links

Map

true

A list of links represented in accordance to JSON API.

3.1.5. Example request

$ curl 'http://localhost:4080/api/codesystems/1/codes' -i -X GET

3.1.6. Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 664
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 0
Content-Security-Policy: object-src 'none'; default-src 'unsafe-inline' http://localhost:4080 http://localhost:9081; style-src 'unsafe-inline' http://localhost:4080; frame-src http://localhost:9081
Referrer-Policy: no-referrer

{
  "meta" : {
    "version" : "AB-3.4.3 (build 1a60c5d6)",
    "buildTimestamp" : "2023-10-25T10:21:47+0200"
  },
  "data" : [ {
    "type" : "codes",
    "id" : "1-A",
    "attributes" : {
      "code" : "A",
      "displayName" : "A",
      "originalText" : "A",
      "additionalInfo" : "A"
    }
  }, {
    "type" : "codes",
    "id" : "1-B",
    "attributes" : {
      "code" : "B",
      "displayName" : "B",
      "originalText" : "B",
      "additionalInfo" : "B"
    }
  }, {
    "type" : "codes",
    "id" : "1-C",
    "attributes" : {
      "code" : "C",
      "displayName" : "C",
      "originalText" : "C",
      "additionalInfo" : "C"
    }
  } ]
}

3.2. Get One Code

GET /api/codesystems/1/codes/1-A

Retrieves one code for a given Code System.

3.2.1. Path parameters

Parameter Type Optional Description

codeSystemIdentifier

String

false

A unique and persistent Code System identifier in the form of an ,,Object Identifier (OID),.

identifier

String

false

A unique code identifier - constructed from the concatenation of "{codeSystemIdentifier}-{code value}".

3.2.2. Query parameters

No parameters.

3.2.3. Request fields

No request body.

3.2.4. Response fields

Path Type Optional Description

meta

Object

true

Optional Metadata of this API. See JSON API Top Level Object.

meta.version

String

true

The version of this Software Artifact, adhering to the Semantic Versioning concept.

meta.buildTimestamp

String

true

Software build timestamp.

links

Map

true

A list of links represented in accordance to JSON API.

data

Object

true

Business data. See JSON API Top Level Object.

data.type

String

true

Resource type. See JSON API Resource Object.

data.id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

data.attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

data.attributes.code

String

true

Symbol in syntax defined by the system.

data.attributes.displayName

String

true

Representation defined by the system. If missing {@link #originalText} should be used.

data.attributes.originalText

String

true

A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

data.attributes.additionalInfo

String

true

Additional information, a human-friendly description to determine the applicability of the code.

data.relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

data.links

Map

true

A list of links represented in accordance to JSON API.

included

Array[Object]

true

Included Resources forming a JSON API Compound Document.

included[].type

String

true

Resource type. See JSON API Resource Object.

included[].id

String

true

A unique and persistent identifier of the Resource set by the server. Will be ignored if set by client during POST or PATCH operations. See JSON API Resource Object.

included[].attributes

Object

true

The main business content of the Resource. See JSON API Resource Object.

included[].relationships

Map

true

Related Resources expressed as JSON API Relationship Object..

included[].links

Map

true

A list of links represented in accordance to JSON API.

3.2.5. Example request

$ curl 'http://localhost:4080/api/codesystems/1/codes/1-A' -i -X GET

3.2.6. Example response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 304
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 0
Content-Security-Policy: object-src 'none'; default-src 'unsafe-inline' http://localhost:4080 http://localhost:9081; style-src 'unsafe-inline' http://localhost:4080; frame-src http://localhost:9081
Referrer-Policy: no-referrer

{
  "meta" : {
    "version" : "AB-3.4.3 (build 1a60c5d6)",
    "buildTimestamp" : "2023-10-25T10:21:47+0200"
  },
  "data" : {
    "type" : "codes",
    "id" : "1-A",
    "attributes" : {
      "code" : "A",
      "displayName" : "A",
      "originalText" : "A",
      "additionalInfo" : "A"
    }
  }
}