This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

CreateLogGroup

1 - 1.4

post /v1/log-groups

Description

Create a Log group.

State ACTIVE (CURRENT)

VersionNot Before
1.4-

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

LogGroupCreateRequest

Responses

HTTP CodeDescriptionSchema
201CreatedLogGroupShowResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone

Example HTTP request

Request path

/v1/log-groups

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = servicewatch 1.4"

Request body

{
    "name": "testlg01",
    "retention_period": 365,
    "tags": [
        {
            "key": "key01",
            "value": "value01"
        },
        {
            "key": "key02",
            "value": "value02"
        }
    ]
}

Example HTTP response

Response 201

{
    "log_group": {
        "account_id": "1bcf39b344ac41cbaf0466ff0d2bebad",
        "created_at": "2024-01-15T10:30:00.000Z",
        "created_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "id": "bce52822147744b4afe0187164caa2e8",
        "modified_at": "2024-01-15T10:30:00.000Z",
        "modified_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "name": "testlg01",
        "retention_period": 365,
        "retention_period_name": "1 year",
        "status": "ACTIVE"
    }
}

2 - 1.3

post /v1/log-groups

Description

Create a Log group.

State ACTIVE (SUPPORTED)

VersionNot Before
1.320270131

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

LogGroupCreateRequest

Responses

HTTP CodeDescriptionSchema
201CreatedLogGroupShowResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone

Example HTTP request

Request path

/v1/log-groups

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = servicewatch 1.3"

Request body

{
    "name": "testlg01",
    "retention_period": 365,
    "tags": [
        {
            "key": "key01",
            "value": "value01"
        },
        {
            "key": "key02",
            "value": "value02"
        }
    ]
}

Example HTTP response

Response 201

{
    "log_group": {
        "account_id": "1bcf39b344ac41cbaf0466ff0d2bebad",
        "created_at": "2024-01-15T10:30:00.000Z",
        "created_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "id": "bce52822147744b4afe0187164caa2e8",
        "modified_at": "2024-01-15T10:30:00.000Z",
        "modified_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "name": "testlg01",
        "retention_period": 365,
        "retention_period_name": "1 year",
        "status": "ACTIVE"
    }
}

3 - 1.2

post /v1/log-groups

Description

Create a Log group.

State ACTIVE (SUPPORTED)

VersionNot Before
1.220261130

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

LogGroupCreateRequest

Responses

HTTP CodeDescriptionSchema
201CreatedLogGroupShowResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone

Example HTTP request

Request path

/v1/log-groups

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = servicewatch 1.2"

Request body

{
    "name": "testlg01",
    "retention_period": 365,
    "tags": [
        {
            "key": "key01",
            "value": "value01"
        },
        {
            "key": "key02",
            "value": "value02"
        }
    ]
}

Example HTTP response

Response 201

{
    "log_group": {
        "account_id": "1bcf39b344ac41cbaf0466ff0d2bebad",
        "created_at": "2024-01-15T10:30:00.000Z",
        "created_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "id": "bce52822147744b4afe0187164caa2e8",
        "modified_at": "2024-01-15T10:30:00.000Z",
        "modified_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "name": "testlg01",
        "retention_period": 365,
        "retention_period_name": "1 year",
        "status": "ACTIVE"
    }
}

4 - 1.1

post /v1/log-groups

Description

Create a Log group.

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.120260831

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

LogGroupCreateRequest

Responses

HTTP CodeDescriptionSchema
201CreatedLogGroupShowResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone

Example HTTP request

Request path

/v1/log-groups

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = servicewatch 1.1"

Request body

{
    "name": "testlg01",
    "retention_period": 365,
    "tags": [
        {
            "key": "key01",
            "value": "value01"
        },
        {
            "key": "key02",
            "value": "value02"
        }
    ]
}

Example HTTP response

Response 201

{
    "log_group": {
        "account_id": "1bcf39b344ac41cbaf0466ff0d2bebad",
        "created_at": "2024-01-15T10:30:00.000Z",
        "created_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "id": "bce52822147744b4afe0187164caa2e8",
        "modified_at": "2024-01-15T10:30:00.000Z",
        "modified_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "name": "testlg01",
        "retention_period": 365,
        "retention_period_name": "1 year",
        "status": "ACTIVE"
    }
}

5 - 1.0

post /v1/log-groups

Description

Create a Log group.

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.020260630

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

LogGroupCreateRequest

Responses

HTTP CodeDescriptionSchema
201CreatedLogGroupShowResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone

Example HTTP request

Request path

/v1/log-groups

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = servicewatch 1.0"

Request body

{
    "name": "testlg01",
    "retention_period": 365,
    "tags": [
        {
            "key": "key01",
            "value": "value01"
        },
        {
            "key": "key02",
            "value": "value02"
        }
    ]
}

Example HTTP response

Response 201

{
    "log_group": {
        "account_id": "1bcf39b344ac41cbaf0466ff0d2bebad",
        "created_at": "2024-01-15T10:30:00.000Z",
        "created_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "id": "bce52822147744b4afe0187164caa2e8",
        "modified_at": "2024-01-15T10:30:00.000Z",
        "modified_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
        "name": "testlg01",
        "retention_period": 365,
        "retention_period_name": "1 year",
        "status": "ACTIVE"
    }
}