Get Contribution Defaults

Get Contribution Defaults

Must be logged in to Developer Center and provide Basic Auth credentials. This is analogous to the /contributions API, but it only expects the information about the file content/repositories etc as input, and returns its best guess at appropriate defaults for the Contribution as output. It does this by heuristic analysis of the file content, guessing at a name for the sample, description, tags and categories.

Request
URI
POST
https://apigw.vmware.com/sampleExchange/v1/contributions/info
COPY
Request Body
Contribution of type(s) application/json
Optional
{
    "id": 0,
    "active": false,
    "name": "string",
    "type": "string",
    "readmeHtml": "string",
    "appendRepositoryReadme": false,
    "repositoryReadmeHtml": "string",
    "url": "string",
    "githubApiUrl": "string",
    "branch": "string",
    "paths": [
        "string"
    ],
    "files": [
        {
            "id": 0,
            "name": "string",
            "mode": "string",
            "type": "string",
            "sha": "string",
            "path": "string",
            "size": 0,
            "url": "string",
            "content": "string"
        }
    ],
    "categories": [
        {
            "id": 0,
            "parentId": 0,
            "type": "string",
            "name": "string",
            "version": "string"
        }
    ],
    "tags": [
        {
            "id": 0,
            "parentId": 0,
            "category": "string",
            "name": "string"
        }
    ],
    "ossLicense": "string",
    "metadata": "string"
}
integer As int32 As int32
id
Optional

id

boolean
active
Optional

active

string
name
Optional

name

string
type
Optional

type

Possible values are : REPOSITORY, GIST, PROJECT, SNIPPET, DCR, LINK,
string
readmeHtml
Optional

readmeHtml

boolean
appendRepositoryReadme
Optional

appendRepositoryReadme

string
repositoryReadmeHtml
Optional

repositoryReadmeHtml

string
url
Optional

url

string
githubApiUrl
Optional

githubApiUrl

string
branch
Optional

branch

array of string
paths
Optional

paths

array of FileInfo
files
Optional

files

array of Category
categories
Optional

categories

array of Tag
tags
Optional

tags

string
ossLicense
Optional

ossLicense

string
metadata
Optional

metadata

Authentication
This operation uses the following authentication methods.
Responses
200

successful operation

Returns Contribution of type(s) application/json
{
    "id": 0,
    "active": false,
    "name": "string",
    "type": "string",
    "readmeHtml": "string",
    "appendRepositoryReadme": false,
    "repositoryReadmeHtml": "string",
    "url": "string",
    "githubApiUrl": "string",
    "branch": "string",
    "paths": [
        "string"
    ],
    "files": [
        {
            "id": 0,
            "name": "string",
            "mode": "string",
            "type": "string",
            "sha": "string",
            "path": "string",
            "size": 0,
            "url": "string",
            "content": "string"
        }
    ],
    "categories": [
        {
            "id": 0,
            "parentId": 0,
            "type": "string",
            "name": "string",
            "version": "string"
        }
    ],
    "tags": [
        {
            "id": 0,
            "parentId": 0,
            "category": "string",
            "name": "string"
        }
    ],
    "ossLicense": "string",
    "metadata": "string"
}
integer As int32 As int32
id
Optional

id

boolean
active
Optional

active

string
name
Optional

name

string
type
Optional

type

Possible values are : REPOSITORY, GIST, PROJECT, SNIPPET, DCR, LINK,
string
readmeHtml
Optional

readmeHtml

boolean
appendRepositoryReadme
Optional

appendRepositoryReadme

string
repositoryReadmeHtml
Optional

repositoryReadmeHtml

string
url
Optional

url

string
githubApiUrl
Optional

githubApiUrl

string
branch
Optional

branch

array of string
paths
Optional

paths

array of FileInfo
files
Optional

files

array of Category
categories
Optional

categories

array of Tag
tags
Optional

tags

string
ossLicense
Optional

ossLicense

string
metadata
Optional

metadata