openapi: 3.0.1 info: description: "This contains both the current and the new Asset API, which accepts\ \ JSON-LD and will become the standard API once the Dataspace Protocol is stable." title: Asset API version: v3 paths: /v3/assets: post: description: Creates a new asset together with a data address operationId: createAssetV3 requestBody: content: application/json: schema: $ref: "#/components/schemas/AssetInput" responses: "200": content: application/json: schema: $ref: "#/components/schemas/IdResponse" description: Asset was created successfully. Returns the asset Id and created timestamp "400": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: Request body was malformed "409": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "Could not create asset, because an asset with that ID already\ \ exists" tags: - Asset V3 put: description: "Updates an asset with the given ID if it exists. If the asset\ \ is not found, no further action is taken. DANGER ZONE: Note that updating\ \ assets can have unexpected results, especially for contract offers that\ \ have been sent out or are ongoing in contract negotiations." operationId: updateAssetV3 requestBody: content: application/json: schema: $ref: "#/components/schemas/AssetInput" responses: "204": description: Asset was updated successfully "400": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "Request was malformed, e.g. id was null" "404": description: "Asset could not be updated, because it does not exist." tags: - Asset V3 /v3/assets/request: post: description: Request all assets according to a particular query operationId: requestAssetsV3 requestBody: content: application/json: schema: $ref: "#/components/schemas/QuerySpec" responses: "200": content: application/json: schema: type: array items: $ref: "#/components/schemas/AssetOutput" description: The assets matching the query "400": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: Request body was malformed tags: - Asset V3 /v3/assets/{id}: delete: description: "Removes an asset with the given ID if possible. Deleting an asset\ \ is only possible if that asset is not yet referenced by a contract agreement,\ \ in which case an error is returned. DANGER ZONE: Note that deleting assets\ \ can have unexpected results, especially for contract offers that have been\ \ sent out or ongoing or contract negotiations." operationId: removeAssetV3 parameters: - in: path name: id required: true schema: type: string responses: "204": description: Asset was deleted successfully "400": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "Request was malformed, e.g. id was null" "404": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: An asset with the given ID does not exist "409": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "The asset cannot be deleted, because it is referenced by a\ \ contract agreement" tags: - Asset V3 get: description: Gets an asset with the given ID operationId: getAssetV3 parameters: - in: path name: id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AssetOutput" description: The asset "400": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "Request was malformed, e.g. id was null" "404": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: An asset with the given ID does not exist tags: - Asset V3 components: schemas: ApiErrorDetail: type: object example: message: error message type: ErrorType path: object.error.path invalidValue: this value is not valid properties: invalidValue: type: string message: type: string path: type: string type: type: string AssetInput: type: object example: '@context': '@vocab': https://w3id.org/edc/v0.0.1/ns/ '@id': asset-id properties: key: value privateProperties: privateKey: privateValue dataAddress: type: HttpData baseUrl: https://jsonplaceholder.typicode.com/todos properties: '@context': type: object '@id': type: string '@type': type: string example: https://w3id.org/edc/v0.0.1/ns/Asset dataAddress: $ref: "#/components/schemas/DataAddress" privateProperties: $ref: "#/components/schemas/Properties" properties: $ref: "#/components/schemas/Properties" required: - '@context' - dataAddress - properties AssetOutput: type: object example: '@context': '@vocab': https://w3id.org/edc/v0.0.1/ns/ '@id': asset-id properties: key: value privateProperties: privateKey: privateValue dataAddress: type: HttpData baseUrl: https://jsonplaceholder.typicode.com/todos createdAt: 1688465655 properties: '@id': type: string '@type': type: string example: https://w3id.org/edc/v0.0.1/ns/Asset createdAt: type: integer format: int64 dataAddress: $ref: "#/components/schemas/DataAddress" privateProperties: $ref: "#/components/schemas/Properties" properties: $ref: "#/components/schemas/Properties" Criterion: type: object example: '@context': '@vocab': https://w3id.org/edc/v0.0.1/ns/ '@type': Criterion operandLeft: fieldName operator: = operandRight: some value properties: '@type': type: string example: https://w3id.org/edc/v0.0.1/ns/Criterion operandLeft: type: object operandRight: type: object operator: type: string required: - operandLeft - operandRight - operator DataAddress: type: object properties: '@type': type: string example: https://w3id.org/edc/v0.0.1/ns/DataAddress type: type: string IdResponse: type: object example: '@context': '@vocab': https://w3id.org/edc/v0.0.1/ns/ '@id': id-value createdAt: 1688465655 properties: '@id': type: string createdAt: type: integer format: int64 JsonArray: type: array items: $ref: "#/components/schemas/JsonValue" properties: empty: type: boolean valueType: type: string enum: - ARRAY - OBJECT - STRING - NUMBER - "TRUE" - "FALSE" - "NULL" JsonObject: type: object additionalProperties: $ref: "#/components/schemas/JsonValue" properties: empty: type: boolean valueType: type: string enum: - ARRAY - OBJECT - STRING - NUMBER - "TRUE" - "FALSE" - "NULL" JsonValue: type: object properties: valueType: type: string enum: - ARRAY - OBJECT - STRING - NUMBER - "TRUE" - "FALSE" - "NULL" Properties: type: object QuerySpec: type: object example: '@context': '@vocab': https://w3id.org/edc/v0.0.1/ns/ '@type': QuerySpec offset: 5 limit: 10 sortOrder: DESC sortField: fieldName filterExpression: [] properties: '@type': type: string example: https://w3id.org/edc/v0.0.1/ns/QuerySpec filterExpression: type: array items: $ref: "#/components/schemas/Criterion" limit: type: integer format: int32 offset: type: integer format: int32 sortField: type: string sortOrder: type: string enum: - ASC - DESC