Metadata Sources (v1)

http://localhost/mod-finc-config

Table of contents

mod-finc-config API

This documents the API calls that can be made to query and manage metadata sources

Metadata Sources

Collection of metadata-source items.

GET /finc-config/metadata-sources

Get all metadata sources

GET /finc-config/metadata-sources
Query Parameters
  • query: (string)

    A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    active=true sortBy username
    
  • orderBy: (string)

    Order by field: field A, field B

  • order: (one of desc, asc - default: desc)

    Order

  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of metadata-source items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Collection of metadata sources in finc config",
  "properties": {
    "fincConfigMetadataSources": {
      "type": "array",
      "id": "fincConfigMetadataSourcesData",
      "items": {
        "type": "object",
        "$ref": "fincConfigMetadataSource.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "sources",
    "totalRecords"
  ]
}

Example:

{
  "metadataSources": [
    {
      "id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
      "label": "Cambridge University Press Journals",
      "internalId": 1,
      "implementationStatus": "active",
      "solrShard": "UBL main",
      "lastProcessed": "2018-06-14",
      "description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore.",
      "vendors": [
        {
          "id": "uuid-4564",
          "name": "Cambridge University Press",
          "ticketLink": "10167",
          "status": "technical implementation"
        },
        {
          "id": "uuid-1678",
          "name": "Cambridge University Press",
          "ticketLink": "10168",
          "status": "closed"
        }
      ],
      "contacts": {
        "internal": [
          {
            "id": "uuid-4321",
            "name": "Erika Mustermann",
            "role": "metadata",
            "isInternal": "1"
          },
          {
            "id": "uuid-4322",
            "name": "Max Mustermann",
            "role": "technical",
            "isInternal": "1"
          }
        ],
        "external": [
          {
            "id": "uuid-4323",
            "name": "John Doe",
            "role": "management",
            "isInternal": "0"
          },
          {
            "id": "uuid-4324",
            "name": "Jane Doe",
            "role": "technical",
            "isInternal": "0"
          }
        ]
      }
    },
    {
      "id": "8ac1e1cf-5128-46b9-b57b-52bbfca7261b",
      "label": "Oxford Scholarship Online",
      "internalId": 2,
      "implementationStatus": "in technical process",
      "solrShard": "UBL ai",
      "lastProcessed": "2018-11-23",
      "description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore.",
      "vendors": [
        {
          "id": "uuid-1240",
          "name": "Oxford Scholarship Online",
          "ticketLink": "10181",
          "status": "technical implementation"
        },
        {
          "id": "uuid-9635",
          "name": "Oxford Scholarship Online",
          "ticketLink": "10182",
          "status": "closed"
        }
      ],
      "contacts": {
        "internal": [
          {
            "id": "uuid-4321",
            "name": "Evelyn Weiser",
            "role": "metadata",
            "isInternal": "1"
          },
          {
            "id": "uuid-4322",
            "name": "Martin Czygan",
            "role": "technical",
            "isInternal": "1"
          }
        ]
      }
    }
  ],
  "totalRecords": 2
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

unable to list metadata-sources -- malformed parameter 'query', syntax error at column 6

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list metadata-sources -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /finc-config/metadata-sources

Post new metadata source

POST /finc-config/metadata-sources
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Source Schema",
  "description": "Metadata source in finc config",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string",
      "description": "A unique name for this metadata source"
    },
    "description": {
      "type": "string",
      "description" : "A globally unique (UUID) identifier"
    },
    "status": {
      "type": "string",
      "enum": [
        "wish",
        "negotiation",
        "technical implementation",
        "active",
        "deactivated",
        "terminated"
      ]
    },
    "vendor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the the sources content’s vendor, linked via uuid from vendor app."
        },
        "name": {
          "type": "string",
          "description": "Vendor's name. If not given, it will be determined by backend module."
        }
      }
    },
    "contacts": {
      "type": "object",
      "properties": {
        "internal": {
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "$ref": "contact.json"
          }
        },
        "external": {
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "$ref": "contact.json"
          }
        }
      }
    },
    "indexingLevel": {
      "type": "string"
    },
    "licensingNote": {
      "type": "string"
    },
    "contracts": {
      "description": "Links to contracts in agreements/license app or link to file upload app",
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "lastProcessed": {
      "type": "string",
      "format": "date-time"
    },
    "tickets": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "accessUrl": {
      "type": "string"
    },
    "sourceId": {
      "type": "integer"
    },
    "solrShard": {
      "type": "string",
      "enum": [
        "UBL main",
        "UBL ai",
        "SLUB main",
        "SLUB DBoD"
      ]
    },
    "deliveryMethods": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "formats": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "updateRhythm": {
      "type": "string"
    },
    "inferiorTo": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "selectedBy": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "id",
    "label",
    "status",
    "sourceId"
  ],
  "additionalProperties": false
}

Example:

{
  "id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
  "label": "Cambridge University Press Journals",
  "description": "This is a test metadata source",
  "status": "active",
  "vendor": {
    "id": "uuid-1234",
    "name": "Test vendor"
  },
  "contacts": {
    "internal": [
      {
        "id": "uuid-4321",
        "name": "Erika Mustermann",
        "role": "metadata",
        "isInternal": "1"
      },
      {
        "id": "uuid-4322",
        "name": "Max Mustermann",
        "role": "technical",
        "isInternal": "1"
      }
    ],
    "external": [
      {
        "id": "uuid-4323",
        "name": "John Doe",
        "role": "management",
        "isInternal": "0"
      },
      {
        "id": "uuid-4324",
        "name": "Jane Doe",
        "role": "technical",
        "isInternal": "0"
      }
    ]
  },
  "indexingLevel": "bibliographic",
  "licensingNote": "Test licensing note",
  "contracts": [
      "http://contract1.de"
  ],
  "lastProcessed": "2018-01-01",
  "tickets": [
    "http://redmine.de/123",
    "http://redmine.de/456"
  ],
  "accessUrl": "http://access.url",
  "sourceId": 1,
  "solrShard": "UBL main",
  "deliveryMethods": [
      "API Download"
  ],
  "formats": [
    "csv"
  ],
  "updateRhythm": "monthly",
  "inferiorTo": [
    "uuid-789",
    "uuid-123"
  ],
  "selectedBy": [ "DE-15", "DE-14" ]
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created metadata-source item

Body

Media type: application/json

Type: any

Example:

{
  "id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
  "label": "Cambridge University Press Journals",
  "description": "This is a test metadata source",
  "status": "active",
  "vendor": {
    "id": "uuid-1234",
    "name": "Test vendor"
  },
  "contacts": {
    "internal": [
      {
        "id": "uuid-4321",
        "name": "Erika Mustermann",
        "role": "metadata",
        "isInternal": "1"
      },
      {
        "id": "uuid-4322",
        "name": "Max Mustermann",
        "role": "technical",
        "isInternal": "1"
      }
    ],
    "external": [
      {
        "id": "uuid-4323",
        "name": "John Doe",
        "role": "management",
        "isInternal": "0"
      },
      {
        "id": "uuid-4324",
        "name": "Jane Doe",
        "role": "technical",
        "isInternal": "0"
      }
    ]
  },
  "indexingLevel": "bibliographic",
  "licensingNote": "Test licensing note",
  "contracts": [
      "http://contract1.de"
  ],
  "lastProcessed": "2018-01-01",
  "tickets": [
    "http://redmine.de/123",
    "http://redmine.de/456"
  ],
  "accessUrl": "http://access.url",
  "sourceId": 1,
  "solrShard": "UBL main",
  "deliveryMethods": [
      "API Download"
  ],
  "formats": [
    "csv"
  ],
  "updateRhythm": "monthly",
  "inferiorTo": [
    "uuid-789",
    "uuid-123"
  ],
  "selectedBy": [ "DE-15", "DE-14" ]
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to add metadata-source -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create metadata-sources -- unauthorized

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /finc-config/metadata-sources/{id}

Get one metadatasource identified by id

GET /finc-config/metadata-sources/{id}
URI Parameters
  • id: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Source Schema",
  "description": "Metadata source in finc config",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string",
      "description": "A unique name for this metadata source"
    },
    "description": {
      "type": "string",
      "description" : "A globally unique (UUID) identifier"
    },
    "status": {
      "type": "string",
      "enum": [
        "wish",
        "negotiation",
        "technical implementation",
        "active",
        "deactivated",
        "terminated"
      ]
    },
    "vendor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the the sources content’s vendor, linked via uuid from vendor app."
        },
        "name": {
          "type": "string",
          "description": "Vendor's name. If not given, it will be determined by backend module."
        }
      }
    },
    "contacts": {
      "type": "object",
      "properties": {
        "internal": {
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "$ref": "contact.json"
          }
        },
        "external": {
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "$ref": "contact.json"
          }
        }
      }
    },
    "indexingLevel": {
      "type": "string"
    },
    "licensingNote": {
      "type": "string"
    },
    "contracts": {
      "description": "Links to contracts in agreements/license app or link to file upload app",
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "lastProcessed": {
      "type": "string",
      "format": "date-time"
    },
    "tickets": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "accessUrl": {
      "type": "string"
    },
    "sourceId": {
      "type": "integer"
    },
    "solrShard": {
      "type": "string",
      "enum": [
        "UBL main",
        "UBL ai",
        "SLUB main",
        "SLUB DBoD"
      ]
    },
    "deliveryMethods": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "formats": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "updateRhythm": {
      "type": "string"
    },
    "inferiorTo": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "selectedBy": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "id",
    "label",
    "status",
    "sourceId"
  ],
  "additionalProperties": false
}

Example:

{
  "id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
  "label": "Cambridge University Press Journals",
  "description": "This is a test metadata source",
  "status": "active",
  "vendor": {
    "id": "uuid-1234",
    "name": "Test vendor"
  },
  "contacts": {
    "internal": [
      {
        "id": "uuid-4321",
        "name": "Erika Mustermann",
        "role": "metadata",
        "isInternal": "1"
      },
      {
        "id": "uuid-4322",
        "name": "Max Mustermann",
        "role": "technical",
        "isInternal": "1"
      }
    ],
    "external": [
      {
        "id": "uuid-4323",
        "name": "John Doe",
        "role": "management",
        "isInternal": "0"
      },
      {
        "id": "uuid-4324",
        "name": "Jane Doe",
        "role": "technical",
        "isInternal": "0"
      }
    ]
  },
  "indexingLevel": "bibliographic",
  "licensingNote": "Test licensing note",
  "contracts": [
      "http://contract1.de"
  ],
  "lastProcessed": "2018-01-01",
  "tickets": [
    "http://redmine.de/123",
    "http://redmine.de/456"
  ],
  "accessUrl": "http://access.url",
  "sourceId": 1,
  "solrShard": "UBL main",
  "deliveryMethods": [
      "API Download"
  ],
  "formats": [
    "csv"
  ],
  "updateRhythm": "monthly",
  "inferiorTo": [
    "uuid-789",
    "uuid-123"
  ],
  "selectedBy": [ "DE-15", "DE-14" ]
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"metadata-source not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

DELETE /finc-config/metadata-sources/{id}

Delete an metadata source identified by id

DELETE /finc-config/metadata-sources/{id}
URI Parameters
  • id: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to delete metadata-source -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"metadata-source not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /finc-config/metadata-sources/{id}

Put an metadata source identified by id

PUT /finc-config/metadata-sources/{id}
URI Parameters
  • id: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Source Schema",
  "description": "Metadata source in finc config",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string",
      "description": "A unique name for this metadata source"
    },
    "description": {
      "type": "string",
      "description" : "A globally unique (UUID) identifier"
    },
    "status": {
      "type": "string",
      "enum": [
        "wish",
        "negotiation",
        "technical implementation",
        "active",
        "deactivated",
        "terminated"
      ]
    },
    "vendor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the the sources content’s vendor, linked via uuid from vendor app."
        },
        "name": {
          "type": "string",
          "description": "Vendor's name. If not given, it will be determined by backend module."
        }
      }
    },
    "contacts": {
      "type": "object",
      "properties": {
        "internal": {
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "$ref": "contact.json"
          }
        },
        "external": {
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "$ref": "contact.json"
          }
        }
      }
    },
    "indexingLevel": {
      "type": "string"
    },
    "licensingNote": {
      "type": "string"
    },
    "contracts": {
      "description": "Links to contracts in agreements/license app or link to file upload app",
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "lastProcessed": {
      "type": "string",
      "format": "date-time"
    },
    "tickets": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "accessUrl": {
      "type": "string"
    },
    "sourceId": {
      "type": "integer"
    },
    "solrShard": {
      "type": "string",
      "enum": [
        "UBL main",
        "UBL ai",
        "SLUB main",
        "SLUB DBoD"
      ]
    },
    "deliveryMethods": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "formats": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "updateRhythm": {
      "type": "string"
    },
    "inferiorTo": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "selectedBy": {
      "type": "array",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "id",
    "label",
    "status",
    "sourceId"
  ],
  "additionalProperties": false
}

Example:

{
  "id": "6dd325f8-b1d5-4568-a0d7-aecf6b8d6697",
  "label": "Cambridge University Press Journals",
  "description": "This is a test metadata source",
  "status": "active",
  "vendor": {
    "id": "uuid-1234",
    "name": "Test vendor"
  },
  "contacts": {
    "internal": [
      {
        "id": "uuid-4321",
        "name": "Erika Mustermann",
        "role": "metadata",
        "isInternal": "1"
      },
      {
        "id": "uuid-4322",
        "name": "Max Mustermann",
        "role": "technical",
        "isInternal": "1"
      }
    ],
    "external": [
      {
        "id": "uuid-4323",
        "name": "John Doe",
        "role": "management",
        "isInternal": "0"
      },
      {
        "id": "uuid-4324",
        "name": "Jane Doe",
        "role": "technical",
        "isInternal": "0"
      }
    ]
  },
  "indexingLevel": "bibliographic",
  "licensingNote": "Test licensing note",
  "contracts": [
      "http://contract1.de"
  ],
  "lastProcessed": "2018-01-01",
  "tickets": [
    "http://redmine.de/123",
    "http://redmine.de/456"
  ],
  "accessUrl": "http://access.url",
  "sourceId": 1,
  "solrShard": "UBL main",
  "deliveryMethods": [
      "API Download"
  ],
  "formats": [
    "csv"
  ],
  "updateRhythm": "monthly",
  "inferiorTo": [
    "uuid-789",
    "uuid-123"
  ],
  "selectedBy": [ "DE-15", "DE-14" ]
}

Response 204

Item successfully updated

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to update metadata-source -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"metadata-source not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator