Cloud Services

Enterprise Marketplace

APIs for Service Offering Metadata
Published On Jun 17, 2024 - 12:08 PM

APIs for Service Offering Metadata

Understand the APIs used to perform actions in the Service Offering Metadata.
On this page, you can find the details about the APIs used to perform actions in the Service Offering Metadata.

GET /somd/api/v1/serviceOfferingMetadata

Gets service definition records based on input parameters such as provider list, category list, and so on.
Parameters
Name
Required
Description
Type
serviceOfferingMetadataId
Yes
Filters based on service metadata ID as entered during creation of the service definition.
String
categories
Yes
Filters based on service categories.
String
provisioners
Yes
Filters based on provider code such as aws, gcp, softlayer, and so on.
String
regions
No
Filters based on regions such as us-west-1, us-east-1, and so on.
String
operationgroup
Yes
Filters based on operation such as start, stop, pause, and so on.
String
sort
No
Determines whether the list is in descending (-) or ascending (+) order. Default is to filter based on provider code and service categories name in ascending order.
String
fields
Yes
Provides a list of comma-separated field names to include those fields in the output.
String
offset
No
Specifies the ranking number of the first item on the page. The default is 0.
Number
limit
No
Specifies how many records need to return in the output. The default is 20.
Number
Response
200 OK
[ null ]
400 Bad Request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 No resource found
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }

POST /somd/api/v1/serviceOfferingMetadata

Creates metadata for a service based on the JSON file provided as the payload.
Parameters
Provide an application/json file as the payload.
Payload
{ serviceOfferingMetadataId : OBJECT_STORAGE_ACCOUNT , serviceOfferingMetadataName : Object Storage Account , supplierId : string , description : Object storage(Swift/S3) is a robust, highly scalable object-based storage solution. It includes pay-as-you-go pricing, built-in SFTP, full integration with our CDN, and the ability to store, retrieve, and leverage data any way you want. , description : https://ibm-public-cos.github.io/crs-docs/ , imageURL : https://cache.globalcatalog.cloud.ibm.com/static/cache/2461-acb0d10a1725d783/images/uploaded/icons/object-storage.png , serviceDetails : Creats account for object storage(Cloud Object Storage - Standard Regional Swift/S3 API). , serviceType : IAAS , terms : Term and condition Refer to https://www-03.ibm.com/software/sla/sladb.nsf/sla/bm-7857-03 , categories : [ { rowItems : [ { attributeId : id , attributeValue : { valueObject : IBM_SOFTLAYERCATEGORYID } }, { attributeId : name , attributeValue : { valueObject : storage } }, { attributeId : description , attributeValue : { valueObject : Storage Category } }, { attributeId : providerCode , attributeValue : { valueObject : softlayerObjectStorage } }, { attributeId : providerAssetType , attributeValue : { valueObject : Storage Provider Contractor } } ] } ], labels : [ Staged , UnderDeployment ], features : [ { shortDesc : Highly Scalable , description : [ It offers a single storage system and namespace versus an ever-increasing number of limitedcapacity storage silos. ] } ], provisioners : [ { rowItems : [ { attributeId : id , attributeValue : { valueObject : ibm_storage_prov023 } }, { attributeId : name , attributeValue : { valueObject : ibm object storage 023 } } ] }, { rowItems : [ { attributeId : id , attributeValue : { valueObject : ibm_storage_prov016 } }, { attributeId : name , attributeValue : { valueObject : ibm object storage 016 } } ] } ], operationGroup : [ { rowItems : [ { attributeId : id , attributeValue : { valueObject : op_group_638 } }, { attributeId : name , attributeValue : { valueObject : start } } ] }, { rowItems : [ { attributeId : id , attributeValue : { valueObject : op_group_354 } }, { attributeId : name , attributeValue : { valueObject : stop } } ] } ], regions : [ { rowItems : [ { attributeId : id , attributeValue : { valueObject : us_west_1 } }, { attributeId : name , attributeValue : { valueObject : us west 1 } } ] }, { rowItems : [ { attributeId : id , attributeValue : { valueObject : us_east_1 } }, { attributeId : name , attributeValue : { valueObject : us east 1 } } ] } ], technologies : [ { rowItems : [ { attributeId : id , attributeValue : { valueObject : ibm_direct_storage } }, { attributeId : name , attributeValue : { valueObject : ibm-softlayer-storage } } ] } ], additional_info : [ { values : [ { attributeGroupId : ibm_storage_additional_info , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibmstoragelockid } }, { attributeId : name , attributeValue : { valueObject : storagelock1 } }, { attributeId : value , attributeValue : { valueObject : enabled } } ] }, { attributeGroupId : ibm_storage_additional_info , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibmstoragelockid2 } }, { attributeId : name , attributeValue : { valueObject : storagelock2 } }, { attributeId : value , attributeValue : { valueObject : disabled } } ] } ] } ] }
Response
201 created
{ serviceOfferingMetadataId : OBJECT_STORAGE_ACCOUNT , message : Created , translateCode : SMD201_CREATED , translateParameters : null }
400 Bad request
{ message : Bad Request , error_code : 400, translateCode : SMD400_BAD_REQUEST , translateParameters : null }
404 resource not found
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
409 Error: Conflict
{ message : Conflict , error_code : 409, translateCode : SMD409_CONFLICT , translateParameters : OBJECT_STORAGE_ACCOUNT }

GET /somd/api/v1/serviceOfferingMetadata/{serviceOfferingMetadataId}

Gets service definition based on the
serviceOfferingMetadataId
parameter.
Parameters
Name
Required
Description
Type
serviceOfferingMetadataId
Yes
The unique ID generated by the system while creating the service definition record.
String
200 successful operation
{ serviceOfferingMetadataId : OBJECT_STORAGE_ACCOUNT , serviceOfferingMetadataName : Object Storage Account , supplierId : string , description : Data storage(Swift/S3) is a robust, highly scalable object-based storage solution. It includes pay-as-you-go pricing, built-in SFTP, full integration with our CDN, and the ability to store, retrieve, and leverage data any way you want. , description : https://ibm-private-cos.github.io/crs-docs/ , imageURL : https://ibm-private-cos.github.io/crs-docs/ , serviceDetails : Creats account for object storage(Cloud Object Storage - Standard Regional Swift/S3 API). , serviceType : IAAS , terms : Term and condition Refer to https://www-03.ibm.com/software/sla/sladb.nsf/sla/bm-7857-03 , categories : [ { documentID : 52feac27-3b6f-4bf7-5c30-a6456854e2a4 , attributeGroupID : categories , rowItems : [ { attributeId : id , attributeValue : { valueObject : IBM_SOFTLAYERCATEGORYID } }, { attributeId : name , attributeValue : { valueObject : storage } }, { attributeId : description , attributeValue : { valueObject : Storage Category } }, { attributeId : providerCode , attributeValue : { valueObject : softlayerObjectStorage } }, { attributeId : providerAssetType , attributeValue : { valueObject : Storage Provider Contractor } } ] } ], labels : [ Staged , UnderDeployment ], features : [ { shortDesc : Highly Scalable , description : [ It offers a single storage system and namespace versus an ever-increasing number of limitedcapacity storage silos. ] } ], provisioners : [ { documentID : cf61f4c3-ffec-4fb6-4ac6-10524408bbe3 , attributeGroupID : provisioners , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibm_storage_prov023 } }, { attributeId : name , attributeValue : { valueObject : ibm object storage 023 } } ] }, { documentID : 7eb9db36-e833-4758-566b-45c96cd14cac , attributeGroupID : provisioners , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibm_storage_prov016 } }, { attributeId : name , attributeValue : { valueObject : ibm object storage 016 } } ] } ], operationGroup : [ { documentID : b08d1cd2-c089-4e44-7f9b-b46575f19649 , attributeGroupID : operationGroup , rowItems : [ { attributeId : id , attributeValue : { valueObject : op_group_638 } }, { attributeId : name , attributeValue : { valueObject : start } } ] }, { documentID : 14ef3f98-af5e-4717-4c47-872322c5f26f , attributeGroupID : operationGroup , rowItems : [ { attributeId : id , attributeValue : { valueObject : op_group_354 } }, { attributeId : name , attributeValue : { valueObject : stop } } ] } ], regions : [ { documentID : 25f0f397-13fc-4ad7-6f02-87ff163bd955 , attributeGroupID : region , rowItems : [ { attributeId : id , attributeValue : { valueObject : us_west_1 } }, { attributeId : name , attributeValue : { valueObject : us west 1 } } ] }, { documentID : 506b8f40-7a6d-4292-5f66-cc40b011b930 , attributeGroupID : region , rowItems : [ { attributeId : id , attributeValue : { valueObject : us_east_1 } }, { attributeId : name , attributeValue : { valueObject : us east 1 } } ] } ], technologies : [ { documentID : 960b899a-6fbf-4dda-5621-4fa7309acbcf , attributeGroupID : technologies , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibm_direct_storage } }, { attributeId : name , attributeValue : { valueObject : ibm-softlayer-storage } } ] } ], additional_info : [ { values : [ { documentID : ca1dd693-6d66-4271-516d-ad4df72dd072 , attributeGroupID : ibm_storage_additional_info , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibmstoragelockid } }, { attributeId : name , attributeValue : { valueObject : storagelock1 } }, { attributeId : value , attributeValue : { valueObject : enabled } } ] }, { documentID : f6123f05-bccb-4054-5f78-63ba587602f0 , attributeGroupID : ibm_storage_additional_info , rowItems : [ { attributeId : id , attributeValue : { valueObject : ibmstoragelockid2 } }, { attributeId : name , attributeValue : { valueObject : storagelock2 } }, { attributeId : value , attributeValue : { valueObject : disabled } } ] } ] } ], createdAt : 2020-05-18T18:08:28-05:00 , modifiedAt : 2020-05-18T18:58:14-05:00 }
400 Invalid status value
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 No resource found
{ message : Not Found , error_code : 404, translateCode : SMD404_NOT_FOUND , translateParameters : null }

DELETE /somd/api/v1/serviceOfferingMetadata/{serviceOfferingMetadataId}

Deletes the metadata of a service offering.
Parameters
Name
Required
Description
Type
serviceOfferingMetadataId
Yes
The unique ID generated by the system while creating the service definition record.
String
Response
204 No content
400 Bad request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }

PATCH /somd/api/v1/serviceOfferingMetadata/{serviceOfferingMetadataId}

Used to update fields of the service definition identified with the
serviceOfferingMetadataId
parameter. You only supply the fields of the service definition that you need to change.
Parameters
Name
Required
Description
Type
serviceOfferingMetadataId
Yes
The unique ID generated by the system while creating the service definition record.
String
Payload
{ serviceOfferingMetadataId;: ;OBJECT_STORAGE_ACCOUNT, description: Data storage(Swift/S3) is a robust, highly scalable object-based storage solution. It includes pay-as-you-go pricing, built-in SFTP, full integration with our CDN, and the ability to store, retrieve, and leverage data any way you want., description: https://ibm-private-cos.github.io/crs-docs/, imageURL: https://cache.localcatalog.cloud.ibm.com/static/cache/2461-acb0d10a1725d783/images/uploaded/icons/object-storage.png , regions: [ { rowItems: [ { attributeId:id, attributeValue: { valueObject:us_north_1 } }, { attributeId;: name, attributeValue: { valueObject: us north 1 } } ] }, { rowItems: [ { attributeId: id, attributeValue: { valueObject: us_south_1 } }, { attributeId: name, attributeValue: { valueObject: us south 1 } } ] } ] }
Response
201 Updated
{ serviceOfferingMetadataId: OBJECT_STORAGE_ACCOUNT, message: Created, translateCode: SMD201_CREATED;, translateParameters: null }
400 Bad request
{ message:Bad Request, error_code: 400, translateCode:S MD400_BAD_REQUEST, translateParameters: null }
404 resource not found
{ message: Not Found, error_code: 404, translateCode: SMD404_NOT_FOUND, translateParameters: OBJECT_ID_INVALID }

GET /somd/api/v1/attributeGroup/schema

Lists the schema of attribute groups filtered by
attributeGroupId
and
attributeGroupName
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
Filters objects based on AttributeGroup_id.
String
attributeGroupName
Yes
Filters objects based on AttributeGroup_name.
String
sort
No
Determines whether the list is in descending (-) or ascending (+) order. Default is ascending.
String
fields
Yes
Provide a list of comma-separated field names to include those fields in the output.
String
offset
No
Specifies the ranking number of the first item on the page. The default is 0.
Number
limit
No
Specifies how many records need to return in the output. The default is 20.
Number
Response
200 successful operation
[ { attributeGroups: [ { attributeGroupId: string, attributeGroupName: string, attributes: [ { attributeId: string, attributeName: string, description: string, properties: { maxLength: 0, minLength: 0, pattern: string }, type: [array boolean integer object string] } ], description: string, locale: string, required: [ string ] } ], limit: 0, linkToNext: string, linkToPrevious: string, offSet: 0, size: 0 } ]
400 Invalid status value
{ error_code: 0, message: string, translateCode: string, translateParameters: [ string ] }
404 resource not found
{ error_code: 0, message: string, translateCode: string, translateParameters: [ string ] }

POST /somd/api/v1/attributeGroup/schema

Creates an attribute group schema based on the ID, name, and attribute properties that you provide in the payload.
Payload
{ attributeGroupId: ibm_storage_additional_info, attributeGroupName: ibm storage additional info, attributes: [ { attributeId: id, attributeName: id, description; this is the attribute id, schema: { type: string, maxLength: 5, pattern:[A-z0-9] }, type: string }, { attributeId: name, attributeName: name, description: this is the attribute name, schema: { type: string, maxLength: 5, pattern: [A-z0-9; }, type: string }, { attributeId: value, attributeName: alue, description: this is the attribute value, schema: { type: string, maxLength: 5, pattern: [A-z0-9] }, type: string } ], description: this is my group description, locale: en, required: [ id ] }
Response
201 Created
{ attributeGroupId: ibm_storage_additional_info, message: Document Created Successfully, translateCode: SMD201_CREATED, translateParameters: ibm_storage_additional_info }
400 Bad request
{ message: validation failure list:\nattributeGroupId in body is required\nattributeGroupName in body is required\nattributes in body is required, error_code: 400, translateCode;: SMD400_BAD_REQUEST, translateParameters: null }
404 resource not found
{ error_code: 0, message: string, translateCode: string, translateParameters: [ string ] }
409 Conflict
{ message: Attribute GroupID Already Exists , error_code : 409, translateCode : SMD409_CONFLICT , translateParameters : null }

GET /somd/api/v1/attributeGroup/schema/{attributeGroupId}

Lists the
attributeGroup
schema as identified by its
attributeGroupId
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
Response
200 successful operation
[ { attributeGroupId : ibm_storage_additional_info , attributeGroupName : ibm storage additional info , description : this is complete information for ibm storage (additional info) , required : [ id ], locale : en , attributes : [ { attributeId : id , attributeName : id , description : this is the attribute id , type : string }, { attributeId : name , attributeName : name , description : this is the attribute name , type : string }, { attributeId : value , attributeName : value , description : this is the attribute value , type : string }, { attributeId : parameters , attributeName : value , description : these are parameter values , type : string } ] } ]
400 bad request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ message : Attribute GroupID not Exists , error_code : 404, translateCode : SMD404_NOT_FOUND , translateParameters : null }

DELETE /somd/api/v1/attributeGroup/schema/{attributeGroupId}

Deletes an attribute group as identified by its
attributeGroupId
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
Response
204 NO CONTENT
400 Bad request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }

PATCH /somd/api/v1/attributeGroup/schema/{attributeGroupId}

Updates an attribute group schema as identified by its
attributeGroupId
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
Payload
{ attributeGroupName : ibm storage additional info , attributes : [ { attributeId : id , attributeName : id , description : this is the attribute id , schema : { type : string , maxLength : 5, pattern : [A-z0-9] }, type : string }, { attributeId : name , attributeName : name , description : this is the attribute name , schema : { type : string , maxLength : 5, pattern : [A-z0-9] }, type : string }, { attributeId : value , attributeName : value , description : this is the attribute value , schema : { type : string , maxLength : 5, pattern : [A-z0-9] }, type : string }, { attributeId : parameters , attributeName : value , description : these are parameter values , schema : { type : string , maxLength : 20, pattern : [A-z0-9] }, type : string } ], description : this is complete information for ibm storage (additional info) , locale : en , required : [ id ] }
Response
200 Updated
{ attributeGroupId : ibm_storage_additional_info , message : Document UPDATED Successfully , translateCode : SMD200_OK , translateParameters : null }
400 Bad request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ message : AttributeGroupID not exists , error_code : 404, translateCode : SMD404_NOT_FOUND , translateParameters : null }

GET /somd/api/v1/attributeGroup/{attributeGroupId}/doc

Lists all the documents as created in attribute groups and filtered by
attributeIdValue
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
attributeIdValue
Yes
This parameter filters objects based on attributeId and its value in the form of attributeId:attributeValue.
String
sort
No
Determines whether the list is in descending (-) or ascending (+) order. Default is ascending.
String
fields
Yes
Provide a list of comma-separated field names to include those fields in the output.
String
offset
No
Specifies the ranking number of the first item on the page. The default is 0.
Number
limit
No
Specifies how many records need to return in the output. The default is 20.
Number
Response
200 successful operation
[ { AttributeGroup : { attributeGroupId : string , attributeGroupName : string , attributes : [ { attributeId : string , attributeName : string , description : string , properties : { maxLength : 0, minLength : 0, pattern : string }, type : [array boolean integer object string] } ], description : string , locale : string , required : [ string ] }, docs : { limit : 0, linkToNext : string , linkToPrevious : string , offSet : 0, size : 0, values : [ { attributeGroupID : string , documentID : string , rowItems : [ { attributeId : string , attributeValue : { valueObject : {} } } ] } ] } } ]
400 Invalid status value
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }

POST /somd/api/v1/attributeGroup/{attributeGroupId}/doc

Creates a document inside an attribute group. This document will be verified based on the schema registered as part of attribute group creation.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
Payload
{ documentID : region_document_apac , rowItems : [ { attributeId : id , attributeValue : { valueObject : jp_tok } }, { attributeId : name , attributeValue : { valueObject : tokyo } } ] }
Response
201 created
{ docId : 442deca4-322a-4821-66a4-b69dffab18cb , attributeGroupId : region , message : 201 Created , translateCode : SMD201_CREATED , translateParameters : 442deca4-322a-4821-66a4-b69dffab18cb }
400 Bad request
statusCode : 400, message : not all required Attribute IDs are provided: [id name] vs provided : [name] , translateCode : SMD400_BAD_REQUEST , translateParameters : null }
404 resource not found
{ statusCode : 404, message : unable to fetch Attribute Group from DB , translateCode : SMD404_NOT_FOUND , translateParameters : null }
409 Conflict
statusCode : 409, message : the AttributeDoc already exists with doc ID: f5987b0a-ec72-4383-5b14-c56f615a56f8 , translateCode : SMD409_CONFLICT , translateParameters : 442deca4-322a-4821-66a4-b69dffab18cb }

GET /somd/api/v1/attributeGroup/{attributeGroupId}/doc/{docId}

Lists the document stored inside an attribute group identified by
attributeGroupId
and
docID
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
docId
Yes
The unique ID of the document stored in the attribute group.
String
Response
200 successful operation
{ documentID : f5987b0a-ec72-4383-5b14-c56f615a56f8 , attributeGroupID : region , rowItems : [ { attributeId : id , attributeValue : { valueObject : jp_tok } }, { attributeId : name , attributeValue : { valueObject : tokyo } } ] }
400 bad request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ statusCode : 404, message : SMD404_NOT_FOUND , translateCode : SMD404_NOT_FOUND , translateParameters : 442deca4-322a-4821-66a4-b69dffab18cb }

DELETE /somd/api/v1/attributeGroup/{attributeGroupId}/doc/{docId}

Deletes a document identified by its
docId
stored inside an attribute group identified by its
attributeGroupId
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
docId
Yes
The unique ID of the document stored in the attribute group.
String
Example Value
needed
Response
204 NO CONTENT
400 Bad request
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }
404 resource not found
{ error_code : 0, message : string , translateCode : string , translateParameters : [ string ] }

PATCH /somd/api/v1/attributeGroup/{attributeGroupId}/doc/{docId}

Updates a document identified by its
docId
stored inside an attribute group identified by its
attributeGroupId
.
Parameters
Name
Required
Description
Type
attributeGroupId
Yes
The unique ID of the attribute group record.
String
docId
Yes
The unique ID of the document stored in the attribute group.
String
Payload
{ rowItems : [ { attributeId : id , attributeValue : { valueObject : in_del } }, { attributeId : name , attributeValue : { valueObject : india } } ] }
Response
200 Updated
{ docId : 0cfb8455-a056-4af7-771a-822e0b68a906 , attributeGroupId : region , message : 204 Created , translateCode : SMD204_NO_CONTENT , translateParameters : null }
400 Bad request
{ message : Bad Request , error_code : 400, translateCode : SMD400_BAD_REQUEST , translateParameters : null }
404 resource not found
{ message : AttributeGroupID not exists , error_code : 404, translateCode : SMD404_NOT_FOUND , translateParameters : null }

GET /somd/api/health

Checks the health of your system.
Response
200 Success
{ data : {}, message : string , metadata : {}, statusCode : 0, translateCode : string , translateParameters : [ {} ] }
400 Failure
{ data : {}, message : string , metadata : {}, statusCode : 0, translateCode : string , translateParameters : [ {} ] }
Do you have two minutes for a quick survey?
Take Survey