{"openapi":"3.1.0","info":{"title":"Curriculum Broker API","description":"API for managing curriculum objects","version":"v1"},"servers":[{"url":"https://curriculum-broker.eu.timeedit.net","description":"Production environment"},{"url":"https://curriculum-broker.eu.test.timeedit.net","description":"Test environment"}],"tags":[{"name":"Objects","description":"API for managing curriculum objects"}],"paths":{"/{organisationId}/objects/{type}":{"post":{"tags":["Objects"],"summary":"Save object","description":"Save an object of the specified type","operationId":"broker_saveObject","parameters":[{"name":"type","in":"path","description":"Type of object","required":true,"schema":{"type":"string"}},{"name":"organisationId","in":"path","description":"Organisation ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}},"/{organisationId}/objects/search":{"post":{"tags":["Objects"],"summary":"Search objects","description":"Search for objects based on criteria","operationId":"broker_searchObjects","parameters":[{"name":"organisationId","in":"path","description":"Organisation ID","required":true,"schema":{"type":"string"}},{"name":"text","in":"query","description":"Search term, used to match on names of code","required":false,"schema":{"type":"string","description":"Search term, used to match on names of code","example":"MATH"},"example":"MATH"},{"name":"types","in":"query","description":"Limit results on type, e.g. module, study, specification","required":false,"schema":{"type":"array","description":"Limit results on type, e.g. module, study, specification","example":"module","items":{"type":"string","description":"Limit results on type, e.g. module, study, specification","example":"module"},"uniqueItems":true},"example":"module"},{"name":"relatedTo","in":"query","description":"Limit results related to another object","required":false,"schema":{"type":"array","description":"Limit results related to another object","example":"4ac3e833-9032-4887-9b48-4be93db7e428","items":{"type":"string","description":"Limit results related to another object","example":"4ac3e833-9032-4887-9b48-4be93db7e428"},"uniqueItems":true},"example":"4ac3e833-9032-4887-9b48-4be93db7e428"},{"name":"filters","in":"query","description":"Limit results to custom filter criteria","required":false,"schema":{"type":"array","description":"Limit results to custom filter criteria","items":{"$ref":"#/components/schemas/FilterValue"}}},{"name":"pageable","in":"query","description":"Pagination parameters","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}}},"/{organisationId}/objects/{uid}":{"get":{"tags":["Objects"],"summary":"Find object","description":"Retrieve a specific object by its unique identifier and year","operationId":"broker_findObject","parameters":[{"name":"organisationId","in":"path","description":"Organisation ID","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Object UID","required":true,"schema":{"type":"string"}},{"name":"year","in":"query","description":"Year external ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectDocument"}}}}}},"delete":{"tags":["Objects"],"summary":"Remove object","description":"Remove an object by its unique identifier and year","operationId":"broker_removeObject","parameters":[{"name":"organisationId","in":"path","description":"Organisation ID","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","description":"Object UID","required":true,"schema":{"type":"string"}},{"name":"year","in":"query","description":"Year external ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/{organisationId}/objects":{"delete":{"tags":["Objects"],"summary":"Remove objects in bulk","description":"Remove objects in bulk based on criteria","operationId":"broker_removeAllObjects","parameters":[{"name":"organisationId","in":"path","description":"Organisation ID","required":true,"schema":{"type":"string"}},{"name":"text","in":"query","description":"Search term, used to match on names of code","required":false,"schema":{"type":"string","description":"Search term, used to match on names of code","example":"MATH"},"example":"MATH"},{"name":"types","in":"query","description":"Limit results on type, e.g. module, study, specification","required":false,"schema":{"type":"array","description":"Limit results on type, e.g. module, study, specification","example":"module","items":{"type":"string","description":"Limit results on type, e.g. module, study, specification","example":"module"},"uniqueItems":true},"example":"module"},{"name":"relatedTo","in":"query","description":"Limit results related to another object","required":false,"schema":{"type":"array","description":"Limit results related to another object","example":"4ac3e833-9032-4887-9b48-4be93db7e428","items":{"type":"string","description":"Limit results related to another object","example":"4ac3e833-9032-4887-9b48-4be93db7e428"},"uniqueItems":true},"example":"4ac3e833-9032-4887-9b48-4be93db7e428"},{"name":"filters","in":"query","description":"Limit results to custom filter criteria","required":false,"schema":{"type":"array","description":"Limit results to custom filter criteria","items":{"$ref":"#/components/schemas/FilterValue"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveResult"}}}}}}}},"components":{"schemas":{"Color":{"type":"object","properties":{"background":{"type":"string"},"text":{"type":"string"}}},"Message":{"type":"object","properties":{"type":{"type":"string","enum":["DEBUG","INFO","WARNING","ERROR"]},"value":{"type":"string"}},"required":["type","value"]},"Reference":{"type":"object","properties":{"id":{"type":"string"},"uid":{"type":"string"},"code":{"type":"string"},"abbreviation":{"type":"string"},"names":{"type":"array","items":{"$ref":"#/components/schemas/Text"},"xml":{"name":"name"}},"version":{"type":"string"},"color":{"$ref":"#/components/schemas/Color"},"icon":{"type":"string"}},"required":["id"]},"Response":{"type":"object","properties":{"correlationId":{"type":"string"},"status":{"type":"string","enum":["QUEUED","SUCCESS","FAILED"]},"success":{"type":"boolean"},"entity":{"$ref":"#/components/schemas/Reference"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"xml":{"name":"message"}}},"xml":{"name":"response","namespace":"http://integration.ascme.nl/canonical/v2.wsdl:export"}},"Text":{"type":"object","properties":{"language":{"type":"string"},"value":{"type":"string"}},"required":["language","value"]},"FilterValue":{"type":"object","description":"Limit results to custom filter criteria","properties":{"name":{"type":"string","description":"Property being filtered on","example":"data.code"},"operator":{"type":"string","description":"Operator used for filtering","enum":["EQUAL_TO","NOT_EQUAL_TO","REGEX","LIKE","LESS_THAN","LESS_OR_EQUAL","GREATER_THAN","GREATER_OR_EQUAL"],"example":"EQUAL_TO"},"value":{"description":"Value used for filtering","example":"MATH"},"valueType":{"type":"string","description":"Type of the value (optional)","enum":["DATE","STRING"],"example":"STRING"}},"required":["name","operator","value"]},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":0},"size":{"type":"integer","format":"int32","minimum":1},"sort":{"type":"array","items":{"type":"string"}}}},"Additional":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/Value"},"xml":{"name":"value"}}}},"Metadata":{"type":"object","properties":{"organisationId":{"type":"string"},"objectType":{"type":"string"},"publicationDate":{"type":"string","format":"date-time"},"versionDate":{"type":"string","format":"date-time"},"versionNumber":{"type":"integer","format":"int64"}}},"ObjectDocument":{"type":"object","properties":{"type":{"type":"string"},"data":{"$ref":"#/components/schemas/Root"},"relatedTo":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"Page":{"type":"object","properties":{"content":{"type":"array","description":"Elements in the current page","items":{"$ref":"#/components/schemas/ObjectDocument"}},"page":{"type":"integer","format":"int64","description":"Current page number (one based index)"},"size":{"type":"integer","format":"int64","description":"Current page size"},"totalPages":{"type":"integer","format":"int64","description":"Total amount of pages"},"totalElements":{"type":"integer","format":"int64","description":"Total amount of elements"},"first":{"type":"boolean","description":"First page in the collection, true or false"},"last":{"type":"boolean","description":"Last page in the collection, true or false"},"Deprecated: Returns the used pageable, please use first, last and page for traversals":{"$ref":"#/components/schemas/RestPageable"}}},"RestPageable":{"type":"object","properties":{"offset":{"type":"integer","format":"int64","description":"Returns the offset to be taken according to the underlying page and page size"},"unpaged":{"type":"boolean","description":"Returns whether the current Pageable does not contain pagination information."}}},"Root":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/Value"},"xml":{"name":"value"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"key":{"type":"integer","format":"int64"},"id":{"type":"string"},"uid":{"type":"string"},"code":{"type":"string"},"abbreviation":{"type":"string"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"year":{"$ref":"#/components/schemas/Reference"},"names":{"type":"array","items":{"$ref":"#/components/schemas/Text"},"xml":{"name":"name"}},"additional":{"$ref":"#/components/schemas/Additional"}},"required":["code"]},"Value":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"subType":{"type":"string"},"values":{"type":"array","items":{"type":"string","xml":{"name":"value"}},"xml":{"name":"value"}},"description":{"type":"string"}},"required":["name","type"]},"RemoveResult":{"type":"object","properties":{"count":{"type":"integer","format":"int64"}}}}}}