General Information
...
Service | API | Method | Data Models | Workflow |
---|---|---|---|---|
marketplace | /itemsitem/resource | POSTPUT | N/A | N/A |
Description
This API adds items /updates an item of type resource to the catalog.
Input
...
Code Block |
---|
Type: application/json |
Input | Source | Required | Type | Description |
---|---|---|---|---|
id | body | Yes | string | Specify the id of catalog |
items | body | Yes | string | Specify the groups this catalog have access to |
src | body.items | Yes | string | |
provider | body.items.src | Yes | string | ["manual", "github", "bitbucket", "bitbucket_enterprise"] |
owner | body.items.src | No | string | |
repo | body.items.src | No | string | |
branch | body.items.src | No | string | |
tag | body.items.src | No | string | |
type | body.items.soa | No | string | resource |
subType | body.items.soa | No | string | /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/ |
name | body.items.soa | Yes | string | /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/ |
group | body.items.soa | Yes | string | /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/ |
description | body.items.soa | Yes | string | |
tags | body.items.soa | No | Array of strings | |
attributes | body.items.soa | No | Object | example : { “attr1” : ”value” } |
tab | body.items.soa | No | Object | |
main | body.items.soa.tab | No | string | /^[a-zA-Z0-9_-]+$/ |
sub | body.items.soa.tab | No | string | /^[a-zA-Z0-9_-]+$/ |
program | body.items.soa | No | Array of strings | |
profile | body.items.soa | No | Object | Free schema |
version | body.items.soa | Yes | string | |
documentation | body.items | No | Object | |
readme | body.items.documentation | No | string | |
release | body.items.documentation | No | string |
Output
...
Response
SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response
Valid Response
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Invalid Response
Expand | ||
---|---|---|
| ||
|
Response schema
Follow this link to check out the response JSON Schema
SOAJS Error Codes
...
Code | Description |
---|---|
400 | Business logic required data are missing |
401 | Catalog Entry with same DNA detected! |
402 | Item is locked! |
500 | Item not found! |
602 | Model error: + %model_error% |